Follows-up I1343872de7, Ia533aedf63 and I2df2f80b81.
Also updated usage in text in documentation and the
installer LocalSettingsGenerator.
Most of them were handled by this regex:
- find: (require|include|require_once|include_once)\s*\(\s*(.+?)\s*\)\s*;$
- replace: $1 $2;
Change-Id: I6b38aad9a5149c9c43ce18bd8edbab14b8ce43fa
// Bail if PHP is too low
if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.3.2' ) < 0 ) {
// We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
- require( dirname( __FILE__ ) . '/includes/PHPVersionError.php' );
+ require dirname( __FILE__ ) . '/includes/PHPVersionError.php';
wfPHPVersionError( 'api.php' );
}
// Initialise common code.
-require ( __DIR__ . '/includes/WebStart.php' );
+require __DIR__ . '/includes/WebStart.php';
wfProfileIn( 'api.php' );
$starttime = microtime( true );
making for some slight savings in memory and load-up performance at runtime.
Admins who want to have all the reversed titles can add:
- require_once('extensions/ReverseTitle.php');
+ require_once 'extensions/ReverseTitle.php';
...to their LocalSettings.php file; those of us who don't want or need it can
just leave it out.
EXAMPLE:
<?php
-require("MemCachedClient.inc.php");
+require 'MemCachedClient.inc.php';
// set the servers, with the last one having an integer weight value of 3
$options["servers"] = array("10.0.0.15:11000","10.0.0.16:11001",array("10.0.0.17:11002", 3));
*/
define( 'MW_NO_OUTPUT_COMPRESSION', 1 );
-require ( __DIR__ . '/includes/WebStart.php' );
+require __DIR__ . '/includes/WebStart.php';
wfProfileIn( 'img_auth.php' );
# Set action base paths so that WebRequest::getPathInfo()
}
if ( !class_exists( 'AutoLoader' ) ) {
- require_once( "$IP/includes/AutoLoader.php" );
+ require_once "$IP/includes/AutoLoader.php";
}
wfProfileIn( $fname . '-exception' );
wfProfileOut( $fname . '-exception' );
wfProfileIn( $fname . '-includes' );
-require_once( "$IP/includes/normal/UtfNormalUtil.php" );
-require_once( "$IP/includes/GlobalFunctions.php" );
-require_once( "$IP/includes/ProxyTools.php" );
-require_once( "$IP/includes/normal/UtfNormalDefines.php" );
+require_once "$IP/includes/normal/UtfNormalUtil.php";
+require_once "$IP/includes/GlobalFunctions.php";
+require_once "$IP/includes/ProxyTools.php";
+require_once "$IP/includes/normal/UtfNormalDefines.php";
wfProfileOut( $fname . '-includes' );
if ( $wgSecureLogin && substr( $wgServer, 0, 2 ) !== '//' ) {
foreach ( $this->extensions as $extName ) {
$encExtName = self::escapePhpString( $extName );
- $localSettings .= "require_once( \"\$IP/extensions/$encExtName/$encExtName.php\" );\n";
+ $localSettings .= "require_once \"\$IP/extensions/$encExtName/$encExtName.php\";\n";
}
}
If the php_normal.so module is loaded in php.ini, the normalization functions
will automatically use it. If you can't (or don't want to) load it in php.ini,
-you may be able to load it using the dl() function before include()ing or
-require()ing UtfNormal.php, and it will be picked up.
+you may be able to load it using the dl() function before the inclusion of
+UtfNormal.php, and it will be picked up.
$this->addSource( $wgResourceLoaderSources );
// Register core modules
- $this->register( include( "$IP/resources/Resources.php" ) );
+ $this->register( include "$IP/resources/Resources.php" );
// Register extension modules
wfRunHooks( 'ResourceLoaderRegisterModules', array( &$this ) );
$this->register( $wgResourceModules );
# 5.1, respectively.
if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.3.2' ) < 0 ) {
// We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
- require( dirname( __FILE__ ) . '/includes/PHPVersionError.php' );
+ require dirname( __FILE__ ) . '/includes/PHPVersionError.php';
wfPHPVersionError( 'index.php' );
}
# Initialise common code. This gives us access to GlobalFunctions, the
# AutoLoader, and the globals $wgRequest, $wgOut, $wgUser, $wgLang and
# $wgContLang, amongst others; it does *not* load $wgTitle
-require ( __DIR__ . '/includes/WebStart.php' );
+require __DIR__ . '/includes/WebStart.php';
$mediaWiki = new MediaWiki();
$mediaWiki->run();
# Read language names
global $wgLanguageNames;
-require_once( __DIR__ . '/Names.php' );
+require_once __DIR__ . '/Names.php';
if ( function_exists( 'mb_strtoupper' ) ) {
mb_internal_encoding( 'UTF-8' );
static $coreLanguageNames;
if ( $coreLanguageNames === null ) {
- include( MWInit::compiledPath( 'languages/Names.php' ) );
+ include MWInit::compiledPath( 'languages/Names.php' );
}
if ( isset( $coreLanguageNames[$tag] )
}
if ( file_exists( "$IP/languages/classes/$class.php" ) ) {
- include_once( "$IP/languages/classes/$class.php" );
+ include_once "$IP/languages/classes/$class.php";
}
}
static $coreLanguageNames;
if ( $coreLanguageNames === null ) {
- include( MWInit::compiledPath( 'languages/Names.php' ) );
+ include MWInit::compiledPath( 'languages/Names.php' );
}
$names = array();
* @ingroup Language
*/
-require_once( __DIR__ . '/../LanguageConverter.php' );
-require_once( __DIR__ . '/LanguageZh.php' );
+require_once __DIR__ . '/../LanguageConverter.php';
+require_once __DIR__ . '/LanguageZh.php';
/**
* @ingroup Language
}
function loadDefaultTables() {
- require( __DIR__ . "/../../includes/ZhConversion.php" );
+ require __DIR__ . '/../../includes/ZhConversion.php';
$this->mTables = array(
'gan-hans' => new ReplacementArray( $zh2Hans ),
'gan-hant' => new ReplacementArray( $zh2Hant ),
* @ingroup Language
*/
-require_once( __DIR__ . '/../LanguageConverter.php' );
+require_once __DIR__ . '/../LanguageConverter.php';
/**
* Conversion script between Latin and Syllabics for Inuktitut.
* @ingroup Language
*/
-require_once( __DIR__ . '/../LanguageConverter.php' );
-require_once( __DIR__ . '/LanguageKk_cyrl.php' );
+require_once __DIR__ . '/../LanguageConverter.php';
+require_once __DIR__ . '/LanguageKk_cyrl.php';
define( 'KK_C_UC', 'АӘБВГҒДЕЁЖЗИЙКҚЛМНҢОӨПРСТУҰҮФХҺЦЧШЩЪЫІЬЭЮЯ' ); # Kazakh Cyrillic uppercase
define( 'KK_C_LC', 'аәбвгғдеёжзийкқлмнңоөпрстуұүфхһцчшщъыіьэюя' ); # Kazakh Cyrillic lowercase
}
function loadDefaultTables() {
- // require( __DIR__."/../../includes/KkConversion.php" );
+ // require __DIR__."/../../includes/KkConversion.php";
// Placeholder for future implementing. Remove variables declarations
// after generating KkConversion.php
$kk2Cyrl = array();
* @ingroup Language
*/
-require_once( __DIR__ . '/../LanguageConverter.php' );
-require_once( __DIR__ . '/LanguageKu_ku.php' );
+require_once __DIR__ . '/../LanguageConverter.php';
+require_once __DIR__ . '/LanguageKu_ku.php';
/**
* Kurdish converter routines
* @ingroup Language
*/
-require_once( __DIR__ . '/../LanguageConverter.php' );
+require_once __DIR__ . '/../LanguageConverter.php';
/**
* Conversion script between Latin and Tifinagh for Tachelhit.
* @ingroup Language
*/
-require_once( __DIR__ . '/../LanguageConverter.php' );
-require_once( __DIR__ . '/LanguageSr_ec.php' );
-require_once( __DIR__ . '/LanguageSr_el.php' );
+require_once __DIR__ . '/../LanguageConverter.php';
+require_once __DIR__ . '/LanguageSr_ec.php';
+require_once __DIR__ . '/LanguageSr_el.php';
/**
* There are two levels of conversion for Serbian: the script level
* @ingroup Language
*/
-require_once( __DIR__ . '/../LanguageConverter.php' );
+require_once __DIR__ . '/../LanguageConverter.php';
/**
* Converts Tajiki to latin orthography
* @ingroup Language
*/
-require_once( __DIR__ . '/../LanguageConverter.php' );
+require_once __DIR__ . '/../LanguageConverter.php';
/**
* @ingroup Language
* @ingroup Language
*/
-require_once( __DIR__ . '/../LanguageConverter.php' );
-require_once( __DIR__ . '/LanguageZh_hans.php' );
+require_once __DIR__ . '/../LanguageConverter.php';
+require_once __DIR__ . '/LanguageZh_hans.php';
/**
* @ingroup Language
}
function loadDefaultTables() {
- require( __DIR__ . "/../../includes/ZhConversion.php" );
+ require __DIR__ . "/../../includes/ZhConversion.php";
$this->mTables = array(
'zh-hans' => new ReplacementArray( $zh2Hans ),
'zh-hant' => new ReplacementArray( $zh2Hant ),
// Bail if PHP is too low
if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.3.2' ) < 0 ) {
// We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
- require( dirname( __FILE__ ) . '/includes/PHPVersionError.php' );
+ require dirname( __FILE__ ) . '/includes/PHPVersionError.php';
wfPHPVersionError( 'load.php' );
}
-require ( __DIR__ . '/includes/WebStart.php' );
+require __DIR__ . '/includes/WebStart.php';
wfProfileIn( 'load.php' );
// Make sure we're on PHP5.3.2 or better
if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.2' ) < 0 ) {
// We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
- require_once( dirname( __FILE__ ) . '/../includes/PHPVersionError.php' );
+ require_once dirname( __FILE__ ) . '/../includes/PHPVersionError.php';
wfPHPVersionError( 'cli' );
}
// Make sure the class is loaded first
if ( !MWInit::classExists( $maintClass ) ) {
if ( $classFile ) {
- require_once( $classFile );
+ require_once $classFile;
}
if ( !MWInit::classExists( $maintClass ) ) {
$this->error( "Cannot spawn child: $maintClass" );
( strpos( file_get_contents( $file ), '$maintClass' ) === false ) ) {
continue;
}
- require( $file );
+ require $file;
$vars = get_defined_vars();
if ( array_key_exists( 'maintClass', $vars ) ) {
self::$mCoreScripts[$vars['maintClass']] = $file;
* @ingroup MaintenanceArchive
*/
-require( __DIR__ . '/../commandLine.inc' );
+require __DIR__ . '/../commandLine.inc';
/**
* Maintenance script that upgrade for log_id/log_deleted fields in a
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to correct wrong values in the `page_latest` field
*/
function loadPlugin( $class, $file ) {
if ( $file != '' ) {
- require_once( $file );
+ require_once $file;
}
$register = array( $class, 'register' );
call_user_func_array( $register, array( &$this ) );
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/backup.inc' );
+require_once __DIR__ . '/backup.inc';
/**
* @ingroup Maintenance
* @ingroup Benchmark
*/
-require_once( __DIR__ . '/../Maintenance.php' );
+require_once __DIR__ . '/../Maintenance.php';
/**
* Base class for benchmark scripts.
* @author Platonides
*/
-require_once( __DIR__ . '/Benchmarker.php' );
+require_once __DIR__ . '/Benchmarker.php';
/**
* Maintenance script that benchmarks HTTP request vs HTTPS request.
* @ingroup Benchmark
*/
-require_once( __DIR__ . '/Benchmarker.php' );
+require_once __DIR__ . '/Benchmarker.php';
/**
* Maintenance script that benchmarks SQL DELETE vs SQL TRUNCATE.
* @author Platonides
*/
-require_once( __DIR__ . '/Benchmarker.php' );
+require_once __DIR__ . '/Benchmarker.php';
/**
* Maintenance script that benchmark if elseif... versus switch case.
* @ingroup Benchmark
*/
-require_once( __DIR__ . '/Benchmarker.php' );
+require_once __DIR__ . '/Benchmarker.php';
function bfNormalizeTitleStrTr( $str ) {
return strtr( $str, '_', ' ' );
* @ingroup Benchmark
*/
-require_once( __DIR__ . '/Benchmarker.php' );
+require_once __DIR__ . '/Benchmarker.php';
/**
* This little benchmark executes the regexp used in Language->checkTitleEncoding()
* @author Tyler Romeo
*/
-require_once( __DIR__ . '/Benchmarker.php' );
+require_once __DIR__ . '/Benchmarker.php';
/**
* Maintenance script that benchmarks wfBaseConvert().
* @author Platonides
*/
-require_once( __DIR__ . '/Benchmarker.php' );
+require_once __DIR__ . '/Benchmarker.php';
/**
* Maintenance script that benchmarks wfIsWindows().
* @ingroup Benchmark
*/
-require_once( __DIR__ . '/Benchmarker.php' );
+require_once __DIR__ . '/Benchmarker.php';
/**
* Maintenance script that benchmarks %MediaWiki hooks.
* @ingroup Benchmark
*/
-require_once( __DIR__ . '/Benchmarker.php' );
+require_once __DIR__ . '/Benchmarker.php';
/**
* Maintenance script that benchmarks Squid purge.
*/
/** */
-require_once( __DIR__ . '/commandLine.inc' );
+require_once __DIR__ . '/commandLine.inc';
function cdbShowHelp( $command ) {
$commandList = array(
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to change the password of a given user.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to check that pages marked as being redirects really are.
* @file
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to check images to see if they exist, are readable, etc.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to check syntax of all PHP files in MediaWiki.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to check that database usernames are actually valid.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to cleans up old database tables, dropping old indexes
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/cleanupTable.inc' );
+require_once __DIR__ . '/cleanupTable.inc';
/**
* Maintenance script to clean up broken page links when somebody turns on $wgCapitalLinks.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/cleanupTable.inc' );
+require_once __DIR__ . '/cleanupTable.inc';
/**
* Maintenance script to clean up broken, unparseable upload filenames.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that removes hidden preferences from the database.
* @author Roan Kattouw
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to remove cache entries for removed ResourceLoader modules
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to cleanup all spam from a given hostname.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Generic class to cleanup a database table. Already subclasses Maintenance.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/cleanupTable.inc' );
+require_once __DIR__ . '/cleanupTable.inc';
/**
* Maintenance script to clean up broken, unparseable titles.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to remove old or broken uploads from temporary uploaded
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/cleanupTable.inc' );
+require_once __DIR__ . '/cleanupTable.inc';
/**
* Maintenance script to remove broken, unparseable titles in the watchlist table.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to remove all statistics tracking from the cache.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to clear the cache of interwiki prefixes for all local wikis.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
global $optionsWithArgs;
if ( !isset( $optionsWithArgs ) ) {
}
$maintClass = 'CommandLineInc';
-require( RUN_MAINTENANCE_IF_MAIN );
+require RUN_MAINTENANCE_IF_MAIN;
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/dumpIterator.php' );
+require_once __DIR__ . '/dumpIterator.php';
/**
* Maintenance script to take page text out of an XML dump file and render
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to convert from the old links schema (string->ID)
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to convert user options to the new `user_properties` table.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Copy all files in one container of one backend to another.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Copy all jobs from one job queue system to another.
* @author Pablo Castellano <pablo@anche.no>
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to create an account and grant it administrator rights.
* @author Aaron Schulz
*/
-require_once( __DIR__ . '/Maintenance.php' );
-require_once( __DIR__ . '/deleteArchivedFiles.inc' );
+require_once __DIR__ . '/Maintenance.php';
+require_once __DIR__ . '/deleteArchivedFiles.inc';
/**
* Maintenance script to delete archived (non-current) files from the database.
* @author Aaron Schulz
*/
-require_once( __DIR__ . '/Maintenance.php' );
-require_once( __DIR__ . '/deleteArchivedRevisions.inc' );
+require_once __DIR__ . '/Maintenance.php';
+require_once __DIR__ . '/deleteArchivedRevisions.inc';
/**
* Maintenance script to delete archived (deleted from public) revisions
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to delete a batch of pages.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that deletes all pages in the MediaWiki namespace
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that deletes all pages in the MediaWiki namespace
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that deletes image information from the object cache.
* @author Rob Church <robchur@gmail.com>
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that deletes old (non-current) revisions from the database.
* @todo More efficient cleanup of text records
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that deletes revisions which refer to a nonexisting page.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that deletes one or more revisions by moving them
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that deletes self-references to $wgServer
# We use require and return true here because when you return false
# the php webserver will discard post data and things like login
# will not function in the dev environment.
- require( $file );
+ require $file;
return true;
}
$mime = false;
// Detect compiled mode
# Get the MWInit class
-require_once( "$IP/includes/Init.php" );
-require_once( "$IP/includes/AutoLoader.php" );
+require_once "$IP/includes/Init.php";
+require_once "$IP/includes/AutoLoader.php";
# Stub the profiler
-require_once( "$IP/includes/profiler/Profiler.php" );
+require_once "$IP/includes/profiler/Profiler.php";
# Start the profiler
$wgProfiler = array();
if ( file_exists( "$IP/StartProfiler.php" ) ) {
- require( "$IP/StartProfiler.php" );
+ require "$IP/StartProfiler.php";
}
// Some other requires
-require_once( "$IP/includes/Defines.php" );
-require_once( MWInit::compiledPath( 'includes/DefaultSettings.php' ) );
+require_once "$IP/includes/Defines.php";
+require_once MWInit::compiledPath( 'includes/DefaultSettings.php' );
if ( defined( 'MW_CONFIG_CALLBACK' ) ) {
# Use a callback function to configure MediaWiki
# Maybe a hook?
global $cluster;
$cluster = 'pmtpa';
- require( MWInit::interpretedPath( '../wmf-config/wgConf.php' ) );
+ require MWInit::interpretedPath( '../wmf-config/wgConf.php' );
}
// Require the configuration (probably LocalSettings.php)
- require( $maintenance->loadSettings() );
+ require $maintenance->loadSettings();
}
if ( $maintenance->getDbType() === Maintenance::DB_ADMIN &&
is_readable( "$IP/AdminSettings.php" ) )
{
- require( MWInit::interpretedPath( 'AdminSettings.php' ) );
+ require MWInit::interpretedPath( 'AdminSettings.php' );
}
if ( $maintenance->getDbType() === Maintenance::DB_NONE ) {
}
$maintenance->finalSetup();
// Some last includes
-require_once( MWInit::compiledPath( 'includes/Setup.php' ) );
+require_once MWInit::compiledPath( 'includes/Setup.php' );
// Much much faster startup than creating a title object
$wgTitle = null;
$optionsWithArgs = array( 'pagelist', 'start', 'end', 'revstart', 'revend' );
-require_once( __DIR__ . '/commandLine.inc' );
-require_once( __DIR__ . '/backup.inc' );
+require_once __DIR__ . '/commandLine.inc';
+require_once __DIR__ . '/backup.inc';
$dumper = new BackupDumper( $argv );
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Base class for interating over a dump.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that generates a plaintext link dump.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that generates a page name dump for SisterSites usage.
$originalDir = getcwd();
-require_once( __DIR__ . '/commandLine.inc' );
-require_once( __DIR__ . '/backupTextPass.inc' );
+require_once __DIR__ . '/commandLine.inc';
+require_once __DIR__ . '/backupTextPass.inc';
$dumper = new TextPassDumper( $argv );
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to dump a the list of files uploaded,
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to make a page edit.
$optionsWithArgs = array( 'd' );
/** */
-require_once( __DIR__ . "/commandLine.inc" );
+require_once __DIR__ . "/commandLine.inc";
if ( isset( $options['d'] ) ) {
$d = $options['d'];
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script used to fetch page text in a subprocess.
$wgProfiler = array( 'class' => 'ProfilerSimpleText' );
error_reporting( E_ALL );
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to test fileop performance.
* @author Antoine Musso <hashar at free dot fr>
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that compares documented and actually present mismatches.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that fixes double redirects.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that fixes any entriy for protocol-relative URLs
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that fixes erroneous page_latest values
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that fixes timestamp corruption caused by one or
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that fixes the user_registration field.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that formats RELEASE-NOTE file to wiki text or HTML markup.
$wgEnableWriteAPI = true; // enable API.
// Install & enable Parser Hook extensions to increase code coverage. E.g.:
- require_once("extensions/ParserFunctions/ParserFunctions.php");
- require_once("extensions/Cite/Cite.php");
- require_once("extensions/inputbox/inputbox.php");
- require_once("extensions/Sort/Sort.php");
- require_once("extensions/wikihiero/wikihiero.php");
- require_once("extensions/CharInsert/CharInsert.php");
- require_once("extensions/FixedImage/FixedImage.php");
+ require_once "extensions/ParserFunctions/ParserFunctions.php";
+ require_once "extensions/Cite/Cite.php";
+ require_once "extensions/inputbox/inputbox.php";
+ require_once "extensions/Sort/Sort.php";
+ require_once "extensions/wikihiero/wikihiero.php";
+ require_once "extensions/CharInsert/CharInsert.php";
+ require_once "extensions/FixedImage/FixedImage.php";
// Install & enable Special Page extensions to increase code coverage. E.g.:
- require_once("extensions/Cite/SpecialCite.php");
- require_once("extensions/Renameuser/SpecialRenameuser.php");
+ require_once "extensions/Cite/SpecialCite.php";
+ require_once "extensions/Renameuser/SpecialRenameuser.php";
// --------- End ---------
If you want to try E_STRICT error logging, add this to the above:
// ///////////////////////// COMMAND LINE HELP ////////////////////////////////////
// This is a command line script, load MediaWiki env (gives command line options);
-require_once( __DIR__ . '/commandLine.inc' );
+require_once __DIR__ . '/commandLine.inc';
// if the user asked for an explanation of command line options.
if ( isset( $options["help"] ) ) {
* @see http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that generates a sitemap for the site.
* @author Antoine Musso
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Print serialized output of MediaWiki config vars
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that displays replication lag times.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that reports the hostname of a slave server.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that outputs page text to stdout.
#!/usr/bin/hhvm -f
<?php
-require( __DIR__ . '/../Maintenance.php' );
+require __DIR__ . '/../Maintenance.php';
class RunHipHopServer extends Maintenance {
function __construct() {
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that imports XML dump files into the current wiki.
'extensions', 'comment', 'comment-file', 'comment-ext', 'summary', 'user',
'license', 'sleep', 'limit', 'from', 'source-wiki-url', 'timestamp',
);
-require_once( __DIR__ . '/commandLine.inc' );
-require_once( __DIR__ . '/importImages.inc' );
+require_once __DIR__ . '/commandLine.inc';
+require_once __DIR__ . '/importImages.inc';
$processed = $added = $ignored = $skipped = $overwritten = $failed = 0;
echo "Import Images\n\n";
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to import all scripts in the MediaWiki namespace from a
$options = array( 'help', 'nooverwrite', 'norc' );
$optionsWithArgs = array( 'title', 'user', 'comment' );
-require_once( __DIR__ . '/commandLine.inc' );
+require_once __DIR__ . '/commandLine.inc';
echo "Import Text File\n\n";
if ( count( $args ) < 1 || isset( $options['help'] ) ) {
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
class InitEditCount extends Maintenance {
public function __construct() {
* @author Rob Church <robchur@gmail.com>
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to re-initialise or update the site statistics table
*/
if ( !function_exists( 'version_compare' ) || ( version_compare( phpversion(), '5.3.2' ) < 0 ) ) {
- require_once( dirname( __FILE__ ) . '/../includes/PHPVersionError.php' );
+ require_once dirname( __FILE__ ) . '/../includes/PHPVersionError.php';
wfPHPVersionError( 'cli' );
}
define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' );
define( 'MEDIAWIKI_INSTALL', true );
-require_once( dirname( __DIR__ ) . "/maintenance/Maintenance.php" );
+require_once dirname( __DIR__ ) . "/maintenance/Maintenance.php";
/**
* Maintenance script to install and configure MediaWiki
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to do test JavaScript validity parses using jsmin+'s parser
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to show database lag.
* @ingroup MaintenanceLanguage
*/
-require_once( __DIR__ . '/../Maintenance.php' );
+require_once __DIR__ . '/../Maintenance.php';
/**
* Maintenance script that gets all messages as defined by the
* @ingroup MaintenanceLanguage
*/
-require_once( __DIR__ . '/../commandLine.inc' );
+require_once __DIR__ . '/../commandLine.inc';
$messagesDir = __DIR__ . '/../../languages/messages/';
$runTest = false;
$run = false;
} elseif ( !strcmp( $runMode, 'raw' ) ) {
$runMode = 'raw';
}
- include( $messagesFile );
+ include $messagesFile;
$messageExist = isset( $messages );
if ( $messageExist ) {
$wgMessages[$langCode] = $messages;
}
- include( $messagesFileC );
+ include $messagesFileC;
$messageCExist = isset( $messages );
if ( $messageCExist ) {
$wgMessages[$langCodeC] = $messages;
* @ingroup MaintenanceLanguage
*/
-require_once( __DIR__ . '/../commandLine.inc' );
+require_once __DIR__ . '/../commandLine.inc';
require_once 'languages.inc';
require_once 'checkLanguage.inc';
* @ingroup MaintenanceLanguage
*/
-require_once( __DIR__ . '/../commandLine.inc' );
+require_once __DIR__ . '/../commandLine.inc';
require_once 'checkLanguage.inc';
require_once 'languages.inc';
* @ingroup MaintenanceLanguage
*/
-require_once( __DIR__ . '/../Maintenance.php' );
+require_once __DIR__ . '/../Maintenance.php';
/**
* Maintenance script that counts how many messages we have defined
private function getNumMessages( $file ) {
// Separate function to limit scope
- require( $file );
+ require $file;
if ( isset( $messages ) ) {
return count( $messages );
} else {
* @ingroup MaintenanceLanguage
*/
-require_once( __DIR__ . '/../Maintenance.php' );
+require_once __DIR__ . '/../Maintenance.php';
/**
* Maintenance script that tests various language time and date functions.
* @ingroup MaintenanceLanguage
*/
-require_once( __DIR__ . '/../Maintenance.php' );
+require_once __DIR__ . '/../Maintenance.php';
/**
* Maintenance script that check digit transformation.
$filename = Language::getMessagesFileName( $code );
$this->output( "Loading language [$code] ... " );
unset( $digitTransformTable );
- require_once( $filename );
+ require_once $filename;
if ( !isset( $digitTransformTable ) ) {
$this->error( "\$digitTransformTable not found for lang: $code" );
continue;
* @todo Make this more useful, right now just dumps $wgContLang
*/
-require_once( __DIR__ . '/../Maintenance.php' );
+require_once __DIR__ . '/../Maintenance.php';
/**
* Maintenance script that dumps an entire language, using the keys from English.
* @ingroup MaintenanceLanguage
*/
-require_once( __DIR__ . '/../Maintenance.php' );
+require_once __DIR__ . '/../Maintenance.php';
/**
* Generate first letter data files for Collation.php
* @ingroup MaintenanceLanguage
*/
-require_once( __DIR__ . '/../../includes/normal/UtfNormalUtil.php' );
+require_once __DIR__ . '/../../includes/normal/UtfNormalUtil.php';
-require_once( __DIR__ . '/../Maintenance.php' );
+require_once __DIR__ . '/../Maintenance.php';
/**
* Generates normalizer data files for Arabic and Malayalam.
*/
/** This is a command line script */
-require_once( __DIR__ . '/../Maintenance.php' );
-require_once( __DIR__ . '/languages.inc' );
+require_once __DIR__ . '/../Maintenance.php';
+require_once __DIR__ . '/languages.inc';
/**
* Maintenance script that tries to get the memory usage for each language file.
* @param $exif bool Treat the Exif messages?
*/
function __construct( $exif = true ) {
- require( __DIR__ . '/messageTypes.inc' );
+ require __DIR__ . '/messageTypes.inc';
$this->mIgnoredMessages = $wgIgnoredMessages;
if ( $exif ) {
$this->mOptionalMessages = array_merge( $wgOptionalMessages );
$this->mSpecialPageAliases[$code] = array();
$filename = Language::getMessagesFileName( $code );
if ( file_exists( $filename ) ) {
- require( $filename );
+ require $filename;
if ( isset( $messages ) ) {
$this->mRawMessages[$code] = $messages;
}
* @defgroup MaintenanceLanguage MaintenanceLanguage
*/
-require_once( __DIR__ . '/../commandLine.inc' );
+require_once __DIR__ . '/../commandLine.inc';
require_once 'languages.inc';
require_once 'writeMessagesArray.inc';
*/
function removeDupes( $oldMsgArray, $dupeMsgSource ) {
if ( file_exists( $dupeMsgSource ) ) {
- include( $dupeMsgSource );
+ include $dupeMsgSource;
if ( !isset( $dupeMessages ) ) {
echo "There are no duplicated messages in the source file provided.";
exit( 1 );
*/
$optionsWithArgs = array( 'output' );
-require_once( __DIR__ . '/../commandLine.inc' );
+require_once __DIR__ . '/../commandLine.inc';
require_once 'languages.inc';
-require_once( __DIR__ . '/StatOutputs.php' );
+require_once __DIR__ . '/StatOutputs.php';
if ( isset( $options['help'] ) ) {
$IP = __DIR__ . '/../..';
-require_once( "$IP/includes/Defines.php" );
-require_once( "$IP/languages/Language.php" );
+require_once "$IP/includes/Defines.php";
+require_once "$IP/languages/Language.php";
$files = array();
foreach ( $argv as $arg ) {
}
function getVars( $filename ) {
- require( $filename );
+ require $filename;
$vars = get_defined_vars();
unset( $vars['filename'] );
return $vars;
# Load messages
$dir = $prefix ? $prefix : __DIR__;
- require( $dir . '/messages.inc' );
+ require $dir . '/messages.inc';
self::$messageStructure = $wgMessageStructure;
self::$blockComments = $wgBlockComments;
- require( $dir . '/messageTypes.inc' );
+ require $dir . '/messageTypes.inc';
self::$ignoredMessages = $wgIgnoredMessages;
self::$optionalMessages = $wgOptionalMessages;
*/
/** */
-require_once( __DIR__ . '/commandLine.inc' );
+require_once __DIR__ . '/commandLine.inc';
$options = getopt( '', array( 'debug', 'help', 'cache:' ) );
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that makes several 'set', 'incr' and 'get' requests
# Start from scratch
define( 'MW_NO_EXTENSION_MESSAGES', 1 );
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
$maintClass = 'MergeMessageFileList';
$mmfl = false;
if ( empty( $mmfl['quiet'] ) ) {
fwrite( STDERR, "Loading data from $fileName\n" );
}
- if ( !include_once( $fileName ) ) {
+ if ( !( include_once $fileName ) ) {
fwrite( STDERR, "Unable to read $fileName\n" );
exit( 1 );
}
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that re-assigns users from an old group to a new one.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that minifies a file or set of files.
* e.g. immobile_namespace for namespaces which can't be moved
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to move a batch of pages.
#
define( 'MEDIAWIKI', true );
-require_once( "$mwPath/includes/GlobalFunctions.php" );
+require_once "$mwPath/includes/GlobalFunctions.php";
/**
* Read a line from the shell
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that checks for articles to fix after
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that picks a database that has pending jobs.
* based on nukePage by Rob Church
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that removes pages with only one revision from the
* @author Rob Church <robchur@gmail.com>
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that erases a page record from the database.
* i.e.: GRANT REFERENCES (user_id) ON mwuser TO hubclient;
*/
-require_once( __DIR__ . '/../Maintenance.php' );
+require_once __DIR__ . '/../Maintenance.php';
class AlterSharedConstraints extends Maintenance {
public function __construct() {
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that looks for 'orphan' revisions hooked to pages which
* @license GNU General Public License 2.0 or later
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to parse some wikitext.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that manually runs an SQL patch outside of the general updaters.
* @author Simetrical
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Mainteance script to populate the category table.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once dirname( __FILE__ ) . '/Maintenance.php';
/**
* Maintenance script to populate the fa_sha1 field.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to populate the img_sha1 field.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that makes the required database updates for populating the
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that makes the required database updates for
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that makes the required database updates for rev_parent_id
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that populates the rev_len field for old revisions
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that fills the rev_sha1 and ar_sha1 columns of revision
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/dumpIterator.php' );
+require_once __DIR__ . '/dumpIterator.php';
/**
* Maintenance script that takes page text out of an XML dump file and
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/commandLine.inc' );
+require_once __DIR__ . '/commandLine.inc';
$wgHooks['BeforeParserFetchTemplateAndtitle'][] = 'PPFuzzTester::templateHook';
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that protects or unprotects a page.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that prunes file cache for pages, objects, resources, etc.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that scans the deletion log and purges affected files
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that sends purge requests for listed pages to squid.
* @author Rob Church <robchur@gmail.com>
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that purges old text records from the database.
* @ingroup Maintenance
*/
-require( __DIR__ . '/Maintenance.php' );
+require __DIR__ . '/Maintenance.php';
/**
* Maintenance script to remove old objects from the parser cache.
* @licence GNU General Public Licence 2.0 or later
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that reassigns edits from a user or IP address
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that builds file cache for content pages.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to update image metadata records.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to rebuild the localisation cache.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that rebuilds link tracking tables from scratch.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that purges all languages from the message cache.
* @todo Document
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that rebuilds recent changes from scratch.
* @todo document
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that rebuilds search index table from scratch.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to refresh file headers from metadata
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to refresh image metadata fields.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to refresh link tables.
* @author Rob Church <robchur@gmail.com>
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that removes unused user accounts from the database.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that changes the prefix of database tables.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that takes page text out of an XML dump file
* @author Daniel Friesen <mediawiki@danielfriesen.name>
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to reset the user_token for all users on the wiki.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to rollback all edits by a given user or IP provided
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to run a database query in batches and wait for slaves.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that runs pending jobs.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that shows statistics from the cache.
* @author Antoine Musso
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that reports the number of jobs currently waiting
* @license GNU General Public License 2.0 or later
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to show the cached statistics.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that sends SQL queries from the specified file to the database.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that performs some operations specific to SQLite database backend.
*/
if ( !defined( 'MEDIAWIKI' ) ) {
- require_once( __DIR__ . '/../commandLine.inc' );
+ require_once __DIR__ . '/../commandLine.inc';
$cs = new CheckStorage;
$fix = isset( $options['fix'] );
* @ingroup Maintenance ExternalStorage
*/
-require_once( __DIR__ . '/../Maintenance.php' );
+require_once __DIR__ . '/../Maintenance.php';
/**
* Maintenance script that compress the text of a wiki.
* @ingroup Maintenance ExternalStorage
*/
-require_once( __DIR__ . '/../Maintenance.php' );
+require_once __DIR__ . '/../Maintenance.php';
/**
* Maintenance script that gets the text of a revision,
* @ingroup Maintenance ExternalStorage
*/
-require_once( __DIR__ . '/../Maintenance.php' );
+require_once __DIR__ . '/../Maintenance.php';
/**
* Maintenance script to fix bug 20757.
define( 'REPORTING_INTERVAL', 1 );
if ( !defined( 'MEDIAWIKI' ) ) {
- require_once( __DIR__ . '/../commandLine.inc' );
- require_once( __DIR__ . '/../../includes/externalstore/ExternalStoreDB.php' );
+ require_once __DIR__ . '/../commandLine.inc';
+ require_once __DIR__ . '/../../includes/externalstore/ExternalStoreDB.php';
require_once 'resolveStubs.php';
$fname = 'moveToExternal';
* @ingroup Maintenance ExternalStorage
*/
-require_once( __DIR__ . '/../Maintenance.php' );
+require_once __DIR__ . '/../Maintenance.php';
/**
* Maintenance script that shows some statistics on the blob_orphans table,
*/
$optionsWithArgs = RecompressTracked::getOptionsWithArgs();
-require( __DIR__ . '/../commandLine.inc' );
+require __DIR__ . '/../commandLine.inc';
if ( count( $args ) < 1 ) {
echo "Usage: php recompressTracked.php [options] <cluster> [... <cluster>...]
if ( !defined( 'MEDIAWIKI' ) ) {
$optionsWithArgs = array( 'm' );
- require_once( __DIR__ . '/../commandLine.inc' );
+ require_once __DIR__ . '/../commandLine.inc';
resolveStubs();
}
* @ingroup Maintenance ExternalStorage
*/
-require_once( __DIR__ . '/../Maintenance.php' );
+require_once __DIR__ . '/../Maintenance.php';
class StorageTypeStats extends Maintenance {
function execute() {
*/
$optionsWithArgs = array( 'start', 'limit', 'type' );
-require( __DIR__ . '/../commandLine.inc' );
+require __DIR__ . '/../commandLine.inc';
if ( !isset( $args[0] ) ) {
echo "Usage: php testCompression.php [--type=<type>] [--start=<start-date>] [--limit=<num-revs>] <page-title>\n";
* @see wfWaitForSlaves()
*/
-require( __DIR__ . '/../commandLine.inc' );
+require __DIR__ . '/../commandLine.inc';
if ( count( $args ) < 1 ) {
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that syncs one file backend to another based on
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
class Undelete extends Maintenance {
public function __construct() {
*/
if ( !function_exists( 'version_compare' ) || ( version_compare( phpversion(), '5.3.2' ) < 0 ) ) {
- require( dirname( __FILE__ ) . '/../includes/PHPVersionError.php' );
+ require dirname( __FILE__ ) . '/../includes/PHPVersionError.php';
wfPHPVersionError( 'cli' );
}
$wgUseMasterForMaintenance = true;
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to run database schema updates.
* @author Rob Church <robchur@gmail.com>
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to provide a better count of the number of articles
#$optionsWithArgs = array( 'begin', 'max-slave-lag' );
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that will find all rows in the categorylinks table
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to normalize double-byte latin UTF-8 characters.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that updates page_restrictions table from
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script for periodic off-peak updating of the search index.
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to update cached special pages.
}
// This is needed to initialise $wgQueryPages
- require_once( "$IP/includes/QueryPage.php" );
+ require_once "$IP/includes/QueryPage.php";
foreach ( $wgQueryPages as $page ) {
list( $class, $special ) = $page;
} else {
if ( !class_exists( $class ) ) {
$file = $specialObj->getFile();
- require_once( $file );
+ require_once $file;
}
$queryPage = new $class;
}
$options = array( 'list', 'nowarn', 'quiet', 'usage', 'dry' );
$optionsWithArgs = array( 'old', 'new' );
-require_once( __DIR__ . '/commandLine.inc' );
+require_once __DIR__ . '/commandLine.inc';
/**
* @ingroup Maintenance
* @see wfWaitForSlaves()
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to wait until slave lag goes under a certain value.
define( 'MEDIAWIKI_INSTALL', true );
chdir( dirname( __DIR__ ) );
-require( dirname( __DIR__ ) . '/includes/WebStart.php' );
+require dirname( __DIR__ ) . '/includes/WebStart.php';
wfInstallerMain();
* @file
*/
-require_once( __DIR__ . '/includes/WebStart.php' );
+require_once __DIR__ . '/includes/WebStart.php';
if ( $wgRequest->getVal( 'ctype' ) == 'application/xml' ) {
// Makes testing tweaks about a billion times easier
ini_set( 'zlib.output_compression', 'off' );
$wgEnableProfileInfo = $wgProfileToDatabase = false;
-require ( __DIR__ . '/includes/WebStart.php' );
+require __DIR__ . '/includes/WebStart.php';
header( 'Content-Type: text/html; charset=utf-8' );
if ( !defined( 'MEDIAWIKI' ) ) {
$wgNoDBParam = true;
$optionsWithArgs = array( 'o' );
- require_once( __DIR__ .'/../maintenance/commandLine.inc' );
+ require_once __DIR__ .'/../maintenance/commandLine.inc';
$stderr = fopen( 'php://stderr', 'w' );
if ( !isset( $args[0] ) ) {
//----------------------------------------------------------------------------
function getVars( $_gv_filename ) {
- require( $_gv_filename );
+ require $_gv_filename;
$vars = get_defined_vars();
unset( $vars['_gv_filename'] );
define( 'SELENIUMTEST', true );
-require( __DIR__ . '/../maintenance/Maintenance.php' );
+require __DIR__ . '/../maintenance/Maintenance.php';
require_once 'PHPUnit/Runner/Version.php';
if ( version_compare( PHPUnit_Runner_Version::id(), '3.5.0', '>=' ) ) {
require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
include_once 'PHPUnit/Util/Log/JUnit.php';
-require_once( __DIR__ . "/selenium/SeleniumServerManager.php" );
+require_once __DIR__ . "/selenium/SeleniumServerManager.php";
class SeleniumTester extends Maintenance {
protected $selenium;
}
foreach ( $seleniumTestSuites as $testSuiteName => $testSuiteFile ) {
- require( $testSuiteFile );
+ require $testSuiteFile;
$suite = new $testSuiteName();
$suite->setName( $testSuiteName );
$suite->addTests();
$otions = array( 'quick', 'color', 'quiet', 'help', 'show-output', 'record', 'run-disabled', 'run-parsoid' );
$optionsWithArgs = array( 'regex', 'filter', 'seed', 'setversion' );
-require_once( __DIR__ . '/../maintenance/commandLine.inc' );
-require_once( __DIR__ . '/TestsAutoLoader.php' );
+require_once __DIR__ . '/../maintenance/commandLine.inc';
+require_once __DIR__ . '/TestsAutoLoader.php';
if ( isset( $options['help'] ) ) {
echo <<<ENDS
You are running these tests directly from phpunit. You may not have all globals correctly set.
Running phpunit.php instead is recommended.
EOF;
- require_once( __DIR__ . "/phpunit.php" );
+ require_once __DIR__ . "/phpunit.php";
}
*/
// Start up MediaWiki in command-line mode
-require_once( __DIR__ . "/../../../../maintenance/Maintenance.php" );
-require( __DIR__ . "/RandomImageGenerator.php" );
+require_once __DIR__ . "/../../../../maintenance/Maintenance.php";
+require __DIR__ . "/RandomImageGenerator.php";
class GenerateRandomImages extends Maintenance {
}
$maintClass = 'GenerateRandomImages';
-require( RUN_MAINTENANCE_IF_MAIN );
+require RUN_MAINTENANCE_IF_MAIN;
// result array, but it seems kind of big to put directly in the test
// file.
$result = null;
- include( $xmpPath . $file[0] . '.result.php' );
+ include $xmpPath . $file[0] . '.result.php';
$data[] = array( $xmp, $result, '[' . $file[0] . '.xmp] ' . $file[1] );
}
<?php
-require_once( __DIR__ . '/NewParserTest.php' );
+require_once __DIR__ . '/NewParserTest.php';
/**
* The UnitTest must be either a class that inherits from MediaWikiTestCase
define( 'MW_PHPUNIT_TEST', true );
// Start up MediaWiki in command-line mode
-require_once( dirname( dirname( __DIR__ ) ) . "/maintenance/Maintenance.php" );
+require_once dirname( dirname( __DIR__ ) ) . "/maintenance/Maintenance.php";
class PHPUnitMaintClass extends Maintenance {
}
$maintClass = 'PHPUnitMaintClass';
-require( RUN_MAINTENANCE_IF_MAIN );
+require RUN_MAINTENANCE_IF_MAIN;
require_once 'PHPUnit/Runner/Version.php';
}
require_once 'PHPUnit/Autoload.php';
-require_once( "$IP/tests/TestsAutoLoader.php" );
+require_once "$IP/tests/TestsAutoLoader.php";
MediaWikiPHPUnitCommand::main();
<?php
-require_once( dirname( __DIR__ ) . '/includes/upload/UploadFromUrlTest.php' );
+require_once dirname( __DIR__ ) . '/includes/upload/UploadFromUrlTest.php';
class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite {
public $savedGlobals = array();
* </code>
*/
-require( __DIR__ . '/../../../maintenance/Maintenance.php' );
+require __DIR__ . '/../../../maintenance/Maintenance.php';
class GenerateJqueryMsgData extends Maintenance {
* http://www.gnu.org/copyleft/gpl.html
*/
-require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
+require_once __DIR__ . '/MediaWikiInstallationCommonFunction.php';
/**
* Test Case ID : 30 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
* http://www.gnu.org/copyleft/gpl.html
*/
-require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
+require_once __DIR__ . '/MediaWikiInstallationCommonFunction.php';
/**
* Test Case ID : 04 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
* http://www.gnu.org/copyleft/gpl.html
*/
-require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
+require_once __DIR__ . '/MediaWikiInstallationCommonFunction.php';
/**
* Test Case ID : 02 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
*/
-require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
+require_once __DIR__ . '/MediaWikiInstallationCommonFunction.php';
/**
* Test Case ID : 09 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
* http://www.gnu.org/copyleft/gpl.html
*/
-require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
+require_once __DIR__ . '/MediaWikiInstallationCommonFunction.php';
/**
* Test Case ID : 10 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
* http://www.gnu.org/copyleft/gpl.html
*/
-require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
+require_once __DIR__ . '/MediaWikiInstallationCommonFunction.php';
/**
* Test Case ID : 29 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
*/
require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
-require_once ( __DIR__ . '/MediaWikiInstallationConfig.php' );
-require_once ( __DIR__ . '/MediaWikiInstallationMessage.php' );
-require_once ( __DIR__ . '/MediaWikiInstallationVariables.php' );
+require_once __DIR__ . '/MediaWikiInstallationConfig.php';
+require_once __DIR__ . '/MediaWikiInstallationMessage.php';
+require_once __DIR__ . '/MediaWikiInstallationVariables.php';
class MediaWikiInstallationCommonFunction extends PHPUnit_Extensions_SeleniumTestCase {
function setUp() {
require_once 'PHPUnit/Framework/TestSuite.php';
-require_once ( __DIR__ . '/MediaWikiUserInterfaceTestCase.php' );
-require_once ( __DIR__ . '/MediaWikiButtonsAvailabilityTestCase.php' );
-require_once ( __DIR__ . '/MediaWikiHelpFieldHintTestCase.php' );
-require_once ( __DIR__ . '/MediaWikiRightFrameworkLinksTestCase.php' );
-require_once ( __DIR__ . '/MediaWikiRestartInstallationTestCase.php' );
-require_once ( __DIR__ . '/MediaWikiErrorsConnectToDatabasePageTestCase.php' );
-require_once ( __DIR__ . '/MediaWikiErrorsNamepageTestCase.php' );
-require_once ( __DIR__ . '/MediaWikiMySQLDataBaseTestCase.php' );
-require_once ( __DIR__ . '/MediaWikiMySQLiteDataBaseTestCase.php' );
-require_once ( __DIR__ . '/MediaWikiUpgradeExistingDatabaseTestCase.php' );
-require_once ( __DIR__ . '/MediaWikiDifferntDatabasePrefixTestCase.php' );
-require_once ( __DIR__ . '/MediaWikiDifferentDatabaseAccountTestCase.php' );
-require_once ( __DIR__ . '/MediaWikiOnAlreadyInstalledTestCase.php' );
+require_once __DIR__ . '/MediaWikiUserInterfaceTestCase.php';
+require_once __DIR__ . '/MediaWikiButtonsAvailabilityTestCase.php';
+require_once __DIR__ . '/MediaWikiHelpFieldHintTestCase.php';
+require_once __DIR__ . '/MediaWikiRightFrameworkLinksTestCase.php';
+require_once __DIR__ . '/MediaWikiRestartInstallationTestCase.php';
+require_once __DIR__ . '/MediaWikiErrorsConnectToDatabasePageTestCase.php';
+require_once __DIR__ . '/MediaWikiErrorsNamepageTestCase.php';
+require_once __DIR__ . '/MediaWikiMySQLDataBaseTestCase.php';
+require_once __DIR__ . '/MediaWikiMySQLiteDataBaseTestCase.php';
+require_once __DIR__ . '/MediaWikiUpgradeExistingDatabaseTestCase.php';
+require_once __DIR__ . '/MediaWikiDifferntDatabasePrefixTestCase.php';
+require_once __DIR__ . '/MediaWikiDifferentDatabaseAccountTestCase.php';
+require_once __DIR__ . '/MediaWikiOnAlreadyInstalledTestCase.php';
$suite = new PHPUnit_Framework_TestSuite( 'ArrayTest' );
$result = new PHPUnit_Framework_TestResult;
* http://www.gnu.org/copyleft/gpl.html
*/
-require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
+require_once __DIR__ . '/MediaWikiInstallationCommonFunction.php';
/**
* Test Case ID : 01 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
*/
-require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
+require_once __DIR__ . '/MediaWikiInstallationCommonFunction.php';
/**
* Test Case ID : 06 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
*/
-require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
+require_once __DIR__ . '/MediaWikiInstallationCommonFunction.php';
/**
* http://www.gnu.org/copyleft/gpl.html
*/
-require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
+require_once __DIR__ . '/MediaWikiInstallationCommonFunction.php';
/**
* Test Case ID : 11, 12 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
* http://www.gnu.org/copyleft/gpl.html
*/
-require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
+require_once __DIR__ . '/MediaWikiInstallationCommonFunction.php';
/**
* Test Case ID : 14, 15, 16, 17 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
* http://www.gnu.org/copyleft/gpl.html
*/
-require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
+require_once __DIR__ . '/MediaWikiInstallationCommonFunction.php';
/**
* Test Case ID : 05 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
* http://www.gnu.org/copyleft/gpl.html
*/
-require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
+require_once __DIR__ . '/MediaWikiInstallationCommonFunction.php';
/**
* Test Case ID : 18 - 27 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
* Sample test suite.
* Two ways to configure MW for these tests
* 1) If you are running multiple test suites, add the following in LocalSettings.php
- * require_once("tests/selenium/SimpleSeleniumConfig.php");
+ * require_once "tests/selenium/SimpleSeleniumConfig.php";
* $wgSeleniumTestConfigs['SimpleSeleniumTestSuite'] = 'SimpleSeleniumConfig::getSettings';
* OR
* 2) Add the following to your Localsettings.php
# Execute thumb.php, having set THUMB_HANDLER so that
# it knows to extract params from a thumbnail file URL.
-require( __DIR__ . '/thumb.php' );
+require __DIR__ . '/thumb.php';
<?php
// stub file for compatibility with older versions
-include_once('./index.php');
+include_once './index.php';