dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Deprecate Language::getLangObj()"
[lhc/web/wiklou.git]
/
maintenance
/
importImages.inc
diff --git
a/maintenance/importImages.inc
b/maintenance/importImages.inc
index
ae93287
..
b803e3d
100644
(file)
--- a/
maintenance/importImages.inc
+++ b/
maintenance/importImages.inc
@@
-46,6
+46,7
@@
function findFiles( $dir, $exts, $recurse = false ) {
$files = array_merge( $files, findFiles( $dir . '/' . $file, $exts, true ) );
}
}
$files = array_merge( $files, findFiles( $dir . '/' . $file, $exts, true ) );
}
}
+
return $files;
} else {
return array();
return $files;
} else {
return array();
@@
-63,9
+64,10
@@
function findFiles( $dir, $exts, $recurse = false ) {
*/
function splitFilename( $filename ) {
$parts = explode( '.', $filename );
*/
function splitFilename( $filename ) {
$parts = explode( '.', $filename );
- $ext = $parts[
count( $parts ) - 1
];
- unset( $parts[
count( $parts ) - 1
] );
+ $ext = $parts[
count( $parts ) - 1
];
+ unset( $parts[
count( $parts ) - 1
] );
$fname = implode( '.', $parts );
$fname = implode( '.', $parts );
+
return array( $fname, $ext );
}
return array( $fname, $ext );
}
@@
-110,9
+112,11
@@
function findAuxFile( $file, $auxExtension, $maxStrip = 1 ) {
return false;
}
return false;
}
-# FIXME: Access the api in a saner way and performing just one query (preferably batching files too).
+# @todo FIXME: Access the api in a saner way and performing just one query
+# (preferably batching files too).
function getFileCommentFromSourceWiki( $wiki_host, $file ) {
function getFileCommentFromSourceWiki( $wiki_host, $file ) {
- $url = $wiki_host . '/api.php?action=query&format=xml&titles=File:' . rawurlencode( $file ) . '&prop=imageinfo&&iiprop=comment';
+ $url = $wiki_host . '/api.php?action=query&format=xml&titles=File:'
+ . rawurlencode( $file ) . '&prop=imageinfo&&iiprop=comment';
$body = Http::get( $url );
if ( preg_match( '#<ii comment="([^"]*)" />#', $body, $matches ) == 0 ) {
return false;
$body = Http::get( $url );
if ( preg_match( '#<ii comment="([^"]*)" />#', $body, $matches ) == 0 ) {
return false;
@@
-122,7
+126,8
@@
function getFileCommentFromSourceWiki( $wiki_host, $file ) {
}
function getFileUserFromSourceWiki( $wiki_host, $file ) {
}
function getFileUserFromSourceWiki( $wiki_host, $file ) {
- $url = $wiki_host . '/api.php?action=query&format=xml&titles=File:' . rawurlencode( $file ) . '&prop=imageinfo&&iiprop=user';
+ $url = $wiki_host . '/api.php?action=query&format=xml&titles=File:'
+ . rawurlencode( $file ) . '&prop=imageinfo&&iiprop=user';
$body = Http::get( $url );
if ( preg_match( '#<ii user="([^"]*)" />#', $body, $matches ) == 0 ) {
return false;
$body = Http::get( $url );
if ( preg_match( '#<ii user="([^"]*)" />#', $body, $matches ) == 0 ) {
return false;