From 04f74a6b69c05aee411ad2e7116d0c97d7590135 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Sat, 20 Jun 2009 08:59:36 +0000 Subject: [PATCH] * Remove code duplication --- includes/CategoryPage.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index 83e378d328..be0b4e0c9f 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -263,17 +263,11 @@ class CategoryViewer { $this->addPage( $title, $x->cl_sortkey, $x->page_len, $x->page_is_redirect ); } } - $dbr->freeResult( $res ); } function getCategoryTop() { - $r = ''; - if( $this->until != '' ) { - $r .= $this->pagingLinks( $this->title, $this->nextPage, $this->until, $this->limit ); - } elseif( $this->nextPage != '' || $this->from != '' ) { - $r .= $this->pagingLinks( $this->title, $this->from, $this->nextPage, $this->limit ); - } - return $r == '' + $r = $this->getCategoryBottom(); + return $r === '' ? $r : "
\n" . $r; } -- 2.20.1