Index: trunk/phase3/includes/Setup.php |
— | — | @@ -54,9 +54,10 @@ |
55 | 55 | |
56 | 56 | if( $wgReadOnlyFile === false ) $wgReadOnlyFile = "{$wgUploadDirectory}/lock_yBgMBwiR"; |
57 | 57 | if( $wgFileCacheDirectory === false ) $wgFileCacheDirectory = "{$wgUploadDirectory}/cache"; |
| 58 | +if( $wgDeletedDirectory === false ) $wgDeletedDirectory = "{$wgUploadDirectory}/deleted"; |
58 | 59 | |
59 | | -if ( empty( $wgFileStore['deleted']['directory'] ) ) { |
60 | | - $wgFileStore['deleted']['directory'] = "{$wgUploadDirectory}/deleted"; |
| 60 | +if( isset( $wgFileStore['deleted']['directory'] ) ) { |
| 61 | + $wgDeletedDirectory = $wgFileStore['deleted']['directory']; |
61 | 62 | } |
62 | 63 | |
63 | 64 | /** |
— | — | @@ -80,6 +81,11 @@ |
81 | 82 | * Initialise $wgLocalFileRepo from backwards-compatible settings |
82 | 83 | */ |
83 | 84 | if ( !$wgLocalFileRepo ) { |
| 85 | + if( isset( $wgFileStore['deleted']['hash'] ) ) { |
| 86 | + $deletedHashLevel = $wgFileStore['deleted']['hash']; |
| 87 | + } else { |
| 88 | + $deletedHashLevel = $wgHashedUploadDirectory ? 3 : 0; |
| 89 | + } |
84 | 90 | $wgLocalFileRepo = array( |
85 | 91 | 'class' => 'LocalRepo', |
86 | 92 | 'name' => 'local', |
— | — | @@ -90,8 +96,8 @@ |
91 | 97 | 'hashLevels' => $wgHashedUploadDirectory ? 2 : 0, |
92 | 98 | 'thumbScriptUrl' => $wgThumbnailScriptPath, |
93 | 99 | 'transformVia404' => !$wgGenerateThumbnailOnParse, |
94 | | - 'deletedDir' => $wgFileStore['deleted']['directory'], |
95 | | - 'deletedHashLevels' => $wgFileStore['deleted']['hash'] |
| 100 | + 'deletedDir' => $wgDeletedDirectory, |
| 101 | + 'deletedHashLevels' => $deletedHashLevel |
96 | 102 | ); |
97 | 103 | } |
98 | 104 | /** |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -281,19 +281,16 @@ |
282 | 282 | $wgIllegalFileChars = ":"; |
283 | 283 | |
284 | 284 | /** |
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 |
289 | 286 | */ |
290 | 287 | $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 */ |
296 | 288 | |
297 | 289 | /** |
| 290 | + * What directory to place deleted uploads in |
| 291 | + */ |
| 292 | +$wgDeletedDirectory = false; // Defaults to $wgUploadDirectory/deleted |
| 293 | + |
| 294 | +/** |
298 | 295 | * Set this to true if you use img_auth and want the user to see details on why access failed. |
299 | 296 | */ |
300 | 297 | $wgImgAuthDetails = false; |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -40,6 +40,10 @@ |
41 | 41 | * XmlFunctions.php has been removed. Use the Xml or Html classes as appropriate. |
42 | 42 | * Added $wgSQLMode for setting database SQL modes - either performance (null) |
43 | 43 | 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 |
44 | 48 | |
45 | 49 | === New features in 1.17 === |
46 | 50 | * (bug 10183) Users can now add personal styles and scripts to all skins via |