Index: trunk/phase3/includes/diff/DifferenceEngine.php |
— | — | @@ -625,12 +625,16 @@ |
626 | 626 | global $wgExternalDiffEngine; |
627 | 627 | if ( $wgExternalDiffEngine == 'wikidiff' && !function_exists( 'wikidiff_do_diff' ) ) { |
628 | 628 | wfProfileIn( __METHOD__ . '-php_wikidiff.so' ); |
629 | | - @dl( 'php_wikidiff.so' ); |
| 629 | + wfSuppressWarnings(); |
| 630 | + dl( 'php_wikidiff.so' ); |
| 631 | + wfRestoreWarnings(); |
630 | 632 | wfProfileOut( __METHOD__ . '-php_wikidiff.so' ); |
631 | 633 | } |
632 | 634 | else if ( $wgExternalDiffEngine == 'wikidiff2' && !function_exists( 'wikidiff2_do_diff' ) ) { |
633 | 635 | wfProfileIn( __METHOD__ . '-php_wikidiff2.so' ); |
634 | | - @dl( 'php_wikidiff2.so' ); |
| 636 | + wfSuppressWarnings(); |
| 637 | + dl( 'php_wikidiff2.so' ); |
| 638 | + wfRestoreWarnings(); |
635 | 639 | wfProfileOut( __METHOD__ . '-php_wikidiff2.so' ); |
636 | 640 | } |
637 | 641 | } |
Index: trunk/phase3/includes/filerepo/FSRepo.php |
— | — | @@ -204,7 +204,7 @@ |
205 | 205 | } |
206 | 206 | } |
207 | 207 | if ( $good ) { |
208 | | - @chmod( $dstPath, $this->fileMode ); |
| 208 | + $this->chmod( $dstPath ); |
209 | 209 | $status->successCount++; |
210 | 210 | } else { |
211 | 211 | $status->failCount++; |
— | — | @@ -390,7 +390,7 @@ |
391 | 391 | $status->successCount++; |
392 | 392 | wfDebug(__METHOD__.": wrote tempfile $srcPath to $dstPath\n"); |
393 | 393 | // Thread-safe override for umask |
394 | | - @chmod( $dstPath, $this->fileMode ); |
| 394 | + $this->chmod( $dstPath ); |
395 | 395 | } else { |
396 | 396 | $status->failCount++; |
397 | 397 | } |
— | — | @@ -467,7 +467,7 @@ |
468 | 468 | $status->error( 'filerenameerror', $srcPath, $archivePath ); |
469 | 469 | $good = false; |
470 | 470 | } else { |
471 | | - @chmod( $archivePath, $this->fileMode ); |
| 471 | + $this->chmod( $archivePath ); |
472 | 472 | } |
473 | 473 | } |
474 | 474 | if ( $good ) { |
— | — | @@ -561,5 +561,15 @@ |
562 | 562 | } |
563 | 563 | return strtr( $param, $this->simpleCleanPairs ); |
564 | 564 | } |
| 565 | + |
| 566 | + /** |
| 567 | + * Chmod a file, supressing the warnings. |
| 568 | + * @param String $path The path to change |
| 569 | + */ |
| 570 | + protected function chmod( $path ) { |
| 571 | + wfSuppressWarnings(); |
| 572 | + chmod( $path, $this->fileMode ); |
| 573 | + wfRestoreWarnings(); |
| 574 | + } |
565 | 575 | |
566 | 576 | } |