From: Marcel Werk Date: Thu, 24 Nov 2011 20:54:43 +0000 (+0100) Subject: Fixed some pagination issues X-Git-Tag: 2.0.0_Beta_1~1568 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d1121262fde42d9cb693609b591bff9aca046b4f;p=GitHub%2FWoltLab%2FWCF.git Fixed some pagination issues (still work in progress) --- diff --git a/wcfsetup/install/files/lib/system/template/plugin/PagesFunctionTemplatePlugin.class.php b/wcfsetup/install/files/lib/system/template/plugin/PagesFunctionTemplatePlugin.class.php index 4b2291af47..653dc10a6d 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/PagesFunctionTemplatePlugin.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/PagesFunctionTemplatePlugin.class.php @@ -1,11 +1,14 @@ 1) { - // define page link for js function - $html .= ""; - // create and encode route link - $routeComponents = array('controller' => $tagArgs['controller']); - if (isset($tagArgs['id'])) $routeComponents['id'] = $tagArgs['id']; - $routeURL = RouteHandler::getInstance()->buildRoute($routeComponents); - $tagArgs['link'] = StringUtil::encodeHTML($routeURL . $tagArgs['link']); - + $parameters = array(); + if (isset($tagArgs['id'])) $parameters['id'] = $tagArgs['id']; + if (isset($tagArgs['title'])) $parameters['title'] = $tagArgs['title']; + if (isset($tagArgs['object'])) $parameters['object'] = $tagArgs['object']; + if (isset($tagArgs['application'])) $parameters['application'] = $tagArgs['application']; + + $link = StringUtil::encodeHTML(LinkHandler::getInstance()->getLink($tagArgs['controller'], $parameters, $tagArgs['link'])); + if (!isset($tagArgs['page'])) { if (($tagArgs['page'] = $tplObj->get('pageNo')) === null) { $tagArgs['page'] = 0; @@ -94,19 +97,19 @@ class PagesFunctionTemplatePlugin implements IFunctionTemplatePlugin { } // open div and ul - $html .= "
\n