Go to the documentation of this file.
35 if ( is_dir(
$dir ) ) {
36 $dhl = opendir(
$dir );
39 while ( (
$file = readdir( $dhl ) ) !==
false ) {
42 if ( array_search( strtolower(
$ext ), $exts ) !==
false ) {
65 $parts = explode(
'.', $filename );
66 $ext = $parts[ count( $parts ) - 1 ];
67 unset( $parts[ count( $parts ) - 1 ] );
68 $fname = implode(
'.', $parts );
87 if ( strpos( $auxExtension,
'.' ) !== 0 ) {
88 $auxExtension =
'.' . $auxExtension;
91 $d = dirname(
$file );
94 while ( $maxStrip >= 0 ) {
95 $f = $d .
'/' .
$n . $auxExtension;
97 if ( file_exists(
$f ) ) {
101 $idx = strrpos(
$n,
'.' );
106 $n = substr(
$n, 0, $idx );
113 # FIXME: Access the api in a saner way and performing just one query (preferably batching files too).
115 $url = $wiki_host .
'/api.php?action=query&format=xml&titles=File:' . rawurlencode(
$file ) .
'&prop=imageinfo&&iiprop=comment';
117 if ( preg_match(
'#<ii comment="([^"]*)" />#', $body,
$matches ) == 0 ) {
121 return html_entity_decode(
$matches[1] );
125 $url = $wiki_host .
'/api.php?action=query&format=xml&titles=File:' . rawurlencode(
$file ) .
'&prop=imageinfo&&iiprop=user';
127 if ( preg_match(
'#<ii user="([^"]*)" />#', $body,
$matches ) == 0 ) {
131 return html_entity_decode(
$matches[1] );
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
if(!defined( 'MEDIAWIKI')) $fname
This file is not a valid entry point, perform no further processing unless MEDIAWIKI is defined.
splitFilename( $filename)
Split a filename into filename and extension.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
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 get( $url, $timeout='default', $options=array())
Simple wrapper for Http::request( 'GET' )
findFiles( $dir, $exts, $recurse=false)
Search a directory for files with one of a set of extensions.
if(!defined( 'MEDIAWIKI')) if(!isset( $wgVersion)) $matches
getFileUserFromSourceWiki( $wiki_host, $file)
if(PHP_SAPI !='cli') $file
if(count( $args)==0) $dir
getFileCommentFromSourceWiki( $wiki_host, $file)
findAuxFile( $file, $auxExtension, $maxStrip=1)
Find an auxilliary file with the given extension, matching the give base file path.