diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-12-03 13:29:22 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-12-03 13:29:22 +0100 |
commit | ca32f08966f1b51fcb19460f0996bb0c4048e6fe (patch) | |
tree | ec04cc15b867bc21eedca904cea9af0254531a11 /includes/media/MediaTransformOutput.php | |
parent | a22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c (diff) |
Update to MediaWiki 1.18.0
* also update ArchLinux skin to chagnes in MonoBook
* Use only css to hide our menu bar when printing
Diffstat (limited to 'includes/media/MediaTransformOutput.php')
-rw-r--r-- | includes/media/MediaTransformOutput.php | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/includes/media/MediaTransformOutput.php b/includes/media/MediaTransformOutput.php index c441f06c..f170bb9d 100644 --- a/includes/media/MediaTransformOutput.php +++ b/includes/media/MediaTransformOutput.php @@ -12,7 +12,12 @@ * @ingroup Media */ abstract class MediaTransformOutput { - var $file, $width, $height, $url, $page, $path; + /** + * @var File + */ + var $file; + + var $width, $height, $url, $page, $path; /** * Get the width of the output box @@ -45,7 +50,7 @@ abstract class MediaTransformOutput { /** * Fetch HTML for this transform output * - * @param $options Associative array of options. Boolean options + * @param $options array Associative array of options. Boolean options * should be indicated with a value of true for true, and false or * absent for false. * @@ -73,6 +78,11 @@ abstract class MediaTransformOutput { /** * Wrap some XHTML text in an anchor tag with the given attributes + * + * @param $linkAttribs array + * @param $contents string + * + * @return string */ protected function linkWrap( $linkAttribs, $contents ) { if ( $linkAttribs ) { @@ -82,6 +92,11 @@ abstract class MediaTransformOutput { } } + /** + * @param $title string + * @param $params array + * @return array + */ function getDescLinkAttribs( $title = null, $params = '' ) { $query = $this->page ? ( 'page=' . urlencode( $this->page ) ) : ''; if( $params ) { @@ -98,7 +113,6 @@ abstract class MediaTransformOutput { } } - /** * Media transform output for images * @@ -131,7 +145,7 @@ class ThumbnailImage extends MediaTransformOutput { * Return HTML <img ... /> tag for the thumbnail, will include * width and height attributes and a blank alt text (as required). * - * @param $options Associative array of options. Boolean options + * @param $options array Associative array of options. Boolean options * should be indicated with a value of true for true, and false or * absent for false. * @@ -212,8 +226,8 @@ class MediaTransformError extends MediaTransformOutput { $htmlArgs = array_map( 'htmlspecialchars', $args ); $htmlArgs = array_map( 'nl2br', $htmlArgs ); - $this->htmlMsg = wfMsgReplaceArgs( htmlspecialchars( wfMsgGetKey( $msg, true ) ), $htmlArgs ); - $this->textMsg = wfMsgReal( $msg, $args ); + $this->htmlMsg = wfMessage( $msg )->rawParams( $htmlArgs )->escaped(); + $this->textMsg = wfMessage( $msg )->rawParams( $htmlArgs )->text(); $this->width = intval( $width ); $this->height = intval( $height ); $this->url = false; |