From 6a900ef8a872a82ac44605572b2c9b392efffbf2 Mon Sep 17 00:00:00 2001 From: emkael Date: Wed, 28 Jan 2015 11:07:05 +0100 Subject: * base path configuration --- http/index.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'http') diff --git a/http/index.php b/http/index.php index 42a2731..700951d 100644 --- a/http/index.php +++ b/http/index.php @@ -1,5 +1,6 @@ 1 && $path[1] == 'refresh'); // build Cezar URL for requested path - $path[0] = urldecode($path[0]); + $path[0] = urldecode($path[0]); $searchUrl = new http\Url(CEZAR_URL, ['query' => http_build_query( ['pid_search' => $path[0], 'p' => '21'] )]); - + $mscUrl = $searchUrl->toString(); $content = get_cache_content($path[0], $mscUrl, !$cache); // requested content @@ -49,9 +50,13 @@ if ($path) { // if the comment delimiters are present, we're possibly dealing with the content we want, slice it and wrap it $delimiters = array_keys(preg_grep('/---- page content /', $contentLines)); if ($delimiters) { - $content = '' - . implode(PHP_EOL, array_slice($contentLines, $delimiters[0]+1, $delimiters[1]-$delimiters[0]-1)) - . ''; + $content = '' + . '' + . '' + . '' + . '' + . implode(PHP_EOL, array_slice($contentLines, $delimiters[0]+1, $delimiters[1]-$delimiters[0]-1)) + . ''; } else { die('Malformed (even more than usually) content :('); -- cgit v1.2.3