From: Niklas Laxström Date: Sat, 20 Jun 2009 08:59:36 +0000 (+0000) Subject: * Remove code duplication X-Git-Tag: 1.31.0-rc.0~41278 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24id_article%22%29%20.%20%22?a=commitdiff_plain;h=04f74a6b69c05aee411ad2e7116d0c97d7590135;p=lhc%2Fweb%2Fwiklou.git * Remove code duplication --- 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; }