* The script then print a list of wgAllMessagesXX keys that aren't
* localised, a percentage of messages correctly localised and the
* number of messages to be translated.
+ * @package MediaWiki
+ * @subpackage Maintenance
*/
/** This script run from the commandline */
<?php
-# Script to initialise the MediaWiki namespace
-
-# This script is included from update.php and install.php. Do not run it
-# by itself.
-
+/**
+ * Script to initialise the MediaWiki namespace
+ *
+ * This script is included from update.php and install.php. Do not run it
+ * by itself.
+ *
+ * @deprecated
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+/** */
function initialiseMessages( $overwrite = false, $messageArray = false ) {
global $wgLang, $wgScript, $wgServer, $wgAllMessagesEn;
global $wgOut, $wgArticle, $wgUser;
<?php
+/**
+ * @deprecated
+ * @package MediaWiki
+ * @subpackage MaintenanceArchive
+ */
+/** */
print "This script is obsolete!";
print "It is retained in the source here in case some of its
code might be useful for ad-hoc conversion tasks, but it is
<?php
+/**
+ * @deprecated
+ * @package MediaWiki
+ * @subpackage MaintenanceArchive
+ */
+/** */
print "This script is obsolete!";
print "It is retained in the source here in case some of its
code might be useful for ad-hoc conversion tasks, but it is
<?php
+/**
+ * @deprecated
+ * @package MediaWiki
+ * @subpackage MaintenanceArchive
+ */
+/** */
print "This script is obsolete!";
print "It is retained in the source here in case some of its
code might be useful for ad-hoc conversion tasks, but it is
$titlecache = array();
$linkcache = array();
-# Some oversimplified test types
+/**
+ * Some oversimplified test types
+ *
+ * @deprecated
+ * @package MediaWiki
+ * @subpackage MaintenanceArchive
+ */
class Title {
var $title, $namespace;
function fromData( $namespace, $title ) {
<?php
+/**
+ * @deprecated
+ * @package MediaWiki
+ * @subpackage MaintenanceArchive
+ */
+/** */
function isTemplateInitialised() {
$fname = 'isTemplateInitialised';
<?php
+/**
+ * @deprecated
+ * @package MediaWiki
+ * @subpackage MaintenanceArchive
+ */
+
+/** */
+
# Move "custom messages" from the MediaWiki namespace to the Template namespace
# Usage: php moveCustomMessages.php [<lang>] [phase]
<?php
-
-# Rebuild recent changes table.
-
+/**
+ * Rebuild recent changes table
+ *
+ * @deprecated
+ * @package MediaWiki
+ * @subpackage MaintenanceArchive
+ */
+
+/** */
function rebuildRecentChangesTable()
{
$sql = "DROP TABLE IF EXISTS recentchanges";
<?php
+/**
+ * @deprecated
+ * @package MediaWiki
+ * @subpackage MaintenanceArchive
+ */
+/** */
print "This script is obsolete!";
print "It is retained in the source here in case some of its
code might be useful for ad-hoc conversion tasks, but it is
<?php
-# Script for re-attributing edits
+/**
+ * Script for re-attributing edits
+ *
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+/** */
require_once( "commandLine.inc" );
# Parameters
<?php
-
-# Check to see if all messages have been translated into
-# the selected language. To run this script, you must have
-# a working installation, and it checks the selected language
-# of that installation.
-#
-# The enhanced version will check more arrays than just
-# wgAllMessages
-
-
-
-function check($arrayname)
-{
+/**
+ * Check to see if all messages have been translated into
+ * the selected language. To run this script, you must have
+ * a working installation, and it checks the selected language
+ * of that installation.
+ *
+ * The enhanced version will check more arrays than just
+ * wgAllMessages
+ *
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+/** */
+function check($arrayname) {
$arraynameprinted = 0;
global $count, $total, $wgLanguageCode;
}
}
-
-
-
-
-
if ( ! is_readable( "../LocalSettings.php" ) ) {
print "A copy of your installation's LocalSettings.php\n" .
"must exist in the source directory.\n";
$count = $total = 0;
-
-
-
-
-
check("wgLanguageNames");
check("wgNamespaceNames");
check("wgDefaultUserOptions");
check("wgAllMessages");
print "{$count} messages of {$total} not translated.\n";
-
<?php
-
-# Check to see if all messages have been translated into
-# the selected language. To run this script, you must have
-# a working installation, and it checks the selected language
-# of that installation.
-#
-
+/**
+ * Check to see if all messages have been translated into
+ * the selected language. To run this script, you must have
+ * a working installation, and it checks the selected language
+ * of that installation.
+ *
+ * @package MediaWiki
+ * @subpackage Maintenance
+*/
+
+/** */
if ( ! is_readable( "../LocalSettings.php" ) ) {
print "A copy of your installation's LocalSettings.php\n" .
"must exist in the source directory.\n";
}
}
print "{$count} messages of {$total} not translated.\n";
-
<?php
+/**
+ * @deprecated
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+/** */
die("This script is not being maintained.");
# Checks translation of all language files
print "\n" . str_repeat( "-", $width ) . "\n";
print "{$count} messages of {$total} not translated.\n";
-
<?php
-
-# Creating a new empty database; either this or the conversion
-# script from the old format needs to be run, but not both.
-
+/**
+ * Creating a new empty database; either this or the conversion
+ * script from the old format needs to be run, but not both.
+ *
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+/** */
$wgCommandLineMode = true;
require_once( "../LocalSettings.php" );
<?php
+/**
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+/** */
# Abort if called from a web server
if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
print "This script must be run from the command line\n";
<?php
+/**
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+/** */
function compressOldPages( $start = 0 ) {
$fname = 'compressOldPages';
<?php
+/**
+ * Compress the old table, old_flags=gzip
+ *
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
-# Compress the old table, old_flags=gzip
-
+/** */
require_once( "commandLine.inc" );
require_once( "compressOld.inc" );
<?php
+/**
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+/** */
function convertLinks() {
print "Converting links table to ID-ID...\n";
<?php
-# Convert from the old links schema (string->ID) to the new schema (ID->ID)
-# The wiki should be put into read-only mode while this script executes
+/**
+ * Convert from the old links schema (string->ID) to the new schema (ID->ID)
+ * The wiki should be put into read-only mode while this script executes
+ *
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+/** */
require_once( "commandLine.inc" );
require_once( "convertLinks.inc" );
<?php
+/**
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+/** */
require_once( "commandLine.inc" );
$wgMessageCache->disableTransform();
$messages = array();
<?php
+/**
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+/** */
require_once( "commandLine.inc" );
do {
?>
-
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# http://www.gnu.org/copyleft/gpl.html
-# Attempt to import existing log pages into the log tables.
-
-# Not yet complete.
+/**
+ * Attempt to import existing log pages into the log tables.
+ *
+ * Not yet complete.
+ *
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+/** */
require_once( 'GlobalFunctions.php' );
require_once( 'Database.php' );
require_once( 'Article.php' );
require_once( 'LogPage.php' );
-# Log importer
+/**
+ * Log importer
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
class LogImporter {
var $dummy = false;
return $text;
}
-?>
\ No newline at end of file
+?>
<?php
+/**
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+/** */
require_once( "commandLine.inc" );
require_once( "importLogs.inc" );
$importer->importText( $text );
}
-?>
\ No newline at end of file
+?>
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# http://www.gnu.org/copyleft/gpl.html
+/**
+ * @todo document
+ * @deprecated
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+/** */
die( "This import script is not currently maintained.
If you need it you'll have to modify it as necessary.\n");
require_once( "rebuildrecentchanges.inc" );
require_once( "rebuildtextindex.inc" );
+/**
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
class Phase2Importer {
var $olddb, $titleCache;
}
+/**
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
class TitleCache {
var $hash = array();
$importer = new Phase2Importer( $olddb );
$importer->importAll();
-?>
\ No newline at end of file
+?>
<?php
-/*
- Import data from a UseModWiki into a PediaWiki wiki
- 2003-02-09 Brion VIBBER <brion@pobox.com>
- Based loosely on Magnus's code from 2001-2002
-
- Updated limited version to get something working temporarily
- 2003-10-09
- Be sure to run the link & index rebuilding scripts!
-
- Some more munging for charsets etc
- 2003-11-28
-
- */
-
-/* Set these correctly! */
+/**
+ * Import data from a UseModWiki into a PediaWiki wiki
+ * 2003-02-09 Brion VIBBER <brion@pobox.com>
+ * Based loosely on Magnus's code from 2001-2002
+ *
+ * Updated limited version to get something working temporarily
+ * 2003-10-09
+ * Be sure to run the link & index rebuilding scripts!
+ *
+ * Some more munging for charsets etc
+ * 2003-11-28
+ *
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+/** Set these correctly! */
$wgImportEncoding = "CP1252"; /* We convert all to UTF-8 */
$wgRootDirectory = "/home/usemod/wiki-ia/lib-http/db/wiki";
<?php
-
-# This is a drop-in replacement for commandLine.inc, for use only on
-# the Wikimedia wikis.
-# Call your command-line script with the language name and site name,
-# e.g. php convertLinks.php aa wikipedia
-
+/**
+ * This is a drop-in replacement for commandLine.inc, for use only on
+ * the Wikimedia wikis.
+ * Call your command-line script with the language name and site name,
+ * e.g. php convertLinks.php aa wikipedia
+ *
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+/** */
if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
print "This script must be run from the command line\n";
exit();
<?php
+/**
+ * memcached diagnostic tool
+ *
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
-# memcached diagnostic tool
-
+/** */
require_once( "commandLine.inc" );
$mcc = new memcached( array('persistant' => true) );
<?php
+/**
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+/** */
$wikiuser_pass = `wikiuser_pass`;
$wikiadmin_pass = `wikiadmin_pass`;
$wikisql_pass = `wikisql_pass`;
}
print "\n";
}
-
-
<?php
-
-# Rebuild interwiki table using the file on meta and the language list
-# Wikimedia specific!
+/**
+ * Rebuild interwiki table using the file on meta and the language list
+ * Wikimedia specific!
+ *
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+/** */
$oldCwd = getcwd();
$optionsWithArgs = array( "o" );
include_once( "commandLine.inc" );
+/**
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
class Site {
var $suffix, $lateral, $url;
<?php
+/**
+ * Rebuild interwiki table using the file on meta and the language list
+ * Wikimedia specific!
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
-# Rebuild interwiki table using the file on meta and the language list
-# Wikimedia specific!
+/** */
$oldCwd = getcwd();
$optionsWithArgs = array( "o" );
<?php
+/**
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+/** */
require_once( "commandLine.inc" );
include_once( "InitialiseMessages.inc" );
<?php
-
-# Rebuild link tracking tables from scratch. This takes several
-# hours, depending on the database size and server configuration.
-
+/**
+ * Rebuild link tracking tables from scratch. This takes several
+ * hours, depending on the database size and server configuration.
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+/** */
require_once( "commandLine.inc" );
#require_once( "rebuildlinks.inc" );
<?php
-
+/**
+ * Functions for rebuilding the link tracking tables; must
+ * be included within a script that also includes the Setup.
+ * See @see rebuildlinks.php, for example.
+ *
+ * @deprecated
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+/** */
die( "rebuildLinks.inc needs to be updated for the new schema\n" );
-# Functions for rebuilding the link tracking tables; must
-# be included within a script that also includes the Setup.
-# See rebuildlinks.php, for example.
#
# Buffer this many rows before inserting them all in one sweep. More
return intval($n/$t);
}
-# InsertBuffer increases performance slightly by inserting many rows
-# at once. The gain is small (<5%) when running against a local, idle
-# database, but may be significant in other circumstances. It also
-# limits the number of inserted rows uppwards, which should avoid
-# problems with huge articles and certain mysql settings that limits
-# the size of queries. It's also convenient.
-
+/**
+ * InsertBuffer increases performance slightly by inserting many rows
+ * at once. The gain is small (<5%) when running against a local, idle
+ * database, but may be significant in other circumstances. It also
+ * limits the number of inserted rows uppwards, which should avoid
+ * problems with huge articles and certain mysql settings that limits
+ * the size of queries. It's also convenient.
+ *
+ * @deprecated
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
class InsertBuffer {
/* private */ var $mBuf, $mSql, $mBufcount, $mMaxsize;
}
-# Select parts from a large table by using the "BETWEEN X AND Y"
-# operator on the id column. Avoids buffering the whole thing in
-# RAM. It's also convenient.
-
+/**
+ * Select parts from a large table by using the "BETWEEN X AND Y"
+ * operator on the id column. Avoids buffering the whole thing in
+ * RAM. It's also convenient.
+ *
+ * @deprecated
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
class SelectPulser {
/* private */ var $mSql, $mSetsize, $mPos, $mMax, $mSet;
}
}
-# A simple MRU for general cacheing.
-
+/**
+ * A simple MRU for general cacheing.
+ * @deprecated
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
class MRUCache {
/* private */ var $mMru, $mCache, $mSize, $mPurgefreq, $nexti;
/* private */ var $hits, $misses;
<?php
-
-# Rebuild link tracking tables from scratch. This takes several
-# hours, depending on the database size and server configuration.
-
+/**
+ * Rebuild link tracking tables from scratch. This takes several
+ * hours, depending on the database size and server configuration.
+ *
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+/** */
require_once( "commandLine.inc" );
require_once( "./rebuildlinks.inc" );
<?php
+/**
+ * Rebuild recent changes table.
+ *
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
-# Rebuild recent changes table.
-#
-
+/** */
function rebuildRecentChangesTablePass1()
{
$fname = 'rebuildRecentChangesTablePass1';
<?php
+/**
+ * Rebuild link tracking tables from scratch. This takes several
+ * hours, depending on the database size and server configuration.
+ *
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
-# Rebuild link tracking tables from scratch. This takes several
-# hours, depending on the database size and server configuration.
-
+/** */
require_once( "commandLine.inc" );
require_once( "./rebuildrecentchanges.inc" );
$wgTitle = Title::newFromText( "Rebuild recent changes script" );
<?php
-
-# Rebuild the fulltext search indexes. This may take a while
-# depending on the database size and server configuration.
-
-# Rebuilding is faster if you drop the index and recreate it,
-# but that will prevent searches from working while it runs.
-
+/**
+ * Rebuild the fulltext search indexes. This may take a while
+ * depending on the database size and server configuration.
+ *
+ * Rebuilding is faster if you drop the index and recreate it,
+ * but that will prevent searches from working while it runs.
+ *
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+/** */
define( "RTI_CHUNK_SIZE", 500 );
function dropTextIndex( &$database )
<?php
-# Rebuild search index table from scratch. This takes several
-# hours, depending on the database size and server configuration.
+/**
+ * Rebuild search index table from scratch. This takes several
+ * hours, depending on the database size and server configuration.
+ *
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+/** */
require_once( "commandLine.inc" );
require_once( "rebuildtextindex.inc" );
$wgTitle = Title::newFromText( "Rebuild text index script" );
<?php
+/**
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+/** */
define( "REPORTING_INTERVAL", 50 );
define( "PAUSE_INTERVAL", 50 );
<?php
+/**
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+/** */
require_once( "commandLine.inc" );
require_once( "refreshLinks.inc" );
<?php
+/**
+ * Remove spurious brokenlinks
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
-# Remove spurious brokenlinks
+/** */
require_once( "commandLine.inc" );
require_once( "./rebuildrecentchanges.inc" );
$wgTitle = Title::newFromText( "Rebuild brokenlinks script" );
<?php
+/**
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+/** */
require_once( "commandLine.inc" );
# print "DB name: $wgDBname\n";
# print "DB user: $wgDBuser\n";
<?php
+/**
+ * This script was used to convert the live Wikimedia wikis from 1.2 to 1.3
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
-# This script was used to convert the live Wikimedia wikis from 1.2 to 1.3
-
+/** */
$maintenance = "/home/wikipedia/common/php-new/maintenance";
require_once( "$maintenance/liveCmdLine.inc" );
require_once( "$maintenance/InitialiseMessages.inc" );
<?php
+/**
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+/** */
function updateSearchIndex( $start, $end, $maxLockTime, $quiet ) {
global $wgQuiet;
global $wgDisableSearchUpdate;
<?php
-
-# Script for periodic off-peak updating of the search index
-
-# Usage: php updateSearchIndex.php [-s START] [-e END] [-p POSFILE] [-l LOCKTIME] [-q]
-# Where START is the starting timestamp
-# END is the ending timestamp
-# POSFILE is a file to load timestamps from and save them to, searchUpdate.pos by default
-# LOCKTIME is how long the searchindex and cur tables will be locked for
-# -q means quiet
-
+/**
+ * Script for periodic off-peak updating of the search index
+ *
+ * Usage: php updateSearchIndex.php [-s START] [-e END] [-p POSFILE] [-l LOCKTIME] [-q]
+ * Where START is the starting timestamp
+ * END is the ending timestamp
+ * POSFILE is a file to load timestamps from and save them to, searchUpdate.pos by default
+ * LOCKTIME is how long the searchindex and cur tables will be locked for
+ * -q means quiet
+ *
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+/** */
$optionsWithArgs = array( 's', 'e', 'p' );
require_once( 'commandLine.inc' );
<?php
-
+/**
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+ /** */
function do_revision_updates() {
global $wgSoftwareRevision;
if ( $wgSoftwareRevision < 1001 ) {