From cf76cad9317fae94c4dc9328db777e0feb562d26 Mon Sep 17 00:00:00 2001 From: Robin Appelman <icewind1991@gmail.com> Date: Thu, 21 Apr 2011 23:04:16 +0200 Subject: [PATCH] change printPageNavi() to getPageNavi() to allow some more flexibility --- help/templates/index.php | 3 ++- lib/base.php | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/help/templates/index.php b/help/templates/index.php index 262ab3d8ca..a117c3d5fb 100644 --- a/help/templates/index.php +++ b/help/templates/index.php @@ -15,7 +15,8 @@ </table> <?php $url=OC_HELPER::linkTo( "help", "index.php" ).'?page='; - OC_UTIL::showPageNavi($_['pagecount'],$_['page'],$url); + $pageNavi=OC_UTIL::getPageNavi($_['pagecount'],$_['page'],$url); + $pageNavi->printPage(); ?> <a target="_blank" class="prettybutton" href="http://apps.owncloud.com/knowledgebase/editquestion.php?action=new">ASK A QUESTION</a> diff --git a/lib/base.php b/lib/base.php index 324b2f7e0a..1ab9b23bcc 100644 --- a/lib/base.php +++ b/lib/base.php @@ -244,9 +244,9 @@ class OC_UTIL { * @param int $pagecount * @param int $page * @param string $url - * @return html-string + * @return OC_TEMPLATE */ - public static function showPageNavi($pagecount,$page,$url) { + public static function getPageNavi($pagecount,$page,$url) { $pagelinkcount=8; if ($pagecount>1) { @@ -261,7 +261,7 @@ class OC_UTIL { $tmpl->assign('pagestart',$pagestart); $tmpl->assign('pagestop',$pagestop); $tmpl->assign('url',$url); - $tmpl->printPage(); + return $tmpl; } } -- GitLab