From 816ffba74b8bebffc620af50994833d783207a50 Mon Sep 17 00:00:00 2001 From: Keith Carangelo Date: Sat, 29 Aug 2020 11:02:59 -0400 Subject: Added $links_per_page variable to template and display on default --- application/render/PageBuilder.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'application/render/PageBuilder.php') diff --git a/application/render/PageBuilder.php b/application/render/PageBuilder.php index 7a716673..21703639 100644 --- a/application/render/PageBuilder.php +++ b/application/render/PageBuilder.php @@ -149,6 +149,8 @@ class PageBuilder $this->tpl->assign('formatter', $this->conf->get('formatter', 'default')); + $this->tpl->assign('links_per_page', $_SESSION['LINKS_PER_PAGE']); + // To be removed with a proper theme configuration. $this->tpl->assign('conf', $this->conf); } -- cgit v1.2.3 From 4479aff18f4ff80e274b52548c08e9ed9379bd51 Mon Sep 17 00:00:00 2001 From: Keith Carangelo Date: Mon, 31 Aug 2020 09:20:03 -0400 Subject: Avoid using global variables Co-authored-by: ArthurHoaro --- application/render/PageBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application/render/PageBuilder.php') diff --git a/application/render/PageBuilder.php b/application/render/PageBuilder.php index 21703639..c52e3b76 100644 --- a/application/render/PageBuilder.php +++ b/application/render/PageBuilder.php @@ -149,7 +149,7 @@ class PageBuilder $this->tpl->assign('formatter', $this->conf->get('formatter', 'default')); - $this->tpl->assign('links_per_page', $_SESSION['LINKS_PER_PAGE']); + $this->tpl->assign('links_per_page', $this->session['LINKS_PER_PAGE']); // To be removed with a proper theme configuration. $this->tpl->assign('conf', $this->conf); -- cgit v1.2.3