Index: trunk/phase3/maintenance/dumpTextPass.php |
— | — | @@ -80,11 +80,11 @@ |
81 | 81 | } |
82 | 82 | |
83 | 83 | function processOption( $opt, $val, $param ) { |
| 84 | + global $IP; |
84 | 85 | $url = $this->processFileOpt( $val, $param ); |
85 | 86 | |
86 | 87 | switch( $opt ) { |
87 | 88 | case 'prefetch': |
88 | | - global $IP; |
89 | 89 | require_once "$IP/maintenance/backupPrefetch.inc"; |
90 | 90 | $this->prefetch = new BaseDump( $url ); |
91 | 91 | break; |
Index: trunk/phase3/includes/api/ApiEditPage.php |
— | — | @@ -252,6 +252,8 @@ |
253 | 253 | |
254 | 254 | $retval = $ep->internalAttemptSave( $result, $wgUser->isAllowed( 'bot' ) && $params['bot'] ); |
255 | 255 | $wgRequest = $oldRequest; |
| 256 | + global $wgMaxArticleSize; |
| 257 | + |
256 | 258 | switch( $retval ) { |
257 | 259 | case EditPage::AS_HOOK_ERROR: |
258 | 260 | case EditPage::AS_HOOK_ERROR_EXPECTED: |
— | — | @@ -274,7 +276,6 @@ |
275 | 277 | |
276 | 278 | case EditPage::AS_MAX_ARTICLE_SIZE_EXCEEDED: |
277 | 279 | case EditPage::AS_CONTENT_TOO_BIG: |
278 | | - global $wgMaxArticleSize; |
279 | 280 | $this->dieUsageMsg( array( 'contenttoobig', $wgMaxArticleSize ) ); |
280 | 281 | |
281 | 282 | case EditPage::AS_READ_ONLY_PAGE_ANON: |
Index: trunk/phase3/includes/api/ApiLogin.php |
— | — | @@ -70,12 +70,10 @@ |
71 | 71 | |
72 | 72 | $loginForm = new LoginForm( $req ); |
73 | 73 | |
74 | | - global $wgCookiePrefix; |
| 74 | + global $wgCookiePrefix, $wgUser, $wgPasswordAttemptThrottle;; |
75 | 75 | |
76 | 76 | switch ( $authRes = $loginForm->authenticateUserData() ) { |
77 | 77 | case LoginForm::SUCCESS: |
78 | | - global $wgUser; |
79 | | - |
80 | 78 | $wgUser->setOption( 'rememberpassword', 1 ); |
81 | 79 | $wgUser->setCookies(); |
82 | 80 | |
— | — | @@ -134,7 +132,6 @@ |
135 | 133 | break; |
136 | 134 | |
137 | 135 | case LoginForm::THROTTLED: |
138 | | - global $wgPasswordAttemptThrottle; |
139 | 136 | $result['result'] = 'Throttled'; |
140 | 137 | $result['wait'] = intval( $wgPasswordAttemptThrottle['seconds'] ); |
141 | 138 | break; |
Index: trunk/phase3/includes/api/ApiBase.php |
— | — | @@ -550,6 +550,7 @@ |
551 | 551 | * @returns mixed |
552 | 552 | */ |
553 | 553 | protected function getWatchlistValue ( $watchlist, $titleObj, $userOption = null ) { |
| 554 | + global $wgUser; |
554 | 555 | switch ( $watchlist ) { |
555 | 556 | case 'watch': |
556 | 557 | return true; |
— | — | @@ -558,7 +559,6 @@ |
559 | 560 | return false; |
560 | 561 | |
561 | 562 | case 'preferences': |
562 | | - global $wgUser; |
563 | 563 | # If the user is already watching, don't bother checking |
564 | 564 | if ( $titleObj->userIsWatching() ) { |
565 | 565 | return null; |
Index: trunk/phase3/includes/api/ApiUpload.php |
— | — | @@ -167,6 +167,8 @@ |
168 | 168 | * Performs file verification, dies on error. |
169 | 169 | */ |
170 | 170 | protected function verifyUpload( ) { |
| 171 | + global $wgFileExtensions; |
| 172 | + |
171 | 173 | $verification = $this->mUpload->verifyUpload( ); |
172 | 174 | if ( $verification['status'] === UploadBase::OK ) { |
173 | 175 | return; |
— | — | @@ -184,7 +186,6 @@ |
185 | 187 | $this->dieUsage( 'The file is missing an extension', 'filetype-missing' ); |
186 | 188 | break; |
187 | 189 | case UploadBase::FILETYPE_BADTYPE: |
188 | | - global $wgFileExtensions; |
189 | 190 | $this->dieUsage( 'This type of file is banned', 'filetype-banned', |
190 | 191 | 0, array( |
191 | 192 | 'filetype' => $verification['finalExt'], |
Index: trunk/phase3/includes/Autopromote.php |
— | — | @@ -104,6 +104,7 @@ |
105 | 105 | * @return bool Whether the condition is true for the user |
106 | 106 | */ |
107 | 107 | private static function checkCondition( $cond, User $user ) { |
| 108 | + global $wgEmailAuthentication; |
108 | 109 | if ( count( $cond ) < 1 ) { |
109 | 110 | return false; |
110 | 111 | } |
— | — | @@ -111,7 +112,6 @@ |
112 | 113 | switch( $cond[0] ) { |
113 | 114 | case APCOND_EMAILCONFIRMED: |
114 | 115 | if ( User::isValidEmailAddr( $user->getEmail() ) ) { |
115 | | - global $wgEmailAuthentication; |
116 | 116 | if ( $wgEmailAuthentication ) { |
117 | 117 | return (bool)$user->getEmailAuthenticationTimestamp(); |
118 | 118 | } else { |