From 65517fd5ff26cd0ab57bbc96cc5bda2358c19098 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Fri, 18 Jul 2008 18:03:50 +0000 Subject: [PATCH] $wgDefaultDirectoryChmod -> $wgDirectoryMode. Less crappy name + docs I should've written on the original commit. --- RELEASE-NOTES | 2 ++ includes/DefaultSettings.php | 2 +- includes/GlobalFunctions.php | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 420e5baf53..65e60dfe19 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -66,6 +66,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN provided by extensions, in a similar way to $wgExtensionMessagesFiles * Added $wgXMLMimeTypes, an array of XML mimetypes we can check for with MimeMagic. +* Added $wgDirectoryMode, which allows for setting the default CHMOD value when + creating new directories. === New features in 1.13 === diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index eb60744613..72e115a30a 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -165,7 +165,7 @@ $wgUploadBaseUrl = ""; /** * Default value for chmoding of new directories. */ -$wgDefaultDirectoryChmod = 0777; +$wgDirectoryMode = 0777; /** * New file storage paths; currently used only for deleted files. diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 382c101d00..86bbdc6ae3 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1771,18 +1771,18 @@ function wfTempDir() { * Make directory, and make all parent directories if they don't exist * * @param string $fullDir Full path to directory to create - * @param int $mode Chmod value to use, default is $wgDefaultDirectoryChmod + * @param int $mode Chmod value to use, default is $wgDirectoryMode * @return bool */ function wfMkdirParents( $fullDir, $mode = null ) { - global $wgDefaultDirectoryChmod; + global $wgDirectoryMode; if( strval( $fullDir ) === '' ) return true; if( file_exists( $fullDir ) ) return true; // If not defined or isn't an int, set to default if ( !$mode || !is_int($mode) ) { - $mode = $wgDefaultDirectoryChmod; + $mode = $wgDirectoryMode; } -- 2.20.1