Manual:cleanupPreferences.php
From Linux Web Expert
<td class="mw-version-versionbox" title="<translate nowrap> The latest stable version is <tvar name=1>1.41</tvar></translate>">
<translate> ≥</translate> 1.20
<translate> MediaWiki version:</translate> |
MediaWiki file: cleanupPreferences.php | |
---|---|
Location: | maintenance/ |
Source code: | master • 1.41.1 • 1.40.3 • 1.39.7 |
Classes: | CleanupPreferences |
Details
cleanupPreferences.php file is a maintenance script to delete user preference values which are hidden by $wgHiddenPrefs , or those that are unknown (e.g. were added by a since-uninstalled extension).
It contains the DeleteUnknownPreferences hook.
Options/Arguments
Option | Description | Required? |
---|---|---|
--dry-run | Print debug info instead of actually deleting | <translate> Optional</translate> |
--hidden | Drop hidden preferences ($wgHiddenPrefs ) |
<translate> Optional</translate> |
--unknown | Drop unknown preferences (not in $wgDefaultUserOptions or prefixed with "userjs-" )
|
<translate> Optional</translate> |
Usage
php maintenance/cleanupPreferences.php [ --dry-run| --hidden| --unknown ]
Terminal
$ php maintenance/cleanupPreferences.php --unknown Dropping unknown preferences... ..doing 4 entries DONE! (handled 4 entries)