Manual:protect.php

From Linux Web Expert

Détails

Le fichier protect.php est un script de maintenance qui gère la (non)protection des pages.

Options et arguments

This script takes the title of the page as the first argument.

Tip: Spaces inside a title must be replaced with underscores ( _ ), or use double quotation marks like "Foo Bar"


This script accepts these options:

Option Obligatoire Valeur par défaut
--unprotect Removes protection <translate> Optional</translate>
--semiprotect Adds semi-protection <translate> Optional</translate>
--cascade Add cascading protection <translate> Optional</translate>
--user Username to protect with <translate> Optional</translate>
--reason Reason for un/protection <translate> Optional</translate>

Utilisation

php maintenance/protect.php title [ --unprotect| --semiprotect| --cascade| --user| --reason ]

Allowing only autoconfirmed users to edit the page

Terminal

Allowing only sysop users to edit the page

Terminal


Removing protection from a page

Terminal

Protecting a page as username "Foo"

If you don't pass the --user option to the script, it will perform the action with user User:Maintenance script.

Terminal

Voir aussi