Go to the documentation of this file.
25 require_once __DIR__ .
'/Maintenance.php';
35 parent::__construct();
36 $this->mDescription =
"Deletes all pages in the MediaWiki namespace" .
37 " which were last edited by \"MediaWiki default\"";
43 $this->
output(
"Checking existence of old default messages..." );
46 array(
'page_namespace',
'page_title' ),
50 'rev_user_text' =>
'MediaWiki default',
55 # No more messages left
56 $this->
output(
"done.\n" );
60 # Deletions will be made by $user temporarly added to the bot group
61 # in order to hide it in RecentChanges.
64 $this->
error(
"Invalid username",
true );
66 $user->addGroup(
'bot' );
70 $this->
output(
"\n...deleting old default messages (this may take a long time!)...",
'msg' );
78 $dbw->begin( __METHOD__ );
80 $page->doDeleteArticle(
'No longer required',
false, 0,
false,
$error,
$user );
81 $dbw->commit( __METHOD__ );
84 $this->
output(
"done!\n",
'msg' );
static & makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
Maintenance script that deletes all pages in the MediaWiki namespace which were last edited by "Media...
require_once RUN_MAINTENANCE_IF_MAIN
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
static factory(Title $title)
Create a WikiPage object of the appropriate class for the given title.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
wfWaitForSlaves( $maxLag=false, $wiki=false, $cluster=false)
Modern version of wfWaitForSlaves().
presenting them properly to the user as errors is done by the caller $title
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
execute()
Do the actual work.
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
error( $err, $die=0)
Throw an error to the user.
output( $out, $channel=null)
Throw some output to the user.
usually copyright or history_copyright This message must be in HTML not wikitext $subpages will be ignored and the rest of subPageSubtitle() will run. 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink' whether MediaWiki currently thinks this is a CSS JS page Hooks may change this value to override the return value of Title::isCssOrJsPage(). 'TitleIsAlwaysKnown' whether MediaWiki currently thinks this page is known isMovable() always returns false. $title whether MediaWiki currently thinks this page is movable Hooks may change this value to override the return value of Title::isMovable(). 'TitleIsWikitextPage' whether MediaWiki currently thinks this is a wikitext page Hooks may change this value to override the return value of Title::isWikitextPage() 'TitleMove' use UploadVerification and UploadVerifyFile instead where the first element is the message key and the remaining elements are used as parameters to the message based on mime etc Preferred in most cases over UploadVerification object with all info about the upload string as detected by MediaWiki Handlers will typically only apply for specific mime types object & $error
__construct()
Default constructor.