r21722 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r21721‎ | r21722 | r21723 >
Date:14:24, 30 April 2007
Author:thomasv
Status:old
Tags:
Comment:
minor fix
Modified paths:
  • /trunk/extensions/ProofreadPage/ProofreadPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/ProofreadPage.php
@@ -77,18 +77,18 @@
7878 if(!$a_title) continue;
7979 if( $a_title->getPrefixedText() == $wgTitle->getPrefixedText() ) break;
8080 }
81 - if( ($i>0) && ($i+1<count($links[1])) ){
 81+ if( ($i>0) && ($i<count($links[1])) ){
8282 $prev_title = Title::newFromText( $links[1][$i-1] );
8383 if(!$prev_title) return $err;
8484 $prev_url = $prev_title->getFullURL();
 85+ }
 86+ else $prev_url = '';
 87+ if( ($i>=0) && ($i+1<count($links[1])) ){
8588 $next_title = Title::newFromText( $links[1][$i+1] );
8689 if(!$next_title) return $err;
8790 $next_url = $next_title->getFullURL();
8891 }
89 - else {
90 - $prev_url = '';
91 - $next_url = '';
92 - }
 92+ else $next_url = '';
9393
9494 return array( $index_url, $prev_url, $next_url );
9595