global $wgExternalDiffEngine;
if ( $wgExternalDiffEngine == 'wikidiff' && !function_exists( 'wikidiff_do_diff' ) ) {
wfProfileIn( __METHOD__ . '-php_wikidiff.so' );
- @dl( 'php_wikidiff.so' );
+ wfSuppressWarnings();
+ dl( 'php_wikidiff.so' );
+ wfRestoreWarnings();
wfProfileOut( __METHOD__ . '-php_wikidiff.so' );
}
else if ( $wgExternalDiffEngine == 'wikidiff2' && !function_exists( 'wikidiff2_do_diff' ) ) {
wfProfileIn( __METHOD__ . '-php_wikidiff2.so' );
- @dl( 'php_wikidiff2.so' );
+ wfSuppressWarnings();
+ dl( 'php_wikidiff2.so' );
+ wfRestoreWarnings();
wfProfileOut( __METHOD__ . '-php_wikidiff2.so' );
}
}
}
}
if ( $good ) {
- @chmod( $dstPath, $this->fileMode );
+ $this->chmod( $dstPath );
$status->successCount++;
} else {
$status->failCount++;
$status->successCount++;
wfDebug(__METHOD__.": wrote tempfile $srcPath to $dstPath\n");
// Thread-safe override for umask
- @chmod( $dstPath, $this->fileMode );
+ $this->chmod( $dstPath );
} else {
$status->failCount++;
}
$status->error( 'filerenameerror', $srcPath, $archivePath );
$good = false;
} else {
- @chmod( $archivePath, $this->fileMode );
+ $this->chmod( $archivePath );
}
}
if ( $good ) {
}
return strtr( $param, $this->simpleCleanPairs );
}
+
+ /**
+ * Chmod a file, supressing the warnings.
+ * @param String $path The path to change
+ */
+ protected function chmod( $path ) {
+ wfSuppressWarnings();
+ chmod( $path, $this->fileMode );
+ wfRestoreWarnings();
+ }
}