Index: trunk/phase3/includes/upload/UploadFromUrl.php |
— | — | @@ -2,9 +2,9 @@ |
3 | 3 | /** |
4 | 4 | * @file |
5 | 5 | * @ingroup upload |
6 | | - * |
| 6 | + * |
7 | 7 | * Implements uploading from a HTTP resource. |
8 | | - * |
| 8 | + * |
9 | 9 | * @author Bryan Tong Minh |
10 | 10 | * @author Michael Dale |
11 | 11 | */ |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | protected $mTempDownloadPath; |
14 | 14 | |
15 | 15 | /** |
16 | | - * Checks if the user is allowed to use the upload-by-URL feature. If the |
| 16 | + * Checks if the user is allowed to use the upload-by-URL feature. If the |
17 | 17 | * user is allowed, pass on permissions checking to the parent. |
18 | 18 | */ |
19 | 19 | public static function isAllowed( $user ) { |
— | — | @@ -29,8 +29,8 @@ |
30 | 30 | return $wgAllowCopyUploads && parent::isEnabled(); |
31 | 31 | } |
32 | 32 | |
33 | | - /** |
34 | | - * Entry point for API upload |
| 33 | + /** |
| 34 | + * Entry point for API upload |
35 | 35 | */ |
36 | 36 | public function initialize( $name, $url, $na, $nb = false ) { |
37 | 37 | global $wgTmpDirectory; |
— | — | @@ -51,7 +51,7 @@ |
52 | 52 | $desiredDestName = $request->getText( 'wpUploadFileURL' ); |
53 | 53 | return $this->initialize( |
54 | 54 | $desiredDestName, |
55 | | - $request->getVal( 'wpUploadFileURL' ), |
| 55 | + $request->getVal( 'wpUploadFileURL' ), |
56 | 56 | false |
57 | 57 | ); |
58 | 58 | } |
— | — | @@ -70,7 +70,7 @@ |
71 | 71 | // Only allow HTTP or FTP for now |
72 | 72 | return (bool)preg_match( '!^(http://|ftp://)!', $url ); |
73 | 73 | } |
74 | | - |
| 74 | + |
75 | 75 | /** |
76 | 76 | * Do the real fetching stuff |
77 | 77 | */ |
— | — | @@ -84,7 +84,7 @@ |
85 | 85 | } |
86 | 86 | return Status::newGood(); |
87 | 87 | } |
88 | | - |
| 88 | + |
89 | 89 | /** |
90 | 90 | * Safe copy from URL |
91 | 91 | * Returns true if there was an error, false otherwise |
— | — | @@ -111,13 +111,13 @@ |
112 | 112 | |
113 | 113 | fclose( $this->mCurlDestHandle ); |
114 | 114 | unset( $this->mCurlDestHandle ); |
115 | | - |
116 | | - if( $error ) |
| 115 | + |
| 116 | + if( $error ) |
117 | 117 | return "upload-curl-error$errornum"; |
118 | 118 | |
119 | 119 | return true; |
120 | 120 | } |
121 | | - |
| 121 | + |
122 | 122 | /** |
123 | 123 | * Callback function for CURL-based web transfer |
124 | 124 | * Write data to file unless we've passed the length limit; |
— | — | @@ -127,7 +127,7 @@ |
128 | 128 | function uploadCurlCallback( $ch, $data ) { |
129 | 129 | global $wgMaxUploadSize; |
130 | 130 | $length = strlen( $data ); |
131 | | - $this->mFileSize += $length; |
| 131 | + $this->mFileSize += $length; |
132 | 132 | if( $this->mFileSize > $wgMaxUploadSize ) { |
133 | 133 | return 0; |
134 | 134 | } |
Index: trunk/phase3/includes/MessageCache.php |
— | — | @@ -256,7 +256,7 @@ |
257 | 257 | |
258 | 258 | $this->lock($cacheKey); |
259 | 259 | |
260 | | - # Limit the concurrency of loadFromDB to a single process |
| 260 | + # Limit the concurrency of loadFromDB to a single process |
261 | 261 | # This prevents the site from going down when the cache expires |
262 | 262 | $statusKey = wfMemcKey( 'messages', $code, 'status' ); |
263 | 263 | $success = $this->mMemc->add( $statusKey, 'loading', MSG_LOAD_TIMEOUT ); |
— | — | @@ -562,7 +562,7 @@ |
563 | 563 | } |
564 | 564 | |
565 | 565 | # Fix whitespace |
566 | | - $message = strtr( $message, |
| 566 | + $message = strtr( $message, |
567 | 567 | array( |
568 | 568 | # Fix for trailing whitespace, removed by textarea |
569 | 569 | ' ' => ' ', |
— | — | @@ -677,7 +677,7 @@ |
678 | 678 | |
679 | 679 | function disable() { $this->mDisable = true; } |
680 | 680 | function enable() { $this->mDisable = false; } |
681 | | - |
| 681 | + |
682 | 682 | /** @deprecated */ |
683 | 683 | function disableTransform(){ |
684 | 684 | wfDeprecated( __METHOD__ ); |
Index: trunk/phase3/includes/Namespace.php |
— | — | @@ -46,8 +46,8 @@ |
47 | 47 | class MWNamespace { |
48 | 48 | |
49 | 49 | /** |
50 | | - * These namespaces should always be first-letter capitalized, now and |
51 | | - * forevermore. Historically, they could've probably been lowercased too, |
| 50 | + * These namespaces should always be first-letter capitalized, now and |
| 51 | + * forevermore. Historically, they could've probably been lowercased too, |
52 | 52 | * but some things are just too ingrained now. :) |
53 | 53 | */ |
54 | 54 | private static $alwaysCapitalizedNamespaces = array( NS_SPECIAL, NS_USER, NS_MEDIAWIKI ); |
— | — | @@ -107,7 +107,7 @@ |
108 | 108 | ? $index - 1 |
109 | 109 | : $index; |
110 | 110 | } |
111 | | - |
| 111 | + |
112 | 112 | /** |
113 | 113 | * Returns whether the specified namespace exists |
114 | 114 | */ |
— | — | @@ -162,7 +162,7 @@ |
163 | 163 | * @return bool |
164 | 164 | */ |
165 | 165 | public static function canTalk( $index ) { |
166 | | - return $index >= NS_MAIN; |
| 166 | + return $index >= NS_MAIN; |
167 | 167 | } |
168 | 168 | |
169 | 169 | /** |
— | — | @@ -197,10 +197,10 @@ |
198 | 198 | global $wgNamespacesWithSubpages; |
199 | 199 | return !empty( $wgNamespacesWithSubpages[$index] ); |
200 | 200 | } |
201 | | - |
| 201 | + |
202 | 202 | /** |
203 | 203 | * Is the namespace first-letter capitalized? |
204 | | - * |
| 204 | + * |
205 | 205 | * @param $index int Index to check |
206 | 206 | * @return bool |
207 | 207 | */ |
— | — | @@ -208,10 +208,10 @@ |
209 | 209 | global $wgCapitalLinks, $wgCapitalLinkOverrides; |
210 | 210 | // Turn NS_MEDIA into NS_FILE |
211 | 211 | $index = $index === NS_MEDIA ? NS_FILE : $index; |
212 | | - |
| 212 | + |
213 | 213 | // Make sure to get the subject of our namespace |
214 | 214 | $index = self::getSubject( $index ); |
215 | | - |
| 215 | + |
216 | 216 | // Some namespaces are special and should always be upper case |
217 | 217 | if ( in_array( $index, self::$alwaysCapitalizedNamespaces ) ) { |
218 | 218 | return true; |