$wgBetterDirectionality = true;
/**
- * Some web hosts attempt to rewrite all responses with a 404 (not found)
+ * Some web hosts attempt to rewrite all responses with a 404 (not found)
* status code, mangling or hiding MediaWiki's output. If you are using such a
- * host, you should start looking for a better one. While you're doing that,
+ * host, you should start looking for a better one. While you're doing that,
* set this to false to convert some of MediaWiki's 404 responses to 200 so
* that the generated error pages can be seen.
*
- * In cases where for technical reasons it is more important for MediaWiki to
+ * In cases where for technical reasons it is more important for MediaWiki to
* send the correct status code than for the body to be transmitted intact,
* this configuration variable is ignored.
*/
const RENDER_NOW = 1;
/**
* Force rendering even if thumbnail already exist and using RENDER_NOW
- * I.e. you have to pass both flags: File::RENDER_NOW | File::RENDER_FORCE
+ * I.e. you have to pass both flags: File::RENDER_NOW | File::RENDER_FORCE
*/
const RENDER_FORCE = 2;
/**
* Call this constructor from child classes.
- *
+ *
* Both $title and $repo are optional, though some functions
* may return false or throw exceptions if they are not set.
* Most subclasses will want to call assertRepoDefined() here.
* Get an FS copy or original of this file and return the path.
* Returns false on failure. Callers must not alter the file.
* Temporary files are cleared automatically.
- *
+ *
* @return string|false
*/
public function getLocalRefPath() {
return $this->handler->getTransform( $this, $thumbPath, $thumbUrl, $params );
}
} elseif ( $flags & self::RENDER_FORCE ) {
- wfDebug( __METHOD__ . " forcing rendering per flag File::RENDER_FORCE\n" );
+ wfDebug( __METHOD__ . " forcing rendering per flag File::RENDER_FORCE\n" );
}
// Create a temp FS file with the same extension
wfRunHooks( 'BitmapHandlerCheckImageArea', array( $image, &$params, &$checkImageAreaHookResult ) );
if ( is_null( $checkImageAreaHookResult ) ) {
global $wgMaxImageArea;
-
+
if ( $srcWidth * $srcHeight > $wgMaxImageArea &&
- !( $image->getMimeType() == 'image/jpeg' &&
+ !( $image->getMimeType() == 'image/jpeg' &&
self::getScalerType( false, false ) == 'im' ) ) {
# Only ImageMagick can efficiently downsize jpg images without loading
# the entire file in memory
} else {
return $checkImageAreaHookResult;
}
-
+
return true;
}
/**
* Function that returns the number of pixels to be thumbnailed.
* Intended for animated GIFs to multiply by the number of frames.
- *
+ *
* @param File $image
* @return int
- */
+ */
function getImageArea( $image ) {
return $image->getWidth() * $image->getHeight();
}
# Determine scaler type
$scaler = self::getScalerType( $dstPath );
-
+
wfDebug( __METHOD__ . ": creating {$scalerParams['physicalDimensions']} thumbnail at $dstPath using scaler $scaler\n" );
if ( !$image->mustRender() &&
// Treat Software as a special case because in can contain
// an array of (SoftwareName, Version).
- if (isset( $metadata['Software'] )
- && is_array( $metadata['Software'] )
+ if (isset( $metadata['Software'] )
+ && is_array( $metadata['Software'] )
&& is_array( $metadata['Software'][0])
&& isset( $metadata['Software'][0][0] )
&& isset( $metadata['Software'][0][1])
function getImageSize( $image, $path ) {
global $wgEnableAutoRotation;
$gis = parent::getImageSize( $image, $path );
-
+
// Don't just call $image->getMetadata(); FSFile::getPropsFromPath() calls us with a bogus object.
// This may mean we read EXIF data twice on initial upload.
if ( $wgEnableAutoRotation ) {
if ( !$wgEnableAutoRotation ) {
return 0;
}
-
+
$data = $file->getMetadata();
return $this->getRotationForExif( $data );
}
'newuserlog-byemail' => 'password sent by e-mail',
# Feedback
-'feedback-bugornote' => 'If you are ready to describe a technical problem in detail please [$1 report a bug].
+'feedback-bugornote' => 'If you are ready to describe a technical problem in detail please [$1 report a bug].
Otherwise, you can use the easy form below. Your comment will be added to the page "[$3 $2]", along with your username and what browser you are using.',
'feedback-subject' => 'Subject:',
'feedback-message' => 'Message:',
'http-invalid-scheme' => 'The message appears in the Mediawiki code as follows:
if ( $this->parsedUrl[\'scheme\'] != \'http\' ) {
- $this->status->fatal( \'http-invalid-scheme\', $this->parsedUrl[\'scheme\'] );
+ $this->status->fatal( \'http-invalid-scheme\', $this->parsedUrl[\'scheme\'] );
}
Siebrand think this has to do with allowing MediaWiki to fetch remote URLs, and in that not allowing anything but "http://" request. So if this for example is "irc://" or "https://", $1 would be "irc" or "https" respectively.