Manual:$wgSaveDeletedFiles

From MediaWiki.org
Jump to: navigation, search
This page is a translated version of the page Manual:$wgSaveDeletedFiles and the translation is 44% complete.

Other languages:
English • ‎français • ‎日本語 • ‎polski
Uploads: $wgSaveDeletedFiles
Indicates that deleted images are to be stored for later undeletion.
導入されたバージョン: 1.7.0 (r14777)
除去されたバージョン: 1.11.0
可能な値: 真偽値
既定値: false
他の設定: アルファベット順 | 機能順

詳細

This setting specifies that files that are deleted via the wiki interface should not be physically removed from the disk, but instead moved out of the way and marked as 'deleted' in the database (in the same way wiki pages are).

MediaWiki 1.11.0 以降

This setting was removed in MediaWiki 1.11.0 as the option is now enabled unconditionally.

以前のバージョン

Prior to MediaWiki 1.11.0, deleted files were simply discarded by default. To save them and make it possible to undelete images:

  1. create a directory which is writable to the web server, but not exposed to the Internet
  2. $wgSaveDeletedFilestrue を設定
  3. Set up the save path in $wgFileStoreManual:$wgFileStore['deleted']['directory']

Here are the default settings, which disable all support for undeletion:

$wgSaveDeletedFiles = false;
$wgFileStore['deleted']['directory'] = null;

Here are the modified settings, which store all deleted images in /var/wiki/private/deleted:

$wgSaveDeletedFiles = true;
$wgFileStore['deleted']['directory'] = "/var/wiki/private/deleted";