X-Git-Url: http://git.cyclocoop.org//%22javascript:ModifierStyle%28%27%22.%24id.%22%27%29/%22?a=blobdiff_plain;f=maintenance%2FimportImages.inc;h=4b839a0f8ac0c4f8b5bcd25b6295c2406ff99601;hb=970c99e5dd34457704dae2ed14d214374693a1d4;hp=7caedeacccf1fea6e83aeadc7d10bc1ba5cae07c;hpb=80dd48238c3a356bab8ba7df1936fbb7349c4630;p=lhc%2Fweb%2Fwiklou.git
diff --git a/maintenance/importImages.inc b/maintenance/importImages.inc
index 7caedeaccc..4b839a0f8a 100644
--- 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 ) );
}
}
+
return $files;
} else {
return array();
@@ -63,9 +64,10 @@ function findFiles( $dir, $exts, $recurse = false ) {
*/
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 );
+
return array( $fname, $ext );
}
@@ -115,7 +117,7 @@ function findAuxFile( $file, $auxExtension, $maxStrip = 1 ) {
function getFileCommentFromSourceWiki( $wiki_host, $file ) {
$url = $wiki_host . '/api.php?action=query&format=xml&titles=File:'
. rawurlencode( $file ) . '&prop=imageinfo&&iiprop=comment';
- $body = Http::get( $url );
+ $body = Http::get( $url, array(), __METHOD__ );
if ( preg_match( '##', $body, $matches ) == 0 ) {
return false;
}
@@ -126,7 +128,7 @@ function getFileCommentFromSourceWiki( $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';
- $body = Http::get( $url );
+ $body = Http::get( $url, array(), __METHOD__ );
if ( preg_match( '##', $body, $matches ) == 0 ) {
return false;
}