r23156 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23155‎ | r23156 | r23157 >
Date:11:46, 21 June 2007
Author:aaron
Status:old
Tags:
Comment:
*Gah, these should be true
Modified paths:
  • /trunk/extensions/Citation/Citation.php (modified) (history)
  • /trunk/extensions/FootNote/Footnote.php (modified) (history)
  • /trunk/extensions/Review/Review.php (modified) (history)
  • /trunk/extensions/Watchers/Watchers.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Citation/Citation.php
@@ -19,13 +19,14 @@
2020 $wgCitationCounter = 1 ;
2121 $wgCitationRunning = false ;
2222
23 -function citation_hooker( $parser , $text ) {
 23+function citation_hooker( &$parser, &$text ) {
2424 global $wgCitationCache , $wgCitationCounter , $wgCitationRunning ;
25 - if( $wgCitationRunning ) return ;
 25+ if( $wgCitationRunning )
 26+ return true;
2627 if( count( $wgCitationCache ) == 0 )
27 - return false;
 28+ return true;
2829 if( !isset( $parser->isMainParser ) )
29 - return false;
 30+ return true;
3031 $ret = "" ;
3132 foreach( $wgCitationCache AS $num => $entry ) {
3233 $x = "<li>" . $entry . " <a href='#citeback{$num}'>&uarr;</a></li>\n" ;
@@ -34,6 +35,8 @@
3536 $ret = "<hr /><ol>" . $ret . "</ol>" ;
3637
3738 $text .= $ret ;
 39+
 40+ return true;
3841 }
3942
4043 function citation_clear_state() {
@@ -42,7 +45,7 @@
4346 $wgCitationCounter = 1 ;
4447 $wgCitationRunning = false;
4548
46 - return false;
 49+ return true;
4750 }
4851
4952 function parse_citation( $text , $params , $parser ) {
Index: trunk/extensions/Review/Review.php
@@ -338,10 +338,10 @@
339339 global $wgTitle, $wgUser , $wgReviewExtensionTopics, $wgArticle, $action, $wgRequest;
340340
341341 # Do we care?
342 - if( !wfReviewExtensionDoesNamespaceApply ( $wgTitle->getNamespace() )
 342+ if( !wfReviewExtensionDoesNamespaceApply ( $wgTitle->getNamespace() )
343343 or $wgUser->isBlocked()
344344 or ( $action != "view" )
345 - ) return false;
 345+ ) return true;
346346
347347 # Initialize
348348 $do_merge = $wgRequest->getBool ( 'do_merge' , false ) ;
Index: trunk/extensions/FootNote/Footnote.php
@@ -46,13 +46,13 @@
4747 $footnoteCount = 1 ;
4848 $footnoteRecursionGuard = false;
4949
50 -function insert_endnotes( $parser , $text ) {
 50+function insert_endnotes( &$parser, &$text ) {
5151 global $footnoteNotes , $footnoteCount, $footnoteRecursionGuard ;
5252
5353 wfDebug("insert_endnotes:\n<<<$text>>>\n");
5454
55 - if( $footnoteRecursionGuard ) return false;
56 - if( count( $footnoteNotes ) == 0 ) return false;
 55+ if( $footnoteRecursionGuard ) return true;
 56+ if( count( $footnoteNotes ) == 0 ) return true;
5757
5858 $ret = "" ;
5959 foreach( $footnoteNotes AS $num => $entry ) {
Index: trunk/extensions/Watchers/Watchers.php
@@ -62,11 +62,11 @@
6363 global $wgTitle;
6464 if( $wgTitle->isTalkPage() ) {
6565 # No talk pages please
66 - return false;
 66+ return true;
6767 }
6868 if( $wgTitle->getNamespace() < 0 ) {
6969 # No special pages please
70 - return false;
 70+ return true;
7171 }
7272
7373 wfWatchersAddCache();

Status & tagging log