Index: trunk/extensions/ImageTagging/ImageTagging.php |
— | — | @@ -410,8 +410,8 @@ |
411 | 411 | |
412 | 412 | $this->modifiedImagePageOpenShowImage(); |
413 | 413 | |
414 | | - if ( $this->img->exists() ) { |
415 | | - $tagList = wfGetImageTags($this->img, $imgName); |
| 414 | + if ( $this->getFile()->exists() ) { |
| 415 | + $tagList = wfGetImageTags($this->getFile(), $imgName); |
416 | 416 | |
417 | 417 | #if ( $tagList ) |
418 | 418 | $wgOut->addHTML("<div id='tagListDiv'><span id='tagList'>$tagList</span></div>"); |
— | — | @@ -425,7 +425,7 @@ |
426 | 426 | |
427 | 427 | wfProfileIn( __METHOD__ ); |
428 | 428 | |
429 | | - $full_url = $this->img->getURL(); |
| 429 | + $full_url = $this->getFile()->getURL(); |
430 | 430 | $anchoropen = ''; |
431 | 431 | $anchorclose = ''; |
432 | 432 | |
— | — | @@ -444,17 +444,17 @@ |
445 | 445 | $maxHeight = 460; |
446 | 446 | $sk = $wgUser->getSkin(); |
447 | 447 | |
448 | | - if ( $this->img->exists() ) { |
| 448 | + if ( $this->getFile()->exists() ) { |
449 | 449 | # image |
450 | | - $width = $this->img->getWidth(); |
451 | | - $height = $this->img->getHeight(); |
| 450 | + $width = $this->getFile()->getWidth(); |
| 451 | + $height = $this->getFile()->getHeight(); |
452 | 452 | $showLink = false; |
453 | 453 | |
454 | | - if ( $this->img->allowInlineDisplay() and $width and $height) { |
| 454 | + if ( $this->getFile()->allowInlineDisplay() and $width and $height) { |
455 | 455 | # image |
456 | 456 | |
457 | 457 | # "Download high res version" link below the image |
458 | | - $msg = wfMsgHtml('show-big-image', $width, $height, intval( $this->img->getSize()/1024 ) ); |
| 458 | + $msg = wfMsgHtml('show-big-image', $width, $height, intval( $this->getFile()->getSize()/1024 ) ); |
459 | 459 | |
460 | 460 | # We'll show a thumbnail of this image |
461 | 461 | if ( $width > $maxWidth || $height > $maxHeight ) { |
— | — | @@ -472,22 +472,22 @@ |
473 | 473 | # because of rounding. |
474 | 474 | } |
475 | 475 | |
476 | | - $thumbnail = $this->img->getThumbnail( $width ); |
| 476 | + $thumbnail = $this->getFile()->getThumbnail( $width ); |
477 | 477 | if ( $thumbnail == null ) { |
478 | | - $url = $this->img->getViewURL(); |
| 478 | + $url = $this->getFile()->getViewURL(); |
479 | 479 | } else { |
480 | 480 | $url = $thumbnail->getURL(); |
481 | 481 | } |
482 | 482 | |
483 | 483 | $anchoropen = "<a href=\"{$full_url}\">"; |
484 | 484 | $anchorclose = "</a><br />"; |
485 | | - if( $this->img->mustRender() ) { |
| 485 | + if( $this->getFile()->mustRender() ) { |
486 | 486 | $showLink = true; |
487 | 487 | } else { |
488 | 488 | $anchorclose .= "\n$anchoropen{$msg}</a>"; |
489 | 489 | } |
490 | 490 | } else { |
491 | | - $url = $this->img->getViewURL(); |
| 491 | + $url = $this->getFile()->getViewURL(); |
492 | 492 | $showLink = true; |
493 | 493 | } |
494 | 494 | |
— | — | @@ -501,8 +501,8 @@ |
502 | 502 | $anchoropen . $anchorclose . '</div>' ); |
503 | 503 | } else { |
504 | 504 | #if direct link is allowed but it's not a renderable image, show an icon. |
505 | | - if ($this->img->isSafeFile()) { |
506 | | - $icon= $this->img->iconThumb(); |
| 505 | + if ($this->getFile()->isSafeFile()) { |
| 506 | + $icon= $this->getFile()->iconThumb(); |
507 | 507 | |
508 | 508 | $wgOut->addHTML( '<div class="fullImageLink" id="file"><a href="' . $full_url . '">' . |
509 | 509 | $icon->toHtml() . |
— | — | @@ -513,12 +513,12 @@ |
514 | 514 | } |
515 | 515 | |
516 | 516 | if ($showLink) { |
517 | | - $filename = wfEscapeWikiText( $this->img->getName() ); |
| 517 | + $filename = wfEscapeWikiText( $this->getFile()->getName() ); |
518 | 518 | $info = wfMsg( 'file-info', |
519 | | - $sk->formatSize( $this->img->getSize() ), |
520 | | - $this->img->getMimeType() ); |
| 519 | + $sk->formatSize( $this->getFile()->getSize() ), |
| 520 | + $this->getFile()->getMimeType() ); |
521 | 521 | |
522 | | - if (!$this->img->isSafeFile()) { |
| 522 | + if (!$this->getFile()->isSafeFile()) { |
523 | 523 | $warning = wfMsg( 'mediawarning' ); |
524 | 524 | $wgOut->addWikiText( <<<END |
525 | 525 | <div class="fullMedia"> |
— | — | @@ -539,7 +539,7 @@ |
540 | 540 | } |
541 | 541 | } |
542 | 542 | |
543 | | - if($this->img->fromSharedDirectory) { |
| 543 | + if($this->getFile()->fromSharedDirectory) { |
544 | 544 | $this->printSharedImageText(); |
545 | 545 | } |
546 | 546 | } else { |