maintenance/populateContentModel.php 1 location
|
@@ 31-37 (lines=7) @@
|
| 28 |
|
* populateContentModel.php --ns=1 --table=page |
| 29 |
|
*/ |
| 30 |
|
class PopulateContentModel extends Maintenance { |
| 31 |
|
public function __construct() { |
| 32 |
|
parent::__construct(); |
| 33 |
|
$this->addDescription( 'Populate the various content_* fields' ); |
| 34 |
|
$this->addOption( 'ns', 'Namespace to run in, or "all" for all namespaces', true, true ); |
| 35 |
|
$this->addOption( 'table', 'Table to run in', true, true ); |
| 36 |
|
$this->setBatchSize( 100 ); |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
public function execute() { |
| 40 |
|
$dbw = $this->getDB( DB_MASTER ); |
maintenance/wrapOldPasswords.php 1 location
|
@@ 33-40 (lines=8) @@
|
| 30 |
|
* @ingroup Maintenance |
| 31 |
|
*/ |
| 32 |
|
class WrapOldPasswords extends Maintenance { |
| 33 |
|
public function __construct() { |
| 34 |
|
parent::__construct(); |
| 35 |
|
$this->addDescription( 'Wrap all passwords of a certain type in a new layered type' ); |
| 36 |
|
$this->addOption( 'type', |
| 37 |
|
'Password type to wrap passwords in (must inherit LayeredParameterizedPassword)', true, true ); |
| 38 |
|
$this->addOption( 'verbose', 'Enables verbose output', false, false, 'v' ); |
| 39 |
|
$this->setBatchSize( 100 ); |
| 40 |
|
} |
| 41 |
|
|
| 42 |
|
public function execute() { |
| 43 |
|
global $wgAuth; |
maintenance/rebuildrecentchanges.php 1 location
|
@@ 39-56 (lines=18) @@
|
| 36 |
|
/** @var integer UNIX timestamp */ |
| 37 |
|
private $cutoffTo; |
| 38 |
|
|
| 39 |
|
public function __construct() { |
| 40 |
|
parent::__construct(); |
| 41 |
|
$this->addDescription( 'Rebuild recent changes' ); |
| 42 |
|
|
| 43 |
|
$this->addOption( |
| 44 |
|
'from', |
| 45 |
|
"Only rebuild rows in requested time range (in YYYYMMDDHHMMSS format)", |
| 46 |
|
false, |
| 47 |
|
true |
| 48 |
|
); |
| 49 |
|
$this->addOption( |
| 50 |
|
'to', |
| 51 |
|
"Only rebuild rows in requested time range (in YYYYMMDDHHMMSS format)", |
| 52 |
|
false, |
| 53 |
|
true |
| 54 |
|
); |
| 55 |
|
$this->setBatchSize( 200 ); |
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
public function execute() { |
| 59 |
|
if ( |
maintenance/invalidateUserSessions.php 1 location
|
@@ 37-45 (lines=9) @@
|
| 34 |
|
* @ingroup Maintenance |
| 35 |
|
*/ |
| 36 |
|
class InvalidateUserSesssions extends Maintenance { |
| 37 |
|
public function __construct() { |
| 38 |
|
parent::__construct(); |
| 39 |
|
$this->addDescription( |
| 40 |
|
'Invalidate the sessions of certain users on the wiki.' |
| 41 |
|
); |
| 42 |
|
$this->addOption( 'user', 'Username', false, true, 'u' ); |
| 43 |
|
$this->addOption( 'file', 'File with one username per line', false, true, 'f' ); |
| 44 |
|
$this->setBatchSize( 1000 ); |
| 45 |
|
} |
| 46 |
|
|
| 47 |
|
public function execute() { |
| 48 |
|
$username = $this->getOption( 'user' ); |
maintenance/resetUserTokens.php 1 location
|
@@ 36-50 (lines=15) @@
|
| 33 |
|
* @deprecated since 1.27, use $wgAuthenticationTokenVersion instead. |
| 34 |
|
*/ |
| 35 |
|
class ResetUserTokens extends Maintenance { |
| 36 |
|
public function __construct() { |
| 37 |
|
parent::__construct(); |
| 38 |
|
$this->addDescription( |
| 39 |
|
"Reset the user_token of all users on the wiki. Note that this may log some of them out.\n" |
| 40 |
|
. "Deprecated, use \$wgAuthenticationTokenVersion instead." |
| 41 |
|
); |
| 42 |
|
$this->addOption( 'nowarn', "Hides the 5 seconds warning", false, false ); |
| 43 |
|
$this->addOption( |
| 44 |
|
'nulls', |
| 45 |
|
'Only reset tokens that are currently null (string of \x00\'s)', |
| 46 |
|
false, |
| 47 |
|
false |
| 48 |
|
); |
| 49 |
|
$this->setBatchSize( 1000 ); |
| 50 |
|
} |
| 51 |
|
|
| 52 |
|
public function execute() { |
| 53 |
|
$this->nullsOnly = $this->getOption( 'nulls' ); |
maintenance/rebuildFileCache.php 1 location
|
@@ 34-41 (lines=8) @@
|
| 31 |
|
class RebuildFileCache extends Maintenance { |
| 32 |
|
private $enabled = true; |
| 33 |
|
|
| 34 |
|
public function __construct() { |
| 35 |
|
parent::__construct(); |
| 36 |
|
$this->addDescription( 'Build file cache for content pages' ); |
| 37 |
|
$this->addOption( 'start', 'Page_id to start from', false, true ); |
| 38 |
|
$this->addOption( 'end', 'Page_id to end on', false, true ); |
| 39 |
|
$this->addOption( 'overwrite', 'Refresh page cache' ); |
| 40 |
|
$this->setBatchSize( 100 ); |
| 41 |
|
} |
| 42 |
|
|
| 43 |
|
public function finalSetup() { |
| 44 |
|
global $wgDebugToolbar, $wgUseFileCache, $wgReadOnly; |