X-Git-Url: https://projects.mako.cc/source/scuttle/blobdiff_plain/c20b44263a89d8bf1a78bfa632daaae3cb4f1da2..HEAD:/search.php?ds=inline diff --git a/search.php b/search.php index 2c88f91..7420dd2 100644 --- a/search.php +++ b/search.php @@ -1,7 +1,6 @@ getServiceInstance('BookmarkService'); + $templateservice =& $sf->getServiceInstance('TemplateService'); + $userservice =& $sf->getServiceInstance('UserService'); $logged_on_userid = $userservice->getCurrentUserId(); - list($url, $range, $terms, $page) = explode('/', $_SERVER['PATH_INFO']); + + # explode the path + $path_exploded = explode('/', $_SERVER['PATH_INFO']); + $url = (count($path_exploded) > 0 ? $path_exploded[0] : NULL); + $range = (count($path_exploded) > 1 ? $path_exploded[1] : NULL); + $terms = (count($path_exploded) > 2 ? $path_exploded[2] : NULL); + $page = (count($path_exploded) > 3 ? $path_exploded[3] : NULL); $tplvars = array(); $tplVars['loadjs'] = true;