Go to the documentation of this file.
57 if ( !$wgExternalStores || !in_array( $proto, $wgExternalStores ) ) {
61 $class =
'ExternalStore' . ucfirst( $proto );
64 return class_exists( $class ) ?
new $class(
$params ) :
false;
76 $parts = explode(
'://', $url, 2 );
77 if ( count( $parts ) != 2 ) {
87 if ( $store ===
false ) {
91 return $store->fetchFromURL( $url );
103 foreach ( $urls
as $url ) {
104 $scheme = parse_url( $url, PHP_URL_SCHEME );
106 $batches[$scheme][] = $url;
110 foreach ( $batches
as $proto => $batchedUrls ) {
112 if ( $store ===
false ) {
115 $retval += $store->batchFetchFromURLs( $batchedUrls );
118 $missing = array_diff( $urls, array_keys(
$retval ) );
120 foreach ( $missing
as $url ) {
140 $parts = explode(
'://', $url, 2 );
141 if ( count( $parts ) != 2 ) {
151 if ( $store ===
false ) {
154 return $store->store(
$path, $data );
170 global $wgDefaultExternalStore;
189 while ( count( $tryStores ) > 0 ) {
190 $index = mt_rand( 0, count( $tryStores ) - 1 );
191 $storeUrl = $tryStores[$index];
192 wfDebug( __METHOD__ .
": trying $storeUrl\n" );
193 list( $proto,
$path ) = explode(
'://', $storeUrl, 2 );
195 if ( $store ===
false ) {
196 throw new MWException(
"Invalid external storage protocol - $storeUrl" );
199 $url = $store->store(
$path, $data );
203 if ( strlen( $url ) ) {
206 unset( $tryStores[$index] );
207 $tryStores = array_values( $tryStores );
209 "Unable to store text to external storage $storeUrl" );
216 throw new MWException(
"Unable to store text to external storage" );
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
wfDebugLog( $logGroup, $text, $dest='all')
Send a line to a supplementary debug log file, if configured, or main debug log if not.
static insertWithFallback(array $tryStores, $data, array $params=array())
Like insert() above, but does more of the work for us.
static insert( $url, $data, array $params=array())
Store a data item to an external store, identified by a partial URL The protocol part is used to iden...
static insertToDefault( $data, array $params=array())
Like insert() above, but does more of the work for us.
Constructor class for key/value blob data kept in external repositories.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
static getStoreObject( $proto, array $params=array())
Get an external store object of the given type, with the given parameters.
wfDebug( $text, $dest='all')
Sends a line to the debug log if enabled or, optionally, to a comment in output.
static fetchFromURL( $url, array $params=array())
Fetch data from given URL.
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
usually copyright or history_copyright This message must be in HTML not wikitext $subpages will be ignored and the rest of subPageSubtitle() will run. 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink' whether MediaWiki currently thinks this is a CSS JS page Hooks may change this value to override the return value of Title::isCssOrJsPage(). 'TitleIsAlwaysKnown' whether MediaWiki currently thinks this page is known isMovable() always returns false. $title whether MediaWiki currently thinks this page is movable Hooks may change this value to override the return value of Title::isMovable(). 'TitleIsWikitextPage' whether MediaWiki currently thinks this is a wikitext page Hooks may change this value to override the return value of Title::isWikitextPage() 'TitleMove' use UploadVerification and UploadVerifyFile instead where the first element is the message key and the remaining elements are used as parameters to the message based on mime etc Preferred in most cases over UploadVerification object with all info about the upload string as detected by MediaWiki Handlers will typically only apply for specific mime types object & $error
static batchFetchFromURLs(array $urls)
Fetch data from multiple URLs with a minimum of round trips.
static insertToForeignDefault( $data, $wiki)
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account incomplete not yet checked for validity & $retval