Index: trunk/phase3/includes/User.php |
— | — | @@ -216,7 +216,7 @@ |
217 | 217 | $mBlockreason, $mBlock, $mEffectiveGroups, $mBlockedGlobally, |
218 | 218 | $mLocked, $mHideName, $mOptions; |
219 | 219 | //@} |
220 | | - |
| 220 | + |
221 | 221 | static $idCacheByName = array(); |
222 | 222 | |
223 | 223 | /** |
— | — | @@ -636,12 +636,12 @@ |
637 | 637 | */ |
638 | 638 | function getPasswordValidity( $password ) { |
639 | 639 | global $wgMinimalPasswordLength, $wgContLang; |
640 | | - |
| 640 | + |
641 | 641 | $result = false; //init $result to false for the internal checks |
642 | | - |
| 642 | + |
643 | 643 | if( !wfRunHooks( 'isValidPassword', array( $password, &$result, $this ) ) ) |
644 | 644 | return $result; |
645 | | - |
| 645 | + |
646 | 646 | if ( $result === false ) { |
647 | 647 | if( strlen( $password ) < $wgMinimalPasswordLength ) { |
648 | 648 | return 'passwordtooshort'; |
— | — | @@ -1055,7 +1055,7 @@ |
1056 | 1056 | $defOpt['searchNs'.$nsnum] = !empty( $wgNamespacesToBeSearchedDefault[$nsnum] ); |
1057 | 1057 | } |
1058 | 1058 | $defOpt['skin'] = $wgDefaultSkin; |
1059 | | - |
| 1059 | + |
1060 | 1060 | return $defOpt; |
1061 | 1061 | } |
1062 | 1062 | |
— | — | @@ -1392,9 +1392,9 @@ |
1393 | 1393 | $blocked = false; |
1394 | 1394 | wfDebug( __METHOD__ . ": self-talk page, ignoring any blocks\n" ); |
1395 | 1395 | } |
1396 | | - |
| 1396 | + |
1397 | 1397 | wfRunHooks( 'UserIsBlockedFrom', array( $this, $title, &$blocked, &$allowUsertalk ) ); |
1398 | | - |
| 1398 | + |
1399 | 1399 | wfProfileOut( __METHOD__ ); |
1400 | 1400 | return $blocked; |
1401 | 1401 | } |
— | — | @@ -2525,9 +2525,9 @@ |
2526 | 2526 | 'user_id' => $this->mId |
2527 | 2527 | ), __METHOD__ |
2528 | 2528 | ); |
2529 | | - |
| 2529 | + |
2530 | 2530 | $this->saveOptions(); |
2531 | | - |
| 2531 | + |
2532 | 2532 | wfRunHooks( 'UserSaveSettings', array( $this ) ); |
2533 | 2533 | $this->clearSharedCache(); |
2534 | 2534 | $this->getUserPage()->invalidateCache(); |
— | — | @@ -2626,7 +2626,7 @@ |
2627 | 2627 | |
2628 | 2628 | // Clear instance cache other than user table data, which is already accurate |
2629 | 2629 | $this->clearInstanceCache(); |
2630 | | - |
| 2630 | + |
2631 | 2631 | $this->saveOptions(); |
2632 | 2632 | } |
2633 | 2633 | |
— | — | @@ -3563,11 +3563,11 @@ |
3564 | 3564 | * @param $byEmail Boolean: account made by email? |
3565 | 3565 | */ |
3566 | 3566 | public function addNewUserLogEntry( $byEmail = false ) { |
3567 | | - global $wgUser, $wgContLang, $wgNewUserLog; |
| 3567 | + global $wgUser, $wgNewUserLog; |
3568 | 3568 | if( empty( $wgNewUserLog ) ) { |
3569 | 3569 | return true; // disabled |
3570 | 3570 | } |
3571 | | - $talk = $wgContLang->getFormattedNsText( NS_TALK ); |
| 3571 | + |
3572 | 3572 | if( $this->getName() == $wgUser->getName() ) { |
3573 | 3573 | $action = 'create'; |
3574 | 3574 | $message = ''; |
— | — | @@ -3650,11 +3650,11 @@ |
3651 | 3651 | |
3652 | 3652 | $this->loadOptions(); |
3653 | 3653 | $dbw = wfGetDB( DB_MASTER ); |
3654 | | - |
| 3654 | + |
3655 | 3655 | $insert_rows = array(); |
3656 | | - |
| 3656 | + |
3657 | 3657 | $saveOptions = $this->mOptions; |
3658 | | - |
| 3658 | + |
3659 | 3659 | // Allow hooks to abort, for instance to save to a global profile. |
3660 | 3660 | // Reset options to default state before saving. |
3661 | 3661 | if( !wfRunHooks( 'UserSaveOptions', array( $this, &$saveOptions ) ) ) |
Index: trunk/phase3/includes/db/LBFactory.php |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | |
27 | 27 | /** |
28 | 28 | * Shut down, close connections and destroy the cached instance. |
29 | | - * |
| 29 | + * |
30 | 30 | */ |
31 | 31 | static function destroyInstance() { |
32 | 32 | if ( self::$instance ) { |
— | — | @@ -41,7 +41,7 @@ |
42 | 42 | abstract function __construct( $conf ); |
43 | 43 | |
44 | 44 | /** |
45 | | - * Create a new load balancer object. The resulting object will be untracked, |
| 45 | + * Create a new load balancer object. The resulting object will be untracked, |
46 | 46 | * not chronology-protected, and the caller is responsible for cleaning it up. |
47 | 47 | * |
48 | 48 | * @param string $wiki Wiki ID, or false for the current wiki |
— | — | @@ -58,8 +58,8 @@ |
59 | 59 | abstract function getMainLB( $wiki = false ); |
60 | 60 | |
61 | 61 | /* |
62 | | - * Create a new load balancer for external storage. The resulting object will be |
63 | | - * untracked, not chronology-protected, and the caller is responsible for |
| 62 | + * Create a new load balancer for external storage. The resulting object will be |
| 63 | + * untracked, not chronology-protected, and the caller is responsible for |
64 | 64 | * cleaning it up. |
65 | 65 | * |
66 | 66 | * @param string $cluster External storage cluster, or false for core |
— | — | @@ -142,8 +142,8 @@ |
143 | 143 | } |
144 | 144 | |
145 | 145 | return new LoadBalancer( array( |
146 | | - 'servers' => $servers, |
147 | | - 'masterWaitTimeout' => $wgMasterWaitTimeout |
| 146 | + 'servers' => $servers, |
| 147 | + 'masterWaitTimeout' => $wgMasterWaitTimeout |
148 | 148 | )); |
149 | 149 | } |
150 | 150 | |
— | — | @@ -162,7 +162,7 @@ |
163 | 163 | throw new MWException( __METHOD__.": Unknown cluster \"$cluster\"" ); |
164 | 164 | } |
165 | 165 | return new LoadBalancer( array( |
166 | | - 'servers' => $wgExternalServers[$cluster] |
| 166 | + 'servers' => $wgExternalServers[$cluster] |
167 | 167 | )); |
168 | 168 | } |
169 | 169 | |
Index: trunk/phase3/includes/WebRequest.php |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | * not create a second WebRequest object; make a FauxRequest object if |
41 | 41 | * you want to pass arbitrary data to some function in place of the web |
42 | 42 | * input. |
43 | | - * |
| 43 | + * |
44 | 44 | * @ingroup HTTP |
45 | 45 | */ |
46 | 46 | class WebRequest { |
— | — | @@ -66,11 +66,13 @@ |
67 | 67 | */ |
68 | 68 | public function interpolateTitle() { |
69 | 69 | global $wgUsePathInfo; |
| 70 | + |
70 | 71 | if ( $wgUsePathInfo ) { |
71 | 72 | // PATH_INFO is mangled due to http://bugs.php.net/bug.php?id=31892 |
72 | 73 | // And also by Apache 2.x, double slashes are converted to single slashes. |
73 | 74 | // So we will use REQUEST_URI if possible. |
74 | 75 | $matches = array(); |
| 76 | + |
75 | 77 | if ( !empty( $_SERVER['REQUEST_URI'] ) ) { |
76 | 78 | // Slurp out the path portion to examine... |
77 | 79 | $url = $_SERVER['REQUEST_URI']; |
— | — | @@ -180,7 +182,7 @@ |
181 | 183 | */ |
182 | 184 | private function checkMagicQuotes() { |
183 | 185 | $mustFixQuotes = function_exists( 'get_magic_quotes_gpc' ) |
184 | | - && get_magic_quotes_gpc(); |
| 186 | + && get_magic_quotes_gpc(); |
185 | 187 | if( $mustFixQuotes ) { |
186 | 188 | $this->fix_magic_quotes( $_COOKIE ); |
187 | 189 | $this->fix_magic_quotes( $_ENV ); |
— | — | @@ -260,7 +262,7 @@ |
261 | 263 | return (string)$val; |
262 | 264 | } |
263 | 265 | } |
264 | | - |
| 266 | + |
265 | 267 | /** |
266 | 268 | * Set an aribtrary value into our get/post data. |
267 | 269 | * @param $key string Key name to use |
— | — | @@ -653,7 +655,7 @@ |
654 | 656 | } |
655 | 657 | } |
656 | 658 | } |
657 | | - |
| 659 | + |
658 | 660 | /* |
659 | 661 | * Get data from $_SESSION |
660 | 662 | * @param $key String Name of key in $_SESSION |
— | — | @@ -664,7 +666,7 @@ |
665 | 667 | return null; |
666 | 668 | return $_SESSION[$key]; |
667 | 669 | } |
668 | | - |
| 670 | + |
669 | 671 | /** |
670 | 672 | * Set session data |
671 | 673 | * @param $key String Name of key in $_SESSION |
— | — | @@ -675,20 +677,20 @@ |
676 | 678 | } |
677 | 679 | |
678 | 680 | /** |
679 | | - * Returns true if the PATH_INFO ends with an extension other than a script |
| 681 | + * Returns true if the PATH_INFO ends with an extension other than a script |
680 | 682 | * extension. This could confuse IE for scripts that send arbitrary data which |
681 | 683 | * is not HTML but may be detected as such. |
682 | 684 | * |
683 | | - * Various past attempts to use the URL to make this check have generally |
684 | | - * run up against the fact that CGI does not provide a standard method to |
685 | | - * determine the URL. PATH_INFO may be mangled (e.g. if cgi.fix_pathinfo=0), |
686 | | - * but only by prefixing it with the script name and maybe some other stuff, |
687 | | - * the extension is not mangled. So this should be a reasonably portable |
| 685 | + * Various past attempts to use the URL to make this check have generally |
| 686 | + * run up against the fact that CGI does not provide a standard method to |
| 687 | + * determine the URL. PATH_INFO may be mangled (e.g. if cgi.fix_pathinfo=0), |
| 688 | + * but only by prefixing it with the script name and maybe some other stuff, |
| 689 | + * the extension is not mangled. So this should be a reasonably portable |
688 | 690 | * way to perform this security check. |
689 | 691 | */ |
690 | 692 | public function isPathInfoBad() { |
691 | 693 | global $wgScriptExtension; |
692 | | - |
| 694 | + |
693 | 695 | if ( !isset( $_SERVER['PATH_INFO'] ) ) { |
694 | 696 | return false; |
695 | 697 | } |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -471,7 +471,7 @@ |
472 | 472 | * Useful if you want to use a shared repository by default |
473 | 473 | * without disabling local uploads (use $wgEnableUploads = false for that) |
474 | 474 | * e.g. $wgUploadNavigationUrl = 'http://commons.wikimedia.org/wiki/Special:Upload'; |
475 | | - * |
| 475 | + * |
476 | 476 | * This also affects images inline images that do not exist. In that case the URL will get |
477 | 477 | * (?|&)wpDestFile=<filename> appended to it as appropriate. |
478 | 478 | */ |
— | — | @@ -715,8 +715,8 @@ |
716 | 716 | */ |
717 | 717 | $wgLBFactoryConf = array( 'class' => 'LBFactory_Simple' ); |
718 | 718 | |
719 | | -/** |
720 | | - * Unique identifier if you're paranoid and don't want $wgDBname as part of |
| 719 | +/** |
| 720 | + * Unique identifier if you're paranoid and don't want $wgDBname as part of |
721 | 721 | * wfWikiId(). See bug 21086 |
722 | 722 | */ |
723 | 723 | $wgWikiId = false; |
— | — | @@ -866,14 +866,14 @@ |
867 | 867 | $wgOutputEncoding = 'UTF-8'; |
868 | 868 | $wgEditEncoding = ''; |
869 | 869 | |
870 | | -/** |
871 | | - * Set this to true to clean up archaic Unicode sequences in Arabic and |
| 870 | +/** |
| 871 | + * Set this to true to clean up archaic Unicode sequences in Arabic and |
872 | 872 | * Malayalam text. Currently only works if $wgLanguageCode is set to Arabic |
873 | 873 | * or Malayalam. |
874 | 874 | * |
875 | | - * Enabling this is generally a good idea for new wikis, since it fixes a few |
876 | | - * technical problems to do with editing these languages. However, if it's |
877 | | - * enabled on an existing wiki, pages which contain the problematic characters |
| 875 | + * Enabling this is generally a good idea for new wikis, since it fixes a few |
| 876 | + * technical problems to do with editing these languages. However, if it's |
| 877 | + * enabled on an existing wiki, pages which contain the problematic characters |
878 | 878 | * in their page titles may become inaccessible. Running maintenance/cleanupTitles.php |
879 | 879 | * after enabling it may fix this. |
880 | 880 | */ |
— | — | @@ -936,7 +936,7 @@ |
937 | 937 | $wgHtml5Version = null; |
938 | 938 | |
939 | 939 | /** |
940 | | - * Enabled RDFa attributes for use in wikitext. |
| 940 | + * Enabled RDFa attributes for use in wikitext. |
941 | 941 | * NOTE: Interaction with HTML5 is somewhat underspecified. |
942 | 942 | */ |
943 | 943 | $wgAllowRdfaAttributes = true; |
— | — | @@ -1040,17 +1040,17 @@ |
1041 | 1041 | * Like $wgArticlePath, but on multi-variant wikis, this provides a |
1042 | 1042 | * path format that describes which parts of the URL contain the |
1043 | 1043 | * language variant. For Example: |
1044 | | - * |
| 1044 | + * |
1045 | 1045 | * $wgLanguageCode = 'sr'; |
1046 | 1046 | * $wgVariantArticlePath = '/$2/$1'; |
1047 | 1047 | * $wgArticlePath = '/wiki/$1'; |
1048 | | - * |
| 1048 | + * |
1049 | 1049 | * A link to /wiki/ would be redirected to /sr/Главна_страна |
1050 | 1050 | * |
1051 | 1051 | * It is important that $wgArticlePath not overlap with possible values |
1052 | 1052 | * of $wgVariantArticlePath. |
1053 | 1053 | */ |
1054 | | -$wgVariantArticlePath = false;///< defaults to false |
| 1054 | +$wgVariantArticlePath = false;///< defaults to false |
1055 | 1055 | |
1056 | 1056 | /** |
1057 | 1057 | * Show a bar of language selection links in the user login and user |
— | — | @@ -1932,8 +1932,8 @@ |
1933 | 1933 | $wgUseTeX = false; |
1934 | 1934 | /** Location of the texvc binary */ |
1935 | 1935 | $wgTexvc = './math/texvc'; |
1936 | | -/** |
1937 | | - * Texvc background color |
| 1936 | +/** |
| 1937 | + * Texvc background color |
1938 | 1938 | * use LaTeX color format as used in \special function |
1939 | 1939 | * for transparent background use value 'Transparent' for alpha transparency or |
1940 | 1940 | * 'transparent' for binary transparency. |
Index: trunk/phase3/maintenance/Maintenance.php |
— | — | @@ -373,7 +373,7 @@ |
374 | 374 | $this->maybeHelp(); |
375 | 375 | $this->validateParamsAndArgs(); |
376 | 376 | } |
377 | | - |
| 377 | + |
378 | 378 | /** |
379 | 379 | * Normally we disable the memory_limit when running admin scripts. |
380 | 380 | * Some scripts may wish to actually set a limit, however, to avoid |
Index: trunk/phase3/maintenance/install-utils.inc |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | "to continue installation. ABORTING.\n"; |
25 | 25 | die( -1 ); |
26 | 26 | } |
27 | | - |
| 27 | + |
28 | 28 | // Test for PHP bug which breaks PHP 5.0.x on 64-bit... |
29 | 29 | // As of 1.8 this breaks lots of common operations instead |
30 | 30 | // of just some rare ones like export. |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | "or higher. ABORTING. (http://bugs.php.net/bug.php?id=34879 for details)\n"; |
35 | 35 | die( -1 ); |
36 | 36 | } |
37 | | - |
| 37 | + |
38 | 38 | $test = new PhpXmlBugTester(); |
39 | 39 | if( !$test->ok ) { |
40 | 40 | echo "Your system has a combination of PHP and libxml2 versions which is buggy\n" . |
— | — | @@ -42,8 +42,8 @@ |
43 | 43 | "ABORTING (http://bugs.php.net/bug.php?id=45996 for details).\n"; |
44 | 44 | die( -1 ); |
45 | 45 | } |
46 | | - |
47 | 46 | |
| 47 | + |
48 | 48 | global $wgCommandLineMode; |
49 | 49 | $wgCommandLineMode = true; |
50 | 50 | umask( 000 ); |
— | — | @@ -61,7 +61,7 @@ |
62 | 62 | public function __construct() { |
63 | 63 | $charData = '<b>c</b>'; |
64 | 64 | $xml = '<a>' . htmlspecialchars( $charData ) . '</a>'; |
65 | | - |
| 65 | + |
66 | 66 | $parser = xml_parser_create(); |
67 | 67 | xml_set_character_data_handler( $parser, array( $this, 'chardata' ) ); |
68 | 68 | $parsedOk = xml_parse($parser, $xml, true); |
— | — | @@ -121,7 +121,7 @@ |
122 | 122 | $command = "read -er -p $encPrompt && echo \"\$REPLY\""; |
123 | 123 | $encCommand = wfEscapeShellArg( $command ); |
124 | 124 | $line = wfShellExec( "$bash -c $encCommand", $retval ); |
125 | | - |
| 125 | + |
126 | 126 | if( $retval == 0 ) { |
127 | 127 | return $line; |
128 | 128 | } elseif( $retval == 127 ) { |
— | — | @@ -133,7 +133,7 @@ |
134 | 134 | return false; |
135 | 135 | } |
136 | 136 | } |
137 | | - |
| 137 | + |
138 | 138 | // Fallback... we'll have no editing controls, EWWW |
139 | 139 | if ( feof( STDIN ) ) { |
140 | 140 | return false; |