3require_once dirname( __DIR__ ) .
'/includes/upload/UploadFromUrlTest.php';
23 $tmpDir = $this->getNewTempDirectory();
26 $tmpGlobals[
'wgScript'] =
'/index.php';
27 $tmpGlobals[
'wgScriptPath'] =
'/';
28 $tmpGlobals[
'wgArticlePath'] =
'/wiki/$1';
29 $tmpGlobals[
'wgStylePath'] =
'/skins';
30 $tmpGlobals[
'wgThumbnailScriptPath'] =
false;
31 $tmpGlobals[
'wgLocalFileRepo'] = [
32 'class' => LocalRepo::class,
34 'url' =>
'http://example.com/images',
36 'transformVia404' =>
false,
38 'name' =>
'local-backend',
41 'local-public' =>
"{$tmpDir}/test-repo/public",
42 'local-thumb' =>
"{$tmpDir}/test-repo/thumb",
43 'local-temp' =>
"{$tmpDir}/test-repo/temp",
44 'local-deleted' =>
"{$tmpDir}/test-repo/delete",
48 foreach ( $tmpGlobals as $var => $val ) {
49 if ( array_key_exists( $var,
$GLOBALS ) ) {
50 $this->savedGlobals[$var] =
$GLOBALS[$var];
60 DeferredUpdates::clearPendingUpdates();
81 foreach ( $this->savedGlobals as $var => $val ) {
91 public static function suite() {
94 class_exists(
'UploadFromUrlTest' );
$wgParserCacheType
The cache type for storing article HTML.
$wgStyleDirectory
Filesystem stylesheets directory.
$wgNamespaceProtection
Set the minimum permissions required to edit pages in each namespace.
$wgParserConf
Parser configuration.
$wgNamespaceAliases
Namespace aliases.
wfGetMessageCacheStorage()
Get the cache object used by the message cache.
wfGetMainCache()
Get the main cache object.
wfWikiID()
Get an ASCII string identifying this wiki This is used as a prefix in memcached keys.
if(! $wgDBerrorLogTZ) $wgRequest
Class for a file system (FS) based file backend.
static destroySingleton()
Destroy the singleton instance.
static destroySingleton()
Destroy the singleton instance, so that a new one will be created next time singleton() is called.
static resetMain()
Resets singleton returned by getMain().
static getMain()
Get the RequestContext object associated with the main request.
Class to implement stub globals, which are globals that delay loading the their associated module cod...
static addTables(&$tables)
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as $wgLang
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist & $tables
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on and they can depend only on the ResourceLoaderContext $context
globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of globals were initialised on startup by MediaWiki of these were configuration which are documented in DefaultSettings php There is no comprehensive documentation for the remaining however some of the most important ones are listed below They are typically initialised either in index php or in Setup php For a description of the see design txt $wgTitle Title object created from the request URL $wgOut OutputPage object for HTTP response $wgUser User object for the user associated with the current request $wgLang Language object selected by user preferences $wgContLang Language object associated with the wiki being viewed $wgParser Parser object Parser extensions register their hooks here $wgRequest WebRequest to get request data $messageMemc
globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of globals were initialised on startup by MediaWiki of these were configuration which are documented in DefaultSettings php There is no comprehensive documentation for the remaining however some of the most important ones are listed below They are typically initialised either in index php or in Setup php For a description of the see design txt $wgTitle Title object created from the request URL $wgOut OutputPage object for HTTP response $wgUser User object for the user associated with the current request $wgLang Language object selected by user preferences $wgContLang Language object associated with the wiki being viewed $wgParser Parser object Parser extensions register their hooks here $wgRequest WebRequest to get request data $wgMemc