r23149 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23148‎ | r23149 | r23150 >
Date:23:16, 20 June 2007
Author:aaron
Status:old
Tags:
Comment:
*More hook cleanup
Modified paths:
  • /trunk/extensions/BookInformation/BookInformation.php (modified) (history)
  • /trunk/extensions/CheckUser/CheckUser.php (modified) (history)
  • /trunk/extensions/Contributors/Contributors.php (modified) (history)
  • /trunk/extensions/LatexDoc/LatexDoc.php (modified) (history)
  • /trunk/extensions/LdapAuthentication/LdapAuthentication.php (modified) (history)
  • /trunk/extensions/MathStatFunctions/MathStatFunctions.php (modified) (history)
  • /trunk/extensions/Multilang/Multilang.class.php (modified) (history)
  • /trunk/extensions/Preloader/Preloader.php (modified) (history)
  • /trunk/extensions/RegexBlock/regexBlockCore.php (modified) (history)
  • /trunk/extensions/UserRightsNotif/UserRightsNotif.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Preloader/Preloader.php
@@ -44,6 +44,7 @@
4545 if( $stx )
4646 $text = $stx;
4747 }
 48+ return true;
4849 }
4950
5051 /** Hook function for the parser */
Index: trunk/extensions/MathStatFunctions/MathStatFunctions.php
@@ -421,6 +421,8 @@
422422 foreach( $wgMathStatFunctionsMessages as $key => $value ) {
423423 $wgMessageCache->addMessages( $value, $key );
424424 }
 425+
 426+ return true;
425427 }
426428
427429 function wfMathStatFunctionsLanguageGetMagic( &$magicWords, $langCode ) {
Index: trunk/extensions/LdapAuthentication/LdapAuthentication.php
@@ -1615,7 +1615,7 @@
16161616 //They already with us? If so, quit this function.
16171617 if( $tmpuser->isLoggedIn() ) {
16181618 $wgAuth->printDebug( "User is already logged in.", 1 );
1619 - return;
 1619+ return false;
16201620 }
16211621
16221622 //Let regular authentication plugins configure themselves for auto
@@ -1629,7 +1629,7 @@
16301630 //If the user doesn't exist in LDAP, there isn't much reason to
16311631 //go any further.
16321632 $wgAuth->printDebug("User wasn't found in LDAP, exiting.", 1 );
1633 - return;
 1633+ return false;
16341634 }
16351635
16361636 //We need the username that MediaWiki will always use, *not* the one we
@@ -1643,7 +1643,7 @@
16441644
16451645 if ( $tmpuser == null ) {
16461646 $wgAuth->printDebug( "Username is not a valid MediaWiki username.", 1 );
1647 - return;
 1647+ return false;
16481648 }
16491649
16501650 //If exists, log them in
@@ -1653,7 +1653,7 @@
16541654 $wgAuth->updateUser( $wgUser );
16551655 $wgUser->setCookies();
16561656 $wgUser->setupSession();
1657 - return;
 1657+ return false;
16581658 }
16591659 $wgAuth->printDebug( "User does not exist in local database; creating.", 1 );
16601660
@@ -1687,5 +1687,7 @@
16881688 //Initialize the user
16891689 $wgUser->setupSession();
16901690 $wgUser->setCookies();
 1691+
 1692+ return true;
16911693 }
16921694 ?>
Index: trunk/extensions/UserRightsNotif/UserRightsNotif.php
@@ -38,7 +38,8 @@
3939 $subject = wfMsg( 'userrightsnotifysubject', $wgSitename );
4040 $message = wfMsg( 'userrightsnotifybody', $user->getName(), $wgSitename, $wgUser->getName(), $wgContLang->timeAndDate( wfTimestampNow() ), $added, $removed );
4141 $user->sendMail( $subject, $message, $wgUserRightsNotif['sender'] );
42 - }
 42+ }
 43+ return true;
4344 }
4445
4546 } else {
Index: trunk/extensions/LatexDoc/LatexDoc.php
@@ -18,6 +18,8 @@
1919
2020 $this->workingDir = "$wgUploadDirectory/latexdoc";
2121 $this->workingPath = "$wgUploadPath/latexdoc";
 22+
 23+ return true;
2224 }
2325
2426 function onUnknownAction( $action, &$article ) {
Index: trunk/extensions/Contributors/Contributors.php
@@ -53,6 +53,8 @@
5454 function efContributorsInvalidateCache( &$article ) {
5555 global $wgMemc;
5656 $wgMemc->delete( wfMemcKey( 'contributors', $article->getId() ) );
 57+
 58+ return true;
5759 }
5860
5961 /**
Index: trunk/extensions/BookInformation/BookInformation.php
@@ -64,6 +64,8 @@
6565 */
6666 function efBookInformation( $isbn, $output ) {
6767 BookInformation::show( $isbn, $output );
 68+
 69+ return true;
6870 }
6971
7072 /**
Index: trunk/extensions/Multilang/Multilang.class.php
@@ -91,6 +91,7 @@
9292 public function clearState() {
9393 $this->text = array();
9494 $this->fallback = '';
 95+ return true;
9596 }
9697
9798 }
Index: trunk/extensions/RegexBlock/regexBlockCore.php
@@ -42,6 +42,7 @@
4343 wfGetRegexBlocked ($blocker, $current_user, $ip_to_check) ;
4444 }
4545 }
 46+ return true;
4647 }
4748
4849 /*
Index: trunk/extensions/CheckUser/CheckUser.php
@@ -81,6 +81,8 @@
8282 $sql = "DELETE FROM $recentchanges WHERE cuc_timestamp < '{$cutoff}'";
8383 $dbw->query( $sql );
8484 }
 85+
 86+ return true;
8587 }
8688
8789 /**

Status & tagging log