From d1121262fde42d9cb693609b591bff9aca046b4f Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 24 Nov 2011 21:54:43 +0100 Subject: [PATCH] Fixed some pagination issues (still work in progress) --- .../PagesFunctionTemplatePlugin.class.php | 55 ++++++++++--------- 1 file changed, 29 insertions(+), 26 deletions(-) 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