From 5873029fed8872573adcf8b1a8e1d0178e29c2a2 Mon Sep 17 00:00:00 2001 From: shish Date: Wed, 11 Jul 2007 06:12:29 +0000 Subject: [PATCH] how did I not notice these errors? <_< git-svn-id: file:///home/shish/svn/shimmie2/trunk@258 7f39781d-f577-437e-ae19-be835c7a54ca --- ext/index/main.php | 2 +- ext/index/theme.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ext/index/main.php b/ext/index/main.php index a5ec0721..7a752d0d 100644 --- a/ext/index/main.php +++ b/ext/index/main.php @@ -27,7 +27,7 @@ class Index extends Extension { $images = $database->get_images(($page_number-1)*$count, $count, $search_terms); $this->theme->set_page($page_number, $total_pages, $search_terms); - $this->theme->display_page($event->page, $page_title, $images); + $this->theme->display_page($event->page_object, $images); } if(is_a($event, 'SetupBuildingEvent')) { diff --git a/ext/index/theme.php b/ext/index/theme.php index 62876be6..ebec6914 100644 --- a/ext/index/theme.php +++ b/ext/index/theme.php @@ -7,7 +7,9 @@ class IndexTheme extends Themelet { $this->search_terms = $search_terms; } - public function display_page($page, $page_title, $images) { + public function display_page($page, $images) { + global $config; + if(count($this->search_terms) == 0) { $query = null; $page_title = $config->get_string('title'); @@ -20,7 +22,7 @@ class IndexTheme extends Themelet { $page->set_subheading("Page $page_number / $total_pages"); } } - if($page_number > 1 || count($this->search_terms) > 0) { + if($this->page_number > 1 || count($this->search_terms) > 0) { // $page_title .= " / $page_number"; }