* (bug 18222) $wgMinimalPasswordLength default is now 1
* $wgSessionHandler can be used to configure session.save_handler
+* $wgLocalFileRepo/$wgForeignFileRepos now have a 'fileMode' parameter to
+ be used when uploading/moving files
=== New features in 1.16 ===
* (bug 6802) profileinfo.php now also work on other database servers than MySQL
* (bug 16925) Diffs no longer fail when $wgExternalDiffEngine is set to 'wikidiff'
or 'wikidiff2' but extension is not installed
-
+* (bug 18326) Chmod errors in file repos have been hidden
== API changes in 1.16 ==
* May be 'paranoid' to remove all parameters from error messages, 'none' to
* leave the paths in unchanged, or 'simple' to replace paths with
* placeholders. Default for LocalRepo is 'simple'.
+ * fileMode This allows wikis to set the file mode when uploading/moving files. Default
+ * is 0644.
*
* These settings describe a foreign MediaWiki installation. They are optional, and will be ignored
* for local repositories:
* @ingroup FileRepo
*/
class FSRepo extends FileRepo {
- var $directory, $deletedDir, $url, $deletedHashLevels;
+ var $directory, $deletedDir, $url, $deletedHashLevels, $fileMode;
var $fileFactory = array( 'UnregisteredLocalFile', 'newFromTitle' );
var $oldFileFactory = false;
var $pathDisclosureProtection = 'simple';
$this->deletedHashLevels = isset( $info['deletedHashLevels'] ) ?
$info['deletedHashLevels'] : $this->hashLevels;
$this->deletedDir = isset( $info['deletedDir'] ) ? $info['deletedDir'] : false;
+ $this->fileMode = isset( $info['fileMode'] ) ? $info['fileMode'] : 0644;
}
/**
}
}
if ( $good ) {
- chmod( $dstPath, 0644 );
+ @chmod( $dstPath, $this->fileMode );
$status->successCount++;
} else {
$status->failCount++;
$status->successCount++;
wfDebug(__METHOD__.": wrote tempfile $srcPath to $dstPath\n");
// Thread-safe override for umask
- chmod( $dstPath, 0644 );
+ @chmod( $dstPath, $this->fileMode );
} else {
$status->failCount++;
}
$status->error( 'filerenameerror', $srcPath, $archivePath );
$good = false;
} else {
- @chmod( $archivePath, 0644 );
+ @chmod( $archivePath, $this->fileMode );
}
}
if ( $good ) {