r69007 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69006‎ | r69007 | r69008 >
Date:15:56, 4 July 2010
Author:demon
Status:ok
Tags:
Comment:
Deprecated $wgFileStore in favor of $wgDeletedDirectory. Included b/c code for wikis with $wgFileStore still set
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/Setup.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Setup.php
@@ -54,9 +54,10 @@
5555
5656 if( $wgReadOnlyFile === false ) $wgReadOnlyFile = "{$wgUploadDirectory}/lock_yBgMBwiR";
5757 if( $wgFileCacheDirectory === false ) $wgFileCacheDirectory = "{$wgUploadDirectory}/cache";
 58+if( $wgDeletedDirectory === false ) $wgDeletedDirectory = "{$wgUploadDirectory}/deleted";
5859
59 -if ( empty( $wgFileStore['deleted']['directory'] ) ) {
60 - $wgFileStore['deleted']['directory'] = "{$wgUploadDirectory}/deleted";
 60+if( isset( $wgFileStore['deleted']['directory'] ) ) {
 61+ $wgDeletedDirectory = $wgFileStore['deleted']['directory'];
6162 }
6263
6364 /**
@@ -80,6 +81,11 @@
8182 * Initialise $wgLocalFileRepo from backwards-compatible settings
8283 */
8384 if ( !$wgLocalFileRepo ) {
 85+ if( isset( $wgFileStore['deleted']['hash'] ) ) {
 86+ $deletedHashLevel = $wgFileStore['deleted']['hash'];
 87+ } else {
 88+ $deletedHashLevel = $wgHashedUploadDirectory ? 3 : 0;
 89+ }
8490 $wgLocalFileRepo = array(
8591 'class' => 'LocalRepo',
8692 'name' => 'local',
@@ -90,8 +96,8 @@
9197 'hashLevels' => $wgHashedUploadDirectory ? 2 : 0,
9298 'thumbScriptUrl' => $wgThumbnailScriptPath,
9399 'transformVia404' => !$wgGenerateThumbnailOnParse,
94 - 'deletedDir' => $wgFileStore['deleted']['directory'],
95 - 'deletedHashLevels' => $wgFileStore['deleted']['hash']
 100+ 'deletedDir' => $wgDeletedDirectory,
 101+ 'deletedHashLevels' => $deletedHashLevel
96102 );
97103 }
98104 /**
Index: trunk/phase3/includes/DefaultSettings.php
@@ -281,19 +281,16 @@
282282 $wgIllegalFileChars = ":";
283283
284284 /**
285 - * New file storage paths; currently used only for deleted files.
286 - * Set it like this:
287 - *
288 - * $wgFileStore['deleted']['directory'] = '/var/wiki/private/deleted';
 285+ * @deprecated use $wgDeletedDirectory
289286 */
290287 $wgFileStore = array();
291 -/** @cond file_level_code */
292 -$wgFileStore['deleted']['directory'] = false; // Defaults to $wgUploadDirectory/deleted
293 -$wgFileStore['deleted']['url'] = null; // Private
294 -$wgFileStore['deleted']['hash'] = 3; // 3-level subdirectory split
295 -/** @endcond */
296288
297289 /**
 290+ * What directory to place deleted uploads in
 291+ */
 292+$wgDeletedDirectory = false; // Defaults to $wgUploadDirectory/deleted
 293+
 294+/**
298295 * Set this to true if you use img_auth and want the user to see details on why access failed.
299296 */
300297 $wgImgAuthDetails = false;
Index: trunk/phase3/RELEASE-NOTES
@@ -40,6 +40,10 @@
4141 * XmlFunctions.php has been removed. Use the Xml or Html classes as appropriate.
4242 * Added $wgSQLMode for setting database SQL modes - either performance (null)
4343 or other reasons (such as enabling stricter checks)
 44+* $wgFileStore has been deprecated. The only usage $wgFileStore['deleted'] has
 45+ been turned into $wgDeletedDirectory
 46+* $wgDeletedDirectory has been added to specify what directory to place deleted
 47+ uploads in
4448
4549 === New features in 1.17 ===
4650 * (bug 10183) Users can now add personal styles and scripts to all skins via

Follow-up revisions

RevisionCommit summaryAuthorDate
r69105Followup r69007, use $wgDeletedDirectory since it exists nowdemon19:06, 6 July 2010

Status & tagging log