r48824 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48823‎ | r48824 | r48825 >
Date:14:40, 25 March 2009
Author:thomasv
Status:ok
Tags:
Comment:
fix for navigation links
Modified paths:
  • /trunk/extensions/ProofreadPage/ProofreadPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/ProofreadPage.php
@@ -130,7 +130,6 @@
131131 $index_namespace = preg_quote( wfMsgForContent( 'proofreadpage_index_namespace' ), '/' );
132132 $err = array( '', '', '', array() );
133133
134 -
135134 //if multipage, we use the page order, but we should read pagenum from the index
136135 if( $image && $image->exists() && $image->isMultiPage() ) {
137136
@@ -162,14 +161,15 @@
163162 }
164163
165164
166 - if( !$index_title ) return $err;
167 - if( !$index_title->exists()) return $err;
 165+ if( !$index_title ) return array( '', $prev_url, $next_url, array() ) ;
168166
 167+ $index_url = $index_title->getFullURL();
 168+
 169+ if( !$index_title->exists()) return array( $index_url, $prev_url, $next_url, array() );
 170+
169171 //if the index page exists, read metadata
170 -
171172 list( $prev_title, $next_title, $attributes ) = pr_parse_index($index_title,$wgTitle);
172173
173 - $index_url = $index_title->getFullURL();
174174 if($prev_title) $prev_url = $prev_title->getFullURL();
175175 if($next_title) $next_url = $next_title->getFullURL();
176176

Status & tagging log