From: Marcel Werk Date: Tue, 29 Nov 2011 21:29:22 +0000 (+0100) Subject: Fixed some issues in smallpages template plugin X-Git-Tag: 2.0.0_Beta_1~1560 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=54096d56815810254ef0fefecfb66234d75a3093;p=GitHub%2FWoltLab%2FWCF.git Fixed some issues in smallpages template plugin --- 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 8bbd739b4f..c0d20bf2ad 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/PagesFunctionTemplatePlugin.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/PagesFunctionTemplatePlugin.class.php @@ -2,7 +2,6 @@ namespace wcf\system\template\plugin; use wcf\system\exception\SystemException; use wcf\system\request\LinkHandler; -use wcf\system\request\RouteHandler; use wcf\system\style\StyleHandler; use wcf\system\template\TemplateEngine; use wcf\system\WCF; diff --git a/wcfsetup/install/files/lib/system/template/plugin/SmallpagesFunctionTemplatePlugin.class.php b/wcfsetup/install/files/lib/system/template/plugin/SmallpagesFunctionTemplatePlugin.class.php index 8be38bf770..bd4d7abaeb 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/SmallpagesFunctionTemplatePlugin.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/SmallpagesFunctionTemplatePlugin.class.php @@ -1,6 +1,7 @@ get('pages')) === null) { - throw new SystemException("missing 'pages' argument in pages tag"); + throw new SystemException("missing 'pages' argument in smallpages tag"); } } $html = ''; if ($tagArgs['pages'] > 1) { - // encode link - $link = StringUtil::encodeHTML($tagArgs['link']); - + // create and encode route 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'])); + // open div and ul - $html .= "
\n