*/
public static function linkKnown(
$target, $html = null, $customAttribs = array(),
- $query = array(), $options = array( 'known', 'noclasses' ) )
- {
+ $query = array(), $options = array( 'known', 'noclasses' )
+ ) {
return self::link( $target, $html, $customAttribs, $query, $options );
}
* @return String: HTML for an image, with links, wrappers, etc.
*/
public static function makeImageLink( /*Parser*/ $parser, Title $title, $file, $frameParams = array(),
- $handlerParams = array(), $time = false, $query = "", $widthOption = null )
- {
+ $handlerParams = array(), $time = false, $query = "", $widthOption = null
+ ) {
$res = null;
$dummy = new DummyLinker;
if ( !wfRunHooks( 'ImageBeforeProduceHTML', array( &$dummy, &$title,
* @return mixed
*/
public static function makeThumbLinkObj( Title $title, $file, $label = '', $alt,
- $align = 'right', $params = array(), $framed = false, $manualthumb = "" )
- {
+ $align = 'right', $params = array(), $framed = false, $manualthumb = ""
+ ) {
$frameParams = array(
'alt' => $alt,
'caption' => $label,
* @return mixed
*/
public static function makeThumbLink2( Title $title, $file, $frameParams = array(),
- $handlerParams = array(), $time = false, $query = "" )
- {
+ $handlerParams = array(), $time = false, $query = ""
+ ) {
global $wgStylePath, $wgContLang;
$exists = $file && $file->exists();
* applicable.
*
* @param File $file
- * @param MediaOutput $thumb
+ * @param MediaTransformOutput $thumb
* @param array $hp image parameters
*/
public static function processResponsiveImages( $file, $thumb, $hp ) {
$thumb15 = $file->transform( $hp15 );
$thumb20 = $file->transform( $hp20 );
- if ( $thumb15->url !== $thumb->url ) {
- $thumb->responsiveUrls['1.5'] = $thumb15->url;
+ if ( $thumb15 && $thumb15->getUrl() !== $thumb->getUrl() ) {
+ $thumb->responsiveUrls['1.5'] = $thumb15->getUrl();
}
- if ( $thumb20->url !== $thumb->url ) {
- $thumb->responsiveUrls['2'] = $thumb20->url;
+ if ( $thumb20 && $thumb20->getUrl() !== $thumb->getUrl() ) {
+ $thumb->responsiveUrls['2'] = $thumb20->getUrl();
}
}
}
$target = Title::newFromText( $linkTarget );
if ( $target ) {
if ( $target->getText() == '' && $target->getInterwiki() === ''
- && !self::$commentLocal && self::$commentContextTitle )
- {
+ && !self::$commentLocal && self::$commentContextTitle
+ ) {
$newTarget = clone ( self::$commentContextTitle );
$newTarget->setFragment( '#' . $target->getFragment() );
$target = $newTarget;