We can now do this since we finally switched to PHP 5.3 for MW 1.20 and get rid of the silly dirname(__FILE__) stuff :)
Change-Id: Id9b2c9cd2e678197aa81c78adced5d1d31ff57b1
* Deprecated mw.user.anonymous in favour of mw.user.isAnon.
* Deprecated DatabaseBase functions newFromParams(), newFromType(), set(),
quote_ident(), and escapeLike() were removed.
+* Use of __DIR__ instead of dirname( __FILE__ ).
== Compatibility ==
if ( isset( $_SERVER['MW_COMPILED'] ) ) {
require ( 'core/includes/WebStart.php' );
} else {
- require ( dirname( __FILE__ ) . '/includes/WebStart.php' );
+ require ( __DIR__ . '/includes/WebStart.php' );
}
wfProfileIn( 'api.php' );
);
----
-$wgExtensionMessagesFiles['ExtensionNameMagic'] = dirname( __FILE__ ) . '/ExtensionName.i18n.magic.php';
+$wgExtensionMessagesFiles['ExtensionNameMagic'] = __DIR__ . '/ExtensionName.i18n.magic.php';
$wgHooks['MagicWordwgVariableIDs'][] = 'wfAddCustomMagicWordID';
$wgHooks['ParserGetVariableValueSwitch'][] = 'wfGetCustomMagicWordValue';
);
----
-$wgExtensionMessagesFiles['ExtensionNameMagic'] = dirname( __FILE__ ) . '/ExtensionName.i18n.magic.php';
+$wgExtensionMessagesFiles['ExtensionNameMagic'] = __DIR__ . '/ExtensionName.i18n.magic.php';
$wgHooks['ParserFirstCallInit'][] = 'wfRegisterCustomMagicWord';
function wfRegisterCustomMagicWord( &$parser ){
if ( isset( $_SERVER['MW_COMPILED'] ) ) {
require ( 'core/includes/WebStart.php' );
} else {
- require ( dirname( __FILE__ ) . '/includes/WebStart.php' );
+ require ( __DIR__ . '/includes/WebStart.php' );
}
wfProfileIn( 'img_auth.php' );
$files[] = __FILE__;
// We must also have a parent folder, and with the usual file structure, a grandparent
- $files[] = dirname( __FILE__ );
- $files[] = dirname( dirname( __FILE__ ) );
+ $files[] = __DIR__;
+ $files[] = dirname( __DIR__ );
// The config file is likely the most often edited file we know should be around
// so include its stat info into the state.
* 'scripts' => 'myExtension.js',
* 'styles' => 'myExtension.css',
* 'dependencies' => array( 'jquery.cookie', 'jquery.tabIndex' ),
- * 'localBasePath' => dirname( __FILE__ ),
+ * 'localBasePath' => __DIR__,
* 'remoteExtPath' => 'MyExtension',
* );
* @endcode
$this->mFunction = $function;
}
if ( $file === 'default' ) {
- $this->mFile = dirname( __FILE__ ) . "/specials/Special$name.php";
+ $this->mFile = __DIR__ . "/specials/Special$name.php";
} else {
$this->mFile = $file;
}
# Full path to working directory.
# Makes it possible to for example to have effective exclude path in apc.
# Also doesn't break installations using symlinked includes, like
-# dirname( __FILE__ ) would do.
+# __DIR__ would do.
$IP = getenv( 'MW_INSTALL_PATH' );
if ( $IP === false ) {
$IP = realpath( '.' );
// Load the installer's i18n file.
$wgExtensionMessagesFiles['MediawikiInstaller'] =
- dirname( __FILE__ ) . '/Installer.i18n.php';
+ __DIR__ . '/Installer.i18n.php';
// Having a user with id = 0 safeguards us from DB access via User::loadOptions().
$wgUser = User::newFromId( 0 );
*/
protected function envCheckPath() {
global $IP;
- $IP = dirname( dirname( dirname( __FILE__ ) ) );
+ $IP = dirname( dirname( __DIR__ ) );
$this->setVar( 'IP', $IP );
$this->showMessage( 'config-using-uri', $this->getVar( 'wgServer' ), $this->getVar( 'wgScriptPath' ) );
$url = $m[1];
}
return md5( serialize( array(
- 'local path' => dirname( dirname( __FILE__ ) ),
+ 'local path' => dirname( __DIR__ ),
'url' => $url,
'version' => $GLOBALS['wgVersion']
) ) );
* @return String
*/
public function getCSS( $dir ) {
- $skinDir = dirname( dirname( dirname( __FILE__ ) ) ) . '/skins';
+ $skinDir = dirname( dirname( __DIR__ ) ) . '/skins';
// All these files will be concatenated in sequence and loaded
// as one file.
}
public function getFileContents() {
- $file = dirname( __FILE__ ) . '/../../' . $this->getFileName();
+ $file = __DIR__ . '/../../' . $this->getFileName();
if( ! file_exists( $file ) ) {
return wfMessage( 'config-nofile', $file )->plain();
}
* @file
*/
-require_once dirname( __FILE__ ) . '/Services_JSON.php';
+require_once __DIR__ . '/Services_JSON.php';
/**
* JSON formatter wrapper class
if ( isset( $_SERVER['MW_COMPILED'] ) ) {
require ( 'phase3/includes/WebStart.php' );
} else {
- require ( dirname( __FILE__ ) . '/includes/WebStart.php' );
+ require ( __DIR__ . '/includes/WebStart.php' );
}
$mediaWiki = new MediaWiki();
# Read language names
global $wgLanguageNames;
-require_once( dirname( __FILE__ ) . '/Names.php' );
+require_once( __DIR__ . '/Names.php' );
if ( function_exists( 'mb_strtoupper' ) ) {
mb_internal_encoding( 'UTF-8' );
* @ingroup Language
*/
-require_once( dirname( __FILE__ ) . '/../LanguageConverter.php' );
-require_once( dirname( __FILE__ ) . '/LanguageZh.php' );
+require_once( __DIR__ . '/../LanguageConverter.php' );
+require_once( __DIR__ . '/LanguageZh.php' );
/**
* @ingroup Language
}
function loadDefaultTables() {
- require( dirname( __FILE__ ) . "/../../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( dirname( __FILE__ ) . '/../LanguageConverter.php' );
+require_once( __DIR__ . '/../LanguageConverter.php' );
/**
* Conversion script between Latin and Syllabics for Inuktitut.
* @ingroup Language
*/
-require_once( dirname( __FILE__ ) . '/../LanguageConverter.php' );
-require_once( dirname( __FILE__ ) . '/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
* @ingroup Language
*/
-require_once( dirname( __FILE__ ) . '/../LanguageConverter.php' );
-require_once( dirname( __FILE__ ) . '/LanguageKu_ku.php' );
+require_once( __DIR__ . '/../LanguageConverter.php' );
+require_once( __DIR__ . '/LanguageKu_ku.php' );
/**
* Kurdish converter routines
* @ingroup Language
*/
-require_once( dirname( __FILE__ ) . '/../LanguageConverter.php' );
+require_once( __DIR__ . '/../LanguageConverter.php' );
/**
* Conversion script between Latin and Tifinagh for Tachelhit.
* @ingroup Language
*/
-require_once( dirname( __FILE__ ) . '/../LanguageConverter.php' );
-require_once( dirname( __FILE__ ) . '/LanguageSr_ec.php' );
-require_once( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/../LanguageConverter.php' );
+require_once( __DIR__ . '/../LanguageConverter.php' );
/**
* Converts Tajiki to latin orthography
* @ingroup Language
*/
-require_once( dirname( __FILE__ ) . '/../LanguageConverter.php' );
+require_once( __DIR__ . '/../LanguageConverter.php' );
/**
* @ingroup Language
* @ingroup Language
*/
-require_once( dirname( __FILE__ ) . '/../LanguageConverter.php' );
-require_once( dirname( __FILE__ ) . '/LanguageZh_hans.php' );
+require_once( __DIR__ . '/../LanguageConverter.php' );
+require_once( __DIR__ . '/LanguageZh_hans.php' );
/**
* @ingroup Language
}
function loadDefaultTables() {
- require( dirname( __FILE__ ) . "/../../includes/ZhConversion.php" );
+ require( __DIR__ . "/../../includes/ZhConversion.php" );
$this->mTables = array(
'zh-hans' => new ReplacementArray( $zh2Hans ),
'zh-hant' => new ReplacementArray( $zh2Hant ),
if ( isset( $_SERVER['MW_COMPILED'] ) ) {
require ( 'phase3/includes/WebStart.php' );
} else {
- require ( dirname( __FILE__ ) . '/includes/WebStart.php' );
+ require ( __DIR__ . '/includes/WebStart.php' );
}
wfProfileIn( 'load.php' );
global $IP;
$IP = strval( getenv( 'MW_INSTALL_PATH' ) ) !== ''
? getenv( 'MW_INSTALL_PATH' )
- : realpath( dirname( __FILE__ ) . '/..' );
+ : realpath( __DIR__ . '/..' );
$this->addDefaultParams();
register_shutdown_function( array( $this, 'outputChanneled' ), false );
* @return string
*/
protected function getDir() {
- return dirname( __FILE__ );
+ return __DIR__;
}
/**
protected static function getCoreScripts() {
if ( !self::$mCoreScripts ) {
$paths = array(
- dirname( __FILE__ ),
- dirname( __FILE__ ) . '/language',
- dirname( __FILE__ ) . '/storage',
+ __DIR__,
+ __DIR__ . '/language',
+ __DIR__ . '/storage',
);
self::$mCoreScripts = array();
foreach ( $paths as $p ) {
* @ingroup MaintenanceArchive
*/
-require( dirname( __FILE__ ) . '/../commandLine.inc' );
+require( __DIR__ . '/../commandLine.inc' );
class UpdateLogging {
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to correct wrong values in the `page_latest` field
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/backup.inc' );
+require_once( __DIR__ . '/backup.inc' );
/**
* @ingroup Maintenance
* @ingroup Benchmark
*/
-require_once( dirname( __FILE__ ) . '/../Maintenance.php' );
+require_once( __DIR__ . '/../Maintenance.php' );
abstract class Benchmarker extends Maintenance {
private $results;
* @author Platonides
*/
-require_once( dirname( __FILE__ ) . '/Benchmarker.php' );
+require_once( __DIR__ . '/Benchmarker.php' );
class bench_HTTP_HTTPS extends Benchmarker {
public function __construct() {
* @ingroup Benchmark
*/
-require_once( dirname( __FILE__ ) . '/Benchmarker.php' );
+require_once( __DIR__ . '/Benchmarker.php' );
class BenchmarkDeleteTruncate extends Benchmarker {
* @author Platonides
*/
-require_once( dirname( __FILE__ ) . '/Benchmarker.php' );
+require_once( __DIR__ . '/Benchmarker.php' );
class bench_if_switch extends Benchmarker {
public function __construct() {
* @ingroup Benchmark
*/
-require_once( dirname( __FILE__ ) . '/Benchmarker.php' );
+require_once( __DIR__ . '/Benchmarker.php' );
function bfNormalizeTitleStrTr( $str ) {
return strtr( $str, '_', ' ' );
<?php
-/**\r
- * @file\r
- * @ingroup Benchmark\r
- */\r
-\r
-require_once( dirname( __FILE__ ) . '/Benchmarker.php' );\r
+/**
+ * @file
+ * @ingroup Benchmark
+ */
+
+require_once( __DIR__ . '/Benchmarker.php' );
/**
* This little benchmark executes the regexp used in Language->checkTitleEncoding() and compares its execution time
* against that of mb_check_encoding, if available.
- */\r
+ */
class bench_utf8_title_check extends Benchmarker {
private $canRun;
private $data;
- public function __construct() {\r
+ public function __construct() {
parent::__construct();
$this->data = array (
$this->canRun = function_exists ( 'mb_check_encoding' );
- if ( $this->canRun ) {\r
+ if ( $this->canRun ) {
$this->mDescription = "Benchmark for using a regexp vs. mb_check_encoding to check for UTF-8 encoding.";
mb_internal_encoding( 'UTF-8' );
} else {
$this->mDescription = "CANNOT RUN benchmark using mb_check_encoding: function not available.";
- }\r
- }\r
-\r
+ }
+ }
+
public function execute() {
if ( !$this->canRun ) {
return;
'function' => array( $this, 'use_regexp_once_only' ),
'args' => array( rawurldecode ( $val ) )
);
- $benchmarks[] = array(\r
- 'function' => array( $this, 'use_mb_check_encoding' ),\r
- 'args' => array( rawurldecode ( $val ) )\r
+ $benchmarks[] = array(
+ 'function' => array( $this, 'use_mb_check_encoding' ),
+ 'args' => array( rawurldecode ( $val ) )
);
- }\r
+ }
$this->bench( $benchmarks );
- print $this->getFormattedResults();\r
- }\r
+ print $this->getFormattedResults();
+ }
private $isutf8;
-\r
+
function use_regexp( $s ) {
$this->isutf8 = preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' .
- '[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $s );\r
- }\r
-\r
+ '[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $s );
+ }
+
function use_regexp_non_capturing( $s ) {
// Same as above with a non-capturing subgroup.
$this->isutf8 = preg_match( '/^(?:[\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' .
'[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $s );
}
- function use_mb_check_encoding( $s ) {\r
- $this->isutf8 = mb_check_encoding( $s, 'UTF-8' );\r
- }\r
-\r
-}\r
-\r
-$maintClass = 'bench_utf8_title_check';\r
-require_once( RUN_MAINTENANCE_IF_MAIN );\r
+ function use_mb_check_encoding( $s ) {
+ $this->isutf8 = mb_check_encoding( $s, 'UTF-8' );
+ }
+
+}
+
+$maintClass = 'bench_utf8_title_check';
+require_once( RUN_MAINTENANCE_IF_MAIN );
* @author Platonides
*/
-require_once( dirname( __FILE__ ) . '/Benchmarker.php' );
+require_once( __DIR__ . '/Benchmarker.php' );
class bench_wfIsWindows extends Benchmarker {
public function __construct() {
* @ingroup Benchmark
*/
-require_once( dirname( __FILE__ ) . '/Benchmarker.php' );
+require_once( __DIR__ . '/Benchmarker.php' );
class BenchmarkHooks extends Benchmarker {
* @ingroup Benchmark
*/
-require_once( dirname( __FILE__ ) . '/Benchmarker.php' );
+require_once( __DIR__ . '/Benchmarker.php' );
class BenchmarkPurge extends Benchmarker {
*/
/** */
-require_once( dirname( __FILE__ ) . '/commandLine.inc' );
+require_once( __DIR__ . '/commandLine.inc' );
function cdbShowHelp( $command ) {
$commandList = array(
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to change the password of a given user.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to check classes definitions in the autoloader.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to check that pages marked as being redirects really are.
* @file
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to check images to see if they exist, are readable, etc.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to check syntax of all PHP files in MediaWiki.
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to check that database usernames are actually valid.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to cleans up old database tables, dropping old indexes
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/cleanupTable.inc' );
+require_once( __DIR__ . '/cleanupTable.inc' );
/**
* Maintenance script to clean up broken page links when somebody turns on $wgCapitalLinks.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/cleanupTable.inc' );
+require_once( __DIR__ . '/cleanupTable.inc' );
/**
* Maintenance script to clean up broken, unparseable upload filenames.
* @ingroup Maintenance\r
*/\r
\r
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );\r
+require_once( __DIR__ . '/Maintenance.php' );\r
\r
/**\r
* Maintenance script that removes hidden preferences from the database.\r
* @author Roan Kattouw
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to remove cache entries for removed ResourceLoader modules
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to cleanup all spam from a given hostname.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Generic class to cleanup a database table. Already subclasses Maintenance.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/cleanupTable.inc' );
+require_once( __DIR__ . '/cleanupTable.inc' );
/**
* Maintenance script to clean up broken, unparseable titles.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to remove old or broken uploads from temporary uploaded
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/cleanupTable.inc' );
+require_once( __DIR__ . '/cleanupTable.inc' );
/**
* Maintenance script to remove broken, unparseable titles in the watchlist table.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to clear the cache of interwiki prefixes for all local wikis.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to remove all statistics tracking from the cache.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
global $optionsWithArgs;
if ( !isset( $optionsWithArgs ) ) {
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to convert from the old links schema (string->ID)
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to convert user options to the new `user_properties` table.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Copy all files in one container of one backend to another.
* @author Rob Church <robchur@gmail.com>
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to create an account and grant it administrator rights.
* @author Aaron Schulz
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
-require_once( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/Maintenance.php' );
-require_once( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to delete a batch of pages.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that deletes all pages in the MediaWiki namespace
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that deletes revisions which refer to a nonexisting page.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that deletes one or more revisions by moving them
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that deletes self-references to $wgServer
$optionsWithArgs = array( 'pagelist', 'start', 'end', 'revstart', 'revend');
-require_once( dirname( __FILE__ ) . '/commandLine.inc' );
-require_once( dirname( __FILE__ ) . '/backup.inc' );
+require_once( __DIR__ . '/commandLine.inc' );
+require_once( __DIR__ . '/backup.inc' );
$dumper = new BackupDumper( $argv );
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Base class for interating over a dump.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that generates a plaintext link dump.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that generates a page name dump for SisterSites usage.
$originalDir = getcwd();
-require_once( dirname( __FILE__ ) . '/commandLine.inc' );
-require_once( dirname( __FILE__ ) . '/backupTextPass.inc' );
+require_once( __DIR__ . '/commandLine.inc' );
+require_once( __DIR__ . '/backupTextPass.inc' );
$dumper = new TextPassDumper( $argv );
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to dump a the list of files uploaded,
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to make a page edit.
$optionsWithArgs = array( 'd' );
/** */
-require_once( dirname( __FILE__ ) . "/commandLine.inc" );
+require_once( __DIR__ . "/commandLine.inc" );
if ( isset( $options['d'] ) ) {
$d = $options['d'];
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to test fileop performance.
* @author Antoine Musso <hashar at free dot fr>
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that compares documented and actually present mismatches.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that fixes double redirects.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that fixes any entriy for protocol-relative URLs
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that fixes erroneous page_latest values
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that fixes timestamp corruption caused by one or
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that fixes the user_registration field.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) .'/Maintenance.php' );
+require_once( __DIR__ .'/Maintenance.php' );
/**
* Maintenance script that formats RELEASE-NOTE file to wiki text or HTML markup.
// ///////////////////////// COMMAND LINE HELP ////////////////////////////////////
// This is a command line script, load MediaWiki env (gives command line options);
-require_once( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that generates a sitemap for the site.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that displays replication lag times.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that reports the hostname of a slave server.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that outputs page text to stdout.
<?php
define( 'MW_CONFIG_CALLBACK', 'MakeHipHop::noConfigNeeded' );
-require( dirname( __FILE__ ) . '/../Maintenance.php' );
+require( __DIR__ . '/../Maintenance.php' );
class MakeHipHop extends Maintenance {
function noConfigNeeded() {}
$startTime = time();
- $thisDir = realpath( dirname( __FILE__ ) );
+ $thisDir = realpath( __DIR__ );
$IP = realpath( "$thisDir/../.." );
if ( strval( $wgHipHopBuildDirectory ) !== '' ) {
$buildDir = $wgHipHopBuildDirectory;
}
}
- $extraCoreFiles = array_map( 'trim', file( dirname( __FILE__ ) . '/extra-files' ) );
+ $extraCoreFiles = array_map( 'trim', file( __DIR__ . '/extra-files' ) );
foreach ( $extraCoreFiles as $file ) {
if ( $file === '' ) {
continue;
#!/usr/bin/hphpi -f
<?php
-require( dirname( __FILE__ ) . '/../Maintenance.php' );
+require( __DIR__ . '/../Maintenance.php' );
class RunHipHopServer extends Maintenance {
function __construct() {
function runCompiled() {
global $wgHipHopBuildDirectory;
- $thisDir = realpath( dirname( __FILE__ ) );
+ $thisDir = realpath( __DIR__ );
$IP = realpath( "$thisDir/../.." );
if ( strval( $wgHipHopBuildDirectory ) !== '' ) {
$buildDir = $wgHipHopBuildDirectory;
}
function runInterpreted() {
- $thisDir = realpath( dirname( __FILE__ ) );
+ $thisDir = realpath( __DIR__ );
$IP = realpath( "$thisDir/../.." );
$sourceBase = realpath( "$IP/.." );
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that imports XML dump files into the current wiki.
*/
$optionsWithArgs = array( 'extensions', 'comment', 'comment-file', 'comment-ext', 'user', 'license', 'sleep', 'limit', 'from', 'source-wiki-url' );
-require_once( dirname( __FILE__ ) . '/commandLine.inc' );
-require_once( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/commandLine.inc' );
+require_once( __DIR__ . '/commandLine.inc' );
echo( "Import Text File\n\n" );
if ( count( $args ) < 1 || isset( $options['help'] ) ) {
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
class InitEditCount extends Maintenance {
public function __construct() {
* @author Rob Church <robchur@gmail.com>
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to re-initialise or update the site statistics table
define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' );
define( 'MEDIAWIKI_INSTALL', true );
-require_once( dirname( dirname( __FILE__ ) )."/maintenance/Maintenance.php" );
+require_once( dirname( __DIR__ )."/maintenance/Maintenance.php" );
/**
* Maintenance script to install and configure MediaWiki
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to do test JavaScript validity parses using jsmin+'s parser
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to show database lag.
* @ingroup MaintenanceLanguage
*/
-require_once( dirname( __FILE__ ) . '/../Maintenance.php' );
+require_once( __DIR__ . '/../Maintenance.php' );
class AllTrans extends Maintenance {
public function __construct() {
* @ingroup MaintenanceLanguage
*/
-require_once( dirname( __FILE__ ) . '/../commandLine.inc' );
-$messagesDir = dirname( __FILE__ ) . '/../../languages/messages/';
+require_once( __DIR__ . '/../commandLine.inc' );
+$messagesDir = __DIR__ . '/../../languages/messages/';
$runTest = false;
$run = false;
$runMode = 'text';
* @ingroup MaintenanceLanguage
*/
-require_once( dirname( __FILE__ ) . '/../commandLine.inc' );
+require_once( __DIR__ . '/../commandLine.inc' );
require_once( 'languages.inc' );
require_once( 'checkLanguage.inc' );
* @ingroup MaintenanceLanguage
*/
-require_once( dirname( __FILE__ ) . '/../commandLine.inc' );
+require_once( __DIR__ . '/../commandLine.inc' );
require_once( 'checkLanguage.inc' );
require_once( 'languages.inc' );
* @ingroup MaintenanceLanguage
*/
-require_once( dirname( __FILE__ ) . '/../Maintenance.php' );
+require_once( __DIR__ . '/../Maintenance.php' );
class CountMessages extends Maintenance {
public function __construct() {
* @ingroup MaintenanceLanguage
*/
-require_once( dirname( __FILE__ ) . '/../Maintenance.php' );
+require_once( __DIR__ . '/../Maintenance.php' );
class DateFormats extends Maintenance {
* @ingroup MaintenanceLanguage
*/
-require_once( dirname( __FILE__ ) . '/../Maintenance.php' );
+require_once( __DIR__ . '/../Maintenance.php' );
class Digit2Html extends Maintenance {
* @todo Make this more useful, right now just dumps $wgContentLang
*/
-require_once( dirname( __FILE__ ) . '/../Maintenance.php' );
+require_once( __DIR__ . '/../Maintenance.php' );
class DumpMessages extends Maintenance {
public function __construct() {
* @file
*/
-require_once( dirname( __FILE__ ) .'/../Maintenance.php' );
+require_once( __DIR__ .'/../Maintenance.php' );
/**
* Generate first letter data files for Collation.php
* @ingroup MaintenanceLanguage
*/
-require_once( dirname( __FILE__ ) . '/../Maintenance.php' );
+require_once( __DIR__ . '/../Maintenance.php' );
-require_once( dirname( __FILE__ ) . '/../../includes/normal/UtfNormalUtil.php' );
+require_once( __DIR__ . '/../../includes/normal/UtfNormalUtil.php' );
/**
* Generates normalizer data files for Arabic and Malayalam.
*/
/** This is a command line script */
-require_once( dirname( __FILE__ ) . '/../Maintenance.php' );
-require_once( dirname( __FILE__ ) . '/languages.inc' );
+require_once( __DIR__ . '/../Maintenance.php' );
+require_once( __DIR__ . '/languages.inc' );
class LangMemUsage extends Maintenance {
* @defgroup MaintenanceLanguage MaintenanceLanguage
*/
-require_once( dirname( __FILE__ ) . '/../commandLine.inc' );
+require_once( __DIR__ . '/../commandLine.inc' );
require_once( 'languages.inc' );
require_once( 'writeMessagesArray.inc' );
*/
$optionsWithArgs = array( 'output' );
-require_once( dirname( __FILE__ ) . '/../commandLine.inc' );
+require_once( __DIR__ . '/../commandLine.inc' );
require_once( 'languages.inc' );
-require_once( dirname( __FILE__ ) . '/StatOutputs.php' );
+require_once( __DIR__ . '/StatOutputs.php' );
if ( isset( $options['help'] ) ) {
define( 'MEDIAWIKI', 1 );
define( 'NOT_REALLY_MEDIAWIKI', 1 );
-$IP = dirname( __FILE__ ) . '/../..';
+$IP = __DIR__ . '/../..';
require_once( "$IP/includes/Defines.php" );
require_once( "$IP/languages/Language.php" );
*/
public static function writeMessagesArray( $messages, $ignoredComments = false, $prefix = false, $removeUnknown = false ) {
# Load messages
- $dir = $prefix ? $prefix : dirname( __FILE__ );
+ $dir = $prefix ? $prefix : __DIR__;
require( $dir . '/messages.inc' );
self::$messageStructure = $wgMessageStructure;
*/
/** */
-require_once( dirname( __FILE__ ) . '/commandLine.inc' );
+require_once( __DIR__ . '/commandLine.inc' );
$mcc = new MWMemcached( array( 'persistent' => true/*, 'debug' => true*/ ) );
$mcc->set_servers( $wgMemCachedServers );
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
$maintClass = 'MergeMessageFileList';
$mmfl = false;
$dirs = array(
$IP,
- dirname( dirname( __FILE__ ) ),
+ dirname( __DIR__ ),
realpath( $IP )
);
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to move a batch of pages.
}
/** Figure out the base directory for MediaWiki location */
-$mwPath = dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR;
+$mwPath = dirname( __DIR__ ) . DIRECTORY_SEPARATOR;
/** doxygen binary script */
$doxygenBin = 'doxygen';
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that checks for articles to fix after
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/../Maintenance.php' );
+require_once( __DIR__ . '/../Maintenance.php' );
class AlterSharedConstraints extends Maintenance {
public function __construct() {
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that looks for 'orphan' revisions hooked to pages which
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that manually runs an SQL patch outside of the general updaters.
* @author Simetrical
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Mainteance script to populate the category table.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to populate the img_sha1 field.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that makes the required database updates for populating the
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that makes the required database updates for
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that makes the required database updates for rev_parent_id
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that populates the rev_len field for old revisions
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that fills the rev_sha1 and ar_sha1 columns of revision
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/dumpIterator.php' );
+require_once( __DIR__ . '/dumpIterator.php' );
/**
* Maintenance script that takes page text out of an XML dump file and
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/commandLine.inc' );
+require_once( __DIR__ . '/commandLine.inc' );
$wgHooks['BeforeParserFetchTemplateAndtitle'][] = 'PPFuzzTester::templateHook';
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that protects or unprotects a page.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that prunes file cache for pages, objects, resources, etc.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that scans the deletion log and purges affected files
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that purges old text records from the database.
* @ingroup Maintenance
*/
-require( dirname( __FILE__ ) . '/Maintenance.php' );
+require( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to remove old objects from the parser cache.
* @ingroup Maintenance Memcached
*/
-require_once( dirname( __FILE__ ) . '/commandLine.inc' );
+require_once( __DIR__ . '/commandLine.inc' );
function purgeStaleMemcachedText() {
global $wgMemc, $wgDBname;
* @licence GNU General Public Licence 2.0 or later
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that reassigns edits from a user or IP address
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that builds file cache for content pages.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to update image metadata records.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to rebuild the localisation cache.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that rebuilds link tracking tables from scratch.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that purges all languages from the message cache.
* @todo Document
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that rebuilds recent changes from scratch.
* @todo document
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that rebuilds search index table from scratch.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
class RefreshImageCount extends Maintenance {
public function __construct() {
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to refresh image metadata fields.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to refresh link tables.
* @author Rob Church <robchur@gmail.com>
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that removes unused user accounts from the database.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that changes the prefix of database tables.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to reset the user_token for all users on the wiki.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to rollback all edits by a given user or IP provided
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to run a database query in batches and wait for slaves.
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that runs pending jobs.
* @author Antoine Musso
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
class ShowJobs extends Maintenance {
public function __construct() {
* @license GNU General Public License 2.0 or later
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
class ShowStats extends Maintenance {
public function __construct() {
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
class MwSql extends Maintenance {
public function __construct() {
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
class SqliteMaintenance extends Maintenance {
public function __construct() {
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
class CacheStats extends Maintenance {
*/
if ( !defined( 'MEDIAWIKI' ) ) {
- require_once( dirname( __FILE__ ) . '/../commandLine.inc' );
+ require_once( __DIR__ . '/../commandLine.inc' );
$cs = new CheckStorage;
$fix = isset( $options['fix'] );
* @ingroup Maintenance ExternalStorage
*/
-require_once( dirname( __FILE__ ) . '/../Maintenance.php' );
+require_once( __DIR__ . '/../Maintenance.php' );
class CompressOld extends Maintenance {
/**
* @ingroup Maintenance ExternalStorage
*/
-require_once( dirname( __FILE__ ) . '/../Maintenance.php' );
+require_once( __DIR__ . '/../Maintenance.php' );
class DumpRev extends Maintenance {
public function __construct() {
* @ingroup Maintenance ExternalStorage
*/
-require_once( dirname( __FILE__ ) . '/../Maintenance.php' );
+require_once( __DIR__ . '/../Maintenance.php' );
class FixBug20757 extends Maintenance {
var $batchSize = 10000;
define( 'REPORTING_INTERVAL', 1 );
if ( !defined( 'MEDIAWIKI' ) ) {
- require_once( dirname( __FILE__ ) . '/../commandLine.inc' );
- require_once( dirname( __FILE__ ) . '/../../includes/ExternalStoreDB.php' );
+ require_once( __DIR__ . '/../commandLine.inc' );
+ require_once( __DIR__ . '/../../includes/ExternalStoreDB.php' );
require_once( 'resolveStubs.php' );
$fname = 'moveToExternal';
*
* @ingroup Maintenance ExternalStorage
*/
-require_once( dirname( __FILE__ ) . '/../Maintenance.php' );
+require_once( __DIR__ . '/../Maintenance.php' );
class OrphanStats extends Maintenance {
public function __construct() {
*/
$optionsWithArgs = RecompressTracked::getOptionsWithArgs();
-require( dirname( __FILE__ ) . '/../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( dirname( __FILE__ ) . '/../commandLine.inc' );
+ require_once( __DIR__ . '/../commandLine.inc' );
resolveStubs();
}
* @ingroup Maintenance ExternalStorage
*/
-require_once( dirname( __FILE__ ) . '/../Maintenance.php' );
+require_once( __DIR__ . '/../Maintenance.php' );
class StorageTypeStats extends Maintenance {
function execute() {
*/
$optionsWithArgs = array( 'start', 'limit', 'type' );
-require( dirname( __FILE__ ) . '/../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( dirname( __FILE__ ) . '/../commandLine.inc' );
+require( __DIR__ . '/../commandLine.inc' );
if ( count( $args ) < 1 ) {
$dbw->query( 'DROP TABLE ' . $dbw->tableName( 'blob_tracking' ) );
$dbw->query( 'DROP TABLE ' . $dbw->tableName( 'blob_orphans' ) );
}
- $dbw->sourceFile( dirname( __FILE__ ) . '/blob_tracking.sql' );
+ $dbw->sourceFile( __DIR__ . '/blob_tracking.sql' );
}
function getTextClause() {
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
class SyncFileBackend extends Maintenance {
public function __construct() {
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
class Undelete extends Maintenance {
public function __construct() {
}
$wgUseMasterForMaintenance = true;
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
class UpdateMediaWiki extends Maintenance {
* @author Rob Church <robchur@gmail.com>
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
class UpdateArticleCount extends Maintenance {
#$optionsWithArgs = array( 'begin', 'max-slave-lag' );
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
class UpdateCollation extends Maintenance {
const BATCH_SIZE = 50; // Number of rows to process in one batch
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
class UpdateDoubleWidthSearch extends Maintenance {
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
class UpdateRestrictions extends Maintenance {
public function __construct() {
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
class UpdateSearchIndex extends Maintenance {
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
class UpdateSpecialPages extends Maintenance {
public function __construct() {
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
define( 'MW_UPGRADE_COPY', false );
define( 'MW_UPGRADE_ENCODE', true );
$options = array( 'list', 'nowarn', 'quiet', 'usage', 'dry' );
$optionsWithArgs = array( 'old', 'new' );
-require_once( dirname( __FILE__ ) . '/commandLine.inc' );
+require_once( __DIR__ . '/commandLine.inc' );
/**
* @ingroup Maintenance
* @see wfWaitForSlaves()
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
class WaitForSlave extends Maintenance {
public function __construct() {
define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' );
define( 'MEDIAWIKI_INSTALL', true );
-chdir( dirname( dirname( __FILE__ ) ) );
+chdir( dirname( __DIR__ ) );
if ( isset( $_SERVER['MW_COMPILED'] ) ) {
require ( 'core/includes/WebStart.php' );
} else {
- require( dirname( dirname( __FILE__ ) ) . '/includes/WebStart.php' );
+ require( dirname( __DIR__ ) . '/includes/WebStart.php' );
}
wfInstallerMain();
if ( isset( $_SERVER['MW_COMPILED'] ) ) {
require ( 'core/includes/WebStart.php' );
} else {
- require ( dirname( __FILE__ ) . '/includes/WebStart.php' );
+ require ( __DIR__ . '/includes/WebStart.php' );
}
if ( isset( $_SERVER['MW_COMPILED'] ) ) {
require ( 'phase3/includes/WebStart.php' );
} else {
- require ( dirname( __FILE__ ) . '/includes/WebStart.php' );
+ require ( __DIR__ . '/includes/WebStart.php' );
}
global $wgArticlePath;
* http://www.gnu.org/copyleft/gpl.html
*/
-$IP = dirname( dirname( __FILE__ ) );
+$IP = dirname( __DIR__ );
define( 'SELENIUMTEST', true );
-//require_once( dirname( __FILE__ ) . '/../maintenance/commandLine.inc' );
-require( dirname( __FILE__ ) . '/../maintenance/Maintenance.php' );
+//require_once( __DIR__ . '/../maintenance/commandLine.inc' );
+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( dirname( __FILE__ ) . "/selenium/SeleniumServerManager.php" );
+require_once( __DIR__ . "/selenium/SeleniumServerManager.php" );
class SeleniumTester extends Maintenance {
protected $selenium;
<?php
global $wgAutoloadClasses;
-$testFolder = dirname( __FILE__ );
+$testFolder = __DIR__;
$wgAutoloadClasses += array(
*
*/
-$maintenanceDir = dirname( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) ) . '/maintenance';
+$maintenanceDir = dirname( dirname( dirname( dirname( __DIR__ ) ) ) ) . '/maintenance';
require( "$maintenanceDir/Maintenance.php" );
$otions = array( 'quick', 'color', 'quiet', 'help', 'show-output', 'record', 'run-disabled' );
$optionsWithArgs = array( 'regex', 'filter', 'seed', 'setversion' );
-require_once( dirname( __FILE__ ) . '/../maintenance/commandLine.inc' );
+require_once( __DIR__ . '/../maintenance/commandLine.inc' );
if ( isset( $options['help'] ) ) {
echo <<<ENDS
# PHPUnit uses stream_resolve_include_path() internally
# See bug 32022
set_include_path(
- dirname( __FILE__ )
+ __DIR__
.PATH_SEPARATOR
. get_include_path()
);
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 ( dirname( __FILE__ ) . "/phpunit.php" );
+ require_once ( __DIR__ . "/phpunit.php" );
}
// Output a notice when running with older versions of PHPUnit
/**
* @group Database
*/
-require dirname( __FILE__ ) . "/../../../maintenance/runJobs.php";
+require __DIR__ . "/../../../maintenance/runJobs.php";
class TemplateCategoriesTest extends MediaWikiLangTestCase {
var $zipDir, $entries;
function setUp() {
- $this->zipDir = dirname( __FILE__ ) . '/../data/zip';
+ $this->zipDir = __DIR__ . '/../data/zip';
}
function zipCallback( $entry ) {
foreach ( array(
'/usr/share/dict/words',
'/usr/dict/words',
- dirname( __FILE__ ) . '/words.txt' )
+ __DIR__ . '/words.txt' )
as $dictionaryFile ) {
if ( is_file( $dictionaryFile ) and is_readable( $dictionaryFile ) ) {
$this->dictionaryFile = $dictionaryFile;
*/
// Evaluate the include path relative to this file
-$IP = dirname( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) );
+$IP = dirname( dirname( dirname( dirname( __DIR__ ) ) ) );
// Start up MediaWiki in command-line mode
require_once( "$IP/maintenance/Maintenance.php" );
-require( dirname( __FILE__ ) . "/RandomImageGenerator.php" );
+require( __DIR__ . "/RandomImageGenerator.php" );
class GenerateRandomImages extends Maintenance {
* @licence GNU GPL v2+
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
*/
-require_once dirname( __FILE__ ) . "/ORMRowTest.php";
+require_once __DIR__ . "/ORMRowTest.php";
class TestORMRowTest extends ORMRowTest {
class BitmapMetadataHandlerTest extends MediaWikiTestCase {
public function setUp() {
- $this->filePath = dirname( __FILE__ ) . '/../../data/media/';
+ $this->filePath = __DIR__ . '/../../data/media/';
}
/**
function setUp() {
parent::setUp();
$this->handler = new BitmapHandler();
- $filePath = dirname( __FILE__ ) . '/../../data/media';
+ $filePath = __DIR__ . '/../../data/media';
$tmpDir = $this->getNewTempDirectory();
class ExifTest extends MediaWikiTestCase {
public function setUp() {
- $this->mediaPath = dirname( __FILE__ ) . '/../../data/media/';
+ $this->mediaPath = __DIR__ . '/../../data/media/';
if ( !wfDl( 'exif' ) ) {
$this->markTestSkipped( "This test needs the exif extension." );
if ( !wfDl( 'exif' ) ) {
$this->markTestSkipped( "This test needs the exif extension." );
}
- $filePath = dirname( __FILE__ ) . '/../../data/media';
+ $filePath = __DIR__ . '/../../data/media';
$this->backend = new FSFileBackend( array(
'name' => 'localtesting',
'lockManager' => 'nullLockManager',
class GIFMetadataExtractorTest extends MediaWikiTestCase {
public function setUp() {
- $this->mediaPath = dirname( __FILE__ ) . '/../../data/media/';
+ $this->mediaPath = __DIR__ . '/../../data/media/';
}
/**
* Put in a file, and see if the metadata coming out is as expected.
class GIFHandlerTest extends MediaWikiTestCase {
public function setUp() {
- $this->filePath = dirname( __FILE__ ) . '/../../data/media';
+ $this->filePath = __DIR__ . '/../../data/media';
$this->backend = new FSFileBackend( array(
'name' => 'localtesting',
'lockManager' => 'nullLockManager',
class JpegMetadataExtractorTest extends MediaWikiTestCase {
public function setUp() {
- $this->filePath = dirname( __FILE__ ) . '/../../data/media/';
+ $this->filePath = __DIR__ . '/../../data/media/';
}
/**
class JpegTest extends MediaWikiTestCase {
public function setUp() {
- $this->filePath = dirname( __FILE__ ) . '/../../data/media/';
+ $this->filePath = __DIR__ . '/../../data/media/';
if ( !wfDl( 'exif' ) ) {
$this->markTestSkipped( "This test needs the exif extension." );
}
class PNGMetadataExtractorTest extends MediaWikiTestCase {
function setUp() {
- $this->filePath = dirname( __FILE__ ) . '/../../data/media/';
+ $this->filePath = __DIR__ . '/../../data/media/';
}
/**
* Tests zTXt tag (compressed textual metadata)
class PNGHandlerTest extends MediaWikiTestCase {
public function setUp() {
- $this->filePath = dirname( __FILE__ ) . '/../../data/media';
+ $this->filePath = __DIR__ . '/../../data/media';
$this->backend = new FSFileBackend( array(
'name' => 'localtesting',
'lockManager' => 'nullLockManager',
}
function providerSvgFiles() {
- $base = dirname( __FILE__ ) . '/../../data/media';
+ $base = __DIR__ . '/../../data/media';
return array(
array(
"$base/Wikimedia-logo.svg",
}
function providerSvgFilesWithXMLMetadata() {
- $base = dirname( __FILE__ ) . '/../../data/media';
+ $base = __DIR__ . '/../../data/media';
$metadata =
'<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<ns4:Work xmlns:ns4="http://creativecommons.org/ns#" rdf:about="">
global $wgShowEXIF;
$this->showExif = $wgShowEXIF;
$wgShowEXIF = true;
- $this->filePath = dirname( __FILE__ ) . '/../../data/media/';
+ $this->filePath = __DIR__ . '/../../data/media/';
$this->handler = new TiffHandler;
}
}
public function dataXMPParse() {
- $xmpPath = dirname( __FILE__ ) . '/../../data/xmp/' ;
+ $xmpPath = __DIR__ . '/../../data/xmp/' ;
$data = array();
// $xmpFiles format: array of arrays with first arg file base name,
* world example file to double check the support for this is right.
*/
function testExtendedXMP() {
- $xmpPath = dirname( __FILE__ ) . '/../../data/xmp/';
+ $xmpPath = __DIR__ . '/../../data/xmp/';
$standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
$extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
* and thus should only return the StandardXMP, not the ExtendedXMP.
*/
function testExtendedXMPWithWrongGUID() {
- $xmpPath = dirname( __FILE__ ) . '/../../data/xmp/';
+ $xmpPath = __DIR__ . '/../../data/xmp/';
$standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
$extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
* which should cause it to ignore the ExtendedXMP packet.
*/
function testExtendedXMPMissingPacket() {
- $xmpPath = dirname( __FILE__ ) . '/../../data/xmp/';
+ $xmpPath = __DIR__ . '/../../data/xmp/';
$standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
$extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
<?php
-require_once( dirname( __FILE__ ) . '/NewParserTest.php' );
+require_once( __DIR__ . '/NewParserTest.php' );
/**
* The UnitTest must be either a class that inherits from MediaWikiTestCase
array( "{{foo|bar=|}", "<root>{{foo|bar=|}</root>"),
array( "{{Foo|} Bar=", "<root>{{Foo|} Bar=</root>"),
array( "{{Foo|} Bar=}}", "<root><template><title>Foo</title><part><name>} Bar</name>=<value></value></part></template></root>"),
- /* array( file_get_contents( dirname( __FILE__ ) . '/QuoteQuran.txt' ), file_get_contents( dirname( __FILE__ ) . '/QuoteQuranExpanded.txt' ) ), */
+ /* array( file_get_contents( __DIR__ . '/QuoteQuran.txt' ), file_get_contents( __DIR__ . '/QuoteQuranExpanded.txt' ) ), */
);
}
* @dataProvider provideFiles
*/
function testPreprocessorOutputFiles( $filename ) {
- $folder = dirname( __FILE__ ) . "/../../../parser/preprocess";
+ $folder = __DIR__ . "/../../../parser/preprocess";
$wikiText = file_get_contents( "$folder/$filename.txt" );
$output = $this->preprocessToXml( $wikiText );
parent::setUp();
// Setup a file for bug 29408
- $this->bug29408File = dirname( __FILE__ ) . '/bug29408';
+ $this->bug29408File = __DIR__ . '/bug29408';
file_put_contents( $this->bug29408File, "\x00" );
self::$users = array(
* @file
*/
-require_once dirname( dirname( __FILE__ ) ) . '/bootstrap.php';
+require_once dirname( __DIR__ ) . '/bootstrap.php';
/** Tests for MediaWiki languages/LanguageSr.php */
class LanguageSrTest extends MediaWikiTestCase {
* @file
*/
-require_once dirname( dirname( __FILE__ ) ) . '/bootstrap.php';
+require_once dirname( __DIR__ ) . '/bootstrap.php';
/** Tests for MediaWiki languages/LanguageUz.php */
class LanguageUzTest extends MediaWikiTestCase {
<?php
-require_once dirname( __FILE__ ) . "/../../../maintenance/backupPrefetch.inc";
+require_once __DIR__ . "/../../../maintenance/backupPrefetch.inc";
/**
* Tests for BaseDump
<?php
-require_once dirname( __FILE__ ) . "/../../../maintenance/backupTextPass.inc";
+require_once __DIR__ . "/../../../maintenance/backupTextPass.inc";
/**
* Tests for page dumps of BackupDumper
<?php
-require_once dirname( __FILE__ ) . "/../../../maintenance/fetchText.php";
+require_once __DIR__ . "/../../../maintenance/fetchText.php";
/**
* Mock for the input/output of FetchText
<?php
-require_once dirname( __FILE__ ) . "/../../../maintenance/getSlaveServer.php";
+require_once __DIR__ . "/../../../maintenance/getSlaveServer.php";
/**
* Tests for getSlaveServer
/* Configuration */
// Evaluate the include path relative to this file
-$IP = dirname( dirname( dirname( __FILE__ ) ) );
+$IP = dirname( dirname( __DIR__ ) );
// Set a flag which can be used to detect when other scripts have been entered through this entry point or not
define( 'MW_PHPUNIT_TEST', true );
<?php
-require_once( dirname( dirname( __FILE__ ) ) . '/includes/upload/UploadFromUrlTest.php' );
+require_once( dirname( __DIR__ ) . '/includes/upload/UploadFromUrlTest.php' );
class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite {
public $savedGlobals = array();
*/
-require_once ( dirname( __FILE__ ) . '/MediaWikiInstallationCommonFunction.php' );
+require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
/**
* Test Case ID : 04 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
*
*/
-require_once ( dirname( __FILE__ ) . '/MediaWikiInstallationCommonFunction.php' );
+require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
/**
* Test Case ID : 02 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
*/
-require_once ( dirname( __FILE__ ) . '/MediaWikiInstallationCommonFunction.php' );
+require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
/**
* Test Case ID : 09 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
* Version : MediaWiki 1.18alpha
*/
-require_once ( dirname( __FILE__ ) . '/MediaWikiInstallationCommonFunction.php' );
+require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
class MediaWikiErrorsNamepageTestCase extends MediaWikiInstallationCommonFunction {
* Version : MediaWiki 1.18alpha
*/
-require_once ( dirname( __FILE__ ) . '/MediaWikiInstallationCommonFunction.php' );
+require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
class MediaWikiHelpFieldHintTestCase extends MediaWikiInstallationCommonFunction {
*/
require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
-require_once ( dirname( __FILE__ ) . '/MediaWikiInstallationConfig.php' );
+require_once ( __DIR__ . '/MediaWikiInstallationConfig.php' );
require_once ( dirname(__FILE__) . '/MediaWikiInstallationMessage.php' );
require_once ( dirname(__FILE__) . '/MediaWikiInstallationVariables.php');
require_once 'PHPUnit/Framework.php';
require_once 'PHPUnit/Framework/TestSuite.php';
-require_once ( dirname( __FILE__ ) . '/MediaWikiUserInterfaceTestCase.php' );
-require_once ( dirname( __FILE__ ) . '/MediaWikiButtonsAvailabilityTestCase.php' );
-require_once ( dirname( __FILE__ ) . '/MediaWikiHelpFieldHintTestCase.php' );
-require_once ( dirname( __FILE__ ) . '/MediaWikiRightFrameworkLinksTestCase.php' );
-require_once ( dirname( __FILE__ ) . '/MediaWikiRestartInstallationTestCase.php' );
-require_once ( dirname( __FILE__ ) . '/MediaWikiErrorsConnectToDatabasePageTestCase.php' );
-require_once ( dirname( __FILE__ ) . '/MediaWikiErrorsNamepageTestCase.php' );
-require_once ( dirname( __FILE__ ) . '/MediaWikiMySQLDataBaseTestCase.php' );
-require_once ( dirname( __FILE__ ) . '/MediaWikiMySQLiteDataBaseTestCase.php' );
-require_once ( dirname( __FILE__ ) . '/MediaWikiUpgradeExistingDatabaseTestCase.php' );
-require_once ( dirname( __FILE__ ) . '/MediaWikiDifferntDatabasePrefixTestCase.php' );
-require_once ( dirname( __FILE__ ) . '/MediaWikiDifferentDatabaseAccountTestCase.php' );
-require_once ( dirname( __FILE__ ) . '/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' );
$this->login();
$this->open( $this->getUrl() .
'/index.php?title=Special:Upload' );
- $this->type( 'wpUploadFile', dirname( __FILE__ ) .
+ $this->type( 'wpUploadFile', __DIR__ .
"\\..\\data\\Wikipedia-logo-v2-de.png" );
$this->check( 'wpIgnoreWarning' );
$this->click( 'wpUpload' );
*
*/
-require_once dirname( dirname( __FILE__ ) ) . '/SeleniumTestConstants.php';
+require_once dirname( __DIR__ ) . '/SeleniumTestConstants.php';
class MyContributionsTestCase extends SeleniumTestCase {
*
*/
-require_once dirname( dirname( __FILE__ ) ) . '/SeleniumTestConstants.php';
+require_once dirname( __DIR__ ) . '/SeleniumTestConstants.php';
class MyWatchListTestCase extends SeleniumTestCase {
if ( isset( $_SERVER['MW_COMPILED'] ) ) {
require( 'core/includes/WebStart.php' );
} else {
- require( dirname( __FILE__ ) . '/includes/WebStart.php' );
+ require( __DIR__ . '/includes/WebStart.php' );
}
// Don't use fancy mime detection, just check the file extension for jpg/gif/png
# Execute thumb.php, having set THUMB_HANDLER so that
# it knows to extract params from a thumbnail file URL.
-require( dirname( __FILE__ ) . '/thumb.php' );
+require( __DIR__ . '/thumb.php' );