summaryrefslogtreecommitdiff
path: root/includes/ImageFunctions.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2007-01-11 19:06:07 +0000
committerPierre Schmitz <pierre@archlinux.de>2007-01-11 19:06:07 +0000
commita58285fd06c8113c45377c655dd43cef6337e815 (patch)
treedfe31d3d12652352fe44890b4811eda0728faefb /includes/ImageFunctions.php
parent20194986f6638233732ba1fc3e838f117d3cc9ea (diff)
Aktualisierung auf MediaWiki 1.9.0
Diffstat (limited to 'includes/ImageFunctions.php')
-rw-r--r--includes/ImageFunctions.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/ImageFunctions.php b/includes/ImageFunctions.php
index d182d527..931fdff1 100644
--- a/includes/ImageFunctions.php
+++ b/includes/ImageFunctions.php
@@ -126,6 +126,7 @@ function wfScaleSVGUnit( $length ) {
'' => 1.0, // "User units" pixels by default
'%' => 2.0, // Fake it!
);
+ $matches = array();
if( preg_match( '/^(\d+(?:\.\d+)?)(em|ex|px|pt|pc|cm|mm|in|%|)$/', $length, $matches ) ) {
$length = floatval( $matches[1] );
$unit = $matches[2];
@@ -156,6 +157,7 @@ function wfGetSVGsize( $filename ) {
fclose( $f );
// Uber-crappy hack! Run through a real XML parser.
+ $matches = array();
if( !preg_match( '/<svg\s*([^>]*)\s*>/s', $chunk, $matches ) ) {
return false;
}
@@ -198,7 +200,7 @@ function wfIsBadImage( $name, $contextTitle = false ) {
if( !$badImages ) {
# Build the list now
$badImages = array();
- $lines = explode( "\n", wfMsgForContent( 'bad_image_list' ) );
+ $lines = explode( "\n", wfMsgForContentNoTrans( 'bad_image_list' ) );
foreach( $lines as $line ) {
# List items only
if ( substr( $line, 0, 1 ) !== '*' ) {
@@ -206,6 +208,7 @@ function wfIsBadImage( $name, $contextTitle = false ) {
}
# Find all links
+ $m = array();
if ( !preg_match_all( '/\[\[:?(.*?)\]\]/', $line, $m ) ) {
continue;
}