r52191 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52190‎ | r52191 | r52192 >
Date:08:59, 20 June 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
* Remove code duplication
Modified paths:
  • /trunk/phase3/includes/CategoryPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/CategoryPage.php
@@ -263,17 +263,11 @@
264264 $this->addPage( $title, $x->cl_sortkey, $x->page_len, $x->page_is_redirect );
265265 }
266266 }
267 - $dbr->freeResult( $res );
268267 }
269268
270269 function getCategoryTop() {
271 - $r = '';
272 - if( $this->until != '' ) {
273 - $r .= $this->pagingLinks( $this->title, $this->nextPage, $this->until, $this->limit );
274 - } elseif( $this->nextPage != '' || $this->from != '' ) {
275 - $r .= $this->pagingLinks( $this->title, $this->from, $this->nextPage, $this->limit );
276 - }
277 - return $r == ''
 270+ $r = $this->getCategoryBottom();
 271+ return $r === ''
278272 ? $r
279273 : "<br style=\"clear:both;\"/>\n" . $r;
280274 }

Status & tagging log