Manual:Protect.php

This page is a translated version of the page Manual:Protect.php and the translation is 67% complete.

Detalles

protect.php file is a maintenance script that handles protecting and unprotecting a page.

Options/Arguments

protect.php takes title as their first argument on which you want to do action.


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


protect.php accepts following five others options as well.

Option Required Default value
--unprotect Removes protection false
--semiprotect Adds semi-protection false
--cascade Add cascading protection false
--user Username to protect with false
--reason Reason for un/protection false


Usage

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

Allowing at-least autoconfirmed users to edit the page

Terminal


Allowing only sysop users to edit the page

Terminal


Removing protection from a page

Terminal


Doing action with username "Foo"

if you don't pass --user option to script then it will do action with user User:Maintenance script.

Terminal

See also