Index: branches/REL1_19/phase3/skins/simple/main.css |
— | — | @@ -375,6 +375,10 @@ |
376 | 376 | display: none; |
377 | 377 | } |
378 | 378 | |
| 379 | +#footer { |
| 380 | + padding-left: 11.8em; |
| 381 | +} |
| 382 | + |
379 | 383 | #n-portal, |
380 | 384 | #n-currentevents, |
381 | 385 | #n-help, |
Index: branches/REL1_19/phase3/includes/resourceloader/ResourceLoaderUserTokensModule.php |
— | — | @@ -60,11 +60,4 @@ |
61 | 61 | public function getGroup() { |
62 | 62 | return 'private'; |
63 | 63 | } |
64 | | - |
65 | | - /** |
66 | | - * @return array |
67 | | - */ |
68 | | - public function getDependencies() { |
69 | | - return array( 'mediawiki.user' ); |
70 | | - } |
71 | 64 | } |
Index: branches/REL1_19/phase3/includes/resourceloader/ResourceLoaderUserOptionsModule.php |
— | — | @@ -85,11 +85,4 @@ |
86 | 86 | public function getGroup() { |
87 | 87 | return 'private'; |
88 | 88 | } |
89 | | - |
90 | | - /** |
91 | | - * @return array |
92 | | - */ |
93 | | - public function getDependencies() { |
94 | | - return array( 'mediawiki.user' ); |
95 | | - } |
96 | 89 | } |
Index: branches/REL1_19/phase3/includes/Setup.php |
— | — | @@ -361,7 +361,10 @@ |
362 | 362 | $wgCookieSecure = ( substr( $wgServer, 0, 6 ) === 'https:' ); |
363 | 363 | } |
364 | 364 | |
365 | | -if ( $wgDebugToolbar ) { |
| 365 | +// Disable MWDebug for command line mode, this prevents MWDebug from eating up |
| 366 | +// all the memory from logging SQL queries on maintenance scripts |
| 367 | +global $wgCommandLineMode; |
| 368 | +if ( $wgDebugToolbar && !$wgCommandLineMode ) { |
366 | 369 | MWDebug::init(); |
367 | 370 | } |
368 | 371 | |
— | — | @@ -410,7 +413,6 @@ |
411 | 414 | } |
412 | 415 | |
413 | 416 | # Useful debug output |
414 | | -global $wgCommandLineMode; |
415 | 417 | if ( $wgCommandLineMode ) { |
416 | 418 | $wgRequest = new FauxRequest( array() ); |
417 | 419 | |
Index: branches/REL1_19/phase3/includes/UserMailer.php |
— | — | @@ -162,29 +162,52 @@ |
163 | 163 | |
164 | 164 | wfDebug( __METHOD__ . ': sending mail to ' . implode( ', ', $to ) . "\n" ); |
165 | 165 | |
166 | | - $dest = array(); |
| 166 | + # Make sure we have at least one address |
| 167 | + $has_address = false; |
167 | 168 | foreach ( $to as $u ) { |
168 | 169 | if ( $u->address ) { |
169 | | - $dest[] = $u->address; |
| 170 | + $has_address = true; |
| 171 | + break; |
170 | 172 | } |
171 | 173 | } |
172 | | - if ( count( $dest ) == 0 ) { |
| 174 | + if ( !$has_address ) { |
173 | 175 | return Status::newFatal( 'user-mail-no-addy' ); |
174 | 176 | } |
175 | 177 | |
| 178 | + # Forge email headers |
| 179 | + # ------------------- |
| 180 | + # |
| 181 | + # WARNING |
| 182 | + # |
| 183 | + # DO NOT add To: or Subject: headers at this step. They need to be |
| 184 | + # handled differently depending upon the mailer we are going to use. |
| 185 | + # |
| 186 | + # To: |
| 187 | + # PHP mail() first argument is the mail receiver. The argument is |
| 188 | + # used as a recipient destination and as a To header. |
| 189 | + # |
| 190 | + # PEAR mailer has a recipient argument which is only used to |
| 191 | + # send the mail. If no To header is given, PEAR will set it to |
| 192 | + # to 'undisclosed-recipients:'. |
| 193 | + # |
| 194 | + # NOTE: To: is for presentation, the actual recipient is specified |
| 195 | + # by the mailer using the Rcpt-To: header. |
| 196 | + # |
| 197 | + # Subject: |
| 198 | + # PHP mail() second argument to pass the subject, passing a Subject |
| 199 | + # as an additional header will result in a duplicate header. |
| 200 | + # |
| 201 | + # PEAR mailer should be passed a Subject header. |
| 202 | + # |
| 203 | + # -- hashar 20120218 |
| 204 | + |
176 | 205 | $headers['From'] = $from->toString(); |
177 | 206 | $headers['Return-Path'] = $from->address; |
178 | | - if ( count( $to ) == 1 ) { |
179 | | - $headers['To'] = $to[0]->toString(); |
180 | | - } else { |
181 | | - $headers['To'] = 'undisclosed-recipients:;'; |
182 | | - } |
183 | 207 | |
184 | 208 | if ( $replyto ) { |
185 | 209 | $headers['Reply-To'] = $replyto->toString(); |
186 | 210 | } |
187 | 211 | |
188 | | - $headers['Subject'] = self::quotedPrintable( $subject ); |
189 | 212 | $headers['Date'] = date( 'r' ); |
190 | 213 | $headers['MIME-Version'] = '1.0'; |
191 | 214 | $headers['Content-type'] = ( is_null( $contentType ) ? |
— | — | @@ -202,6 +225,10 @@ |
203 | 226 | } |
204 | 227 | |
205 | 228 | if ( is_array( $wgSMTP ) ) { |
| 229 | + # |
| 230 | + # PEAR MAILER |
| 231 | + # |
| 232 | + |
206 | 233 | if ( function_exists( 'stream_resolve_include_path' ) ) { |
207 | 234 | $found = stream_resolve_include_path( 'Mail.php' ); |
208 | 235 | } else { |
— | — | @@ -223,9 +250,20 @@ |
224 | 251 | } |
225 | 252 | |
226 | 253 | wfDebug( "Sending mail via PEAR::Mail\n" ); |
227 | | - $chunks = array_chunk( $dest, $wgEnotifMaxRecips ); |
| 254 | + |
| 255 | + $headers['Subject'] = self::quotedPrintable( $subject ); |
| 256 | + |
| 257 | + # When sending only to one recipient, shows it its email using To: |
| 258 | + if ( count( $to ) == 1 ) { |
| 259 | + $headers['To'] = $to[0]->toString(); |
| 260 | + } |
| 261 | + |
| 262 | + # Split jobs since SMTP servers tends to limit the maximum |
| 263 | + # number of possible recipients. |
| 264 | + $chunks = array_chunk( $to, $wgEnotifMaxRecips ); |
228 | 265 | foreach ( $chunks as $chunk ) { |
229 | 266 | $status = self::sendWithPear( $mail_object, $chunk, $headers, $body ); |
| 267 | + # FIXME : some chunks might be sent while others are not! |
230 | 268 | if ( !$status->isOK() ) { |
231 | 269 | wfRestoreWarnings(); |
232 | 270 | return $status; |
— | — | @@ -234,6 +272,10 @@ |
235 | 273 | wfRestoreWarnings(); |
236 | 274 | return Status::newGood(); |
237 | 275 | } else { |
| 276 | + # |
| 277 | + # PHP mail() |
| 278 | + # |
| 279 | + |
238 | 280 | # Line endings need to be different on Unix and Windows due to |
239 | 281 | # the bug described at http://trac.wordpress.org/ticket/2603 |
240 | 282 | if ( wfIsWindows() ) { |
— | — | @@ -243,6 +285,9 @@ |
244 | 286 | $endl = "\n"; |
245 | 287 | } |
246 | 288 | |
| 289 | + if( count($to) > 1 ) { |
| 290 | + $headers['To'] = 'undisclosed-recipients:;'; |
| 291 | + } |
247 | 292 | $headers = self::arrayToHeaderString( $headers, $endl ); |
248 | 293 | |
249 | 294 | wfDebug( "Sending mail via internal mail() function\n" ); |
— | — | @@ -253,7 +298,7 @@ |
254 | 299 | set_error_handler( 'UserMailer::errorHandler' ); |
255 | 300 | |
256 | 301 | $safeMode = wfIniGetBool( 'safe_mode' ); |
257 | | - foreach ( $dest as $recip ) { |
| 302 | + foreach ( $to as $recip ) { |
258 | 303 | if ( $safeMode ) { |
259 | 304 | $sent = mail( $recip, self::quotedPrintable( $subject ), $body, $headers ); |
260 | 305 | } else { |
Property changes on: branches/REL1_19/phase3/includes |
___________________________________________________________________ |
Modified: svn:mergeinfo |
261 | 306 | Merged /trunk/phase3/includes:r111695,111697,111832,112021 |
Index: branches/REL1_19/phase3/resources/mediawiki/mediawiki.user.js |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | /** |
9 | 9 | * User object |
10 | 10 | */ |
11 | | - function User() { |
| 11 | + function User( options, tokens ) { |
12 | 12 | |
13 | 13 | /* Private Members */ |
14 | 14 | |
— | — | @@ -15,9 +15,9 @@ |
16 | 16 | |
17 | 17 | /* Public Members */ |
18 | 18 | |
19 | | - this.options = new mw.Map(); |
| 19 | + this.options = options || new mw.Map(); |
20 | 20 | |
21 | | - this.tokens = new mw.Map(); |
| 21 | + this.tokens = tokens || new mw.Map(); |
22 | 22 | |
23 | 23 | /* Public Methods */ |
24 | 24 | |
— | — | @@ -176,6 +176,8 @@ |
177 | 177 | }; |
178 | 178 | } |
179 | 179 | |
180 | | - mw.user = new User(); |
| 180 | + // Extend the skeleton mw.user from mediawiki.js |
| 181 | + // This is kind of ugly but we're stuck with this for b/c reasons |
| 182 | + mw.user = new User( mw.user.options, mw.user.tokens ); |
181 | 183 | |
182 | 184 | })(jQuery); |
\ No newline at end of file |
Index: branches/REL1_19/phase3/resources/mediawiki/mediawiki.js |
— | — | @@ -648,17 +648,21 @@ |
649 | 649 | |
650 | 650 | done = true; |
651 | 651 | |
652 | | - // Handle memory leak in IE |
653 | | - script.onload = script.onreadystatechange = null; |
654 | | - |
655 | 652 | callback(); |
656 | 653 | |
657 | | - if ( script.parentNode ) { |
658 | | - script.parentNode.removeChild( script ); |
659 | | - } |
660 | | - |
661 | | - // Dereference the script |
662 | | - script = undefined; |
| 654 | + // Handle memory leak in IE. This seems to fail in |
| 655 | + // IE7 sometimes (Permission Denied error when |
| 656 | + // accessing script.parentNode) so wrap it in |
| 657 | + // a try catch. |
| 658 | + try { |
| 659 | + script.onload = script.onreadystatechange = null; |
| 660 | + if ( script.parentNode ) { |
| 661 | + script.parentNode.removeChild( script ); |
| 662 | + } |
| 663 | + |
| 664 | + // Dereference the script |
| 665 | + script = undefined; |
| 666 | + } catch ( e ) { } |
663 | 667 | } |
664 | 668 | }; |
665 | 669 | } |
— | — | @@ -1419,7 +1423,13 @@ |
1420 | 1424 | return s; |
1421 | 1425 | } |
1422 | 1426 | }; |
1423 | | - })() |
| 1427 | + })(), |
| 1428 | + |
| 1429 | + // Skeleton user object. mediawiki.user.js extends this |
| 1430 | + user: { |
| 1431 | + options: new Map(), |
| 1432 | + tokens: new Map() |
| 1433 | + } |
1424 | 1434 | }; |
1425 | 1435 | |
1426 | 1436 | })( jQuery ); |
Property changes on: branches/REL1_19/phase3 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1427 | 1437 | Merged /trunk/phase3:r111580,111695,111697,111832,112021 |