コード例 #1
0
ファイル: File.php プロジェクト: schwarer2006/wikia
 /**
  * Get the URL of the thumbnail directory, or a particular file if $suffix is specified
  *
  * @param $suffix bool|string if not false, the name of a thumbnail file
  *
  * @return path
  */
 function getThumbUrl($suffix = false)
 {
     $this->assertRepoDefined();
     $path = $this->repo->getZoneUrl('thumb') . '/' . $this->getUrlRel();
     if ($suffix !== false) {
         $path .= '/' . rawurlencode($suffix);
     }
     return $path;
 }
コード例 #2
0
ファイル: File.php プロジェクト: Tjorriemorrie/app
 /**
  * Get the URL of the thumbnail directory, or a particular file if $suffix is specified
  *
  * @param $suffix bool|string if not false, the name of a thumbnail file
  *
  * @return path
  */
 function getThumbUrl($suffix = false)
 {
     $this->assertRepoDefined();
     $path = $this->repo->getZoneUrl('thumb') . '/' . $this->getUrlRel();
     $path = wfReplaceImageServer($path, $this->getTimestamp());
     // Wikia change (BAC-1206)
     if ($suffix !== false) {
         $path .= '/' . rawurlencode($suffix);
     }
     return $path;
 }
コード例 #3
0
ファイル: File.php プロジェクト: mangowi/mediawiki
 /**
  * Get the URL of the zone directory, or a particular file if $suffix is specified
  *
  * @param string $zone name of requested zone
  * @param bool|string $suffix if not false, the name of a file in zone
  *
  * @return string path
  */
 function getZoneUrl($zone, $suffix = false)
 {
     $this->assertRepoDefined();
     $ext = $this->getExtension();
     $path = $this->repo->getZoneUrl($zone, $ext) . '/' . $this->getUrlRel();
     if ($suffix !== false) {
         $path .= '/' . rawurlencode($suffix);
     }
     return $path;
 }
コード例 #4
0
 /**
  * @see FileRepo::getZoneUrl()
  */
 function getZoneUrl($zone)
 {
     switch ($zone) {
         case 'public':
             return $this->url;
         case 'thumb':
             return $this->thumbUrl;
         default:
             return parent::getZoneUrl($zone);
     }
 }
コード例 #5
0
ファイル: FSs3Repo.php プロジェクト: CpuID/LocalS3Repo
 /** Returns zone part of repo URL, plus base URL, to be appended to S3 base URL
  * @see FileRepo::getZoneUrl()
  */
 function getZoneUrl($zone, $ext = NULL)
 {
     switch ($zone) {
         case 'public':
             $retval = $this->url;
             break;
         case 'temp':
             $retval = "{$this->url}/temp";
             break;
         case 'deleted':
             $retval = parent::getZoneUrl($zone);
             // no public URL
             break;
         case 'thumb':
             $retval = $this->thumbUrl;
             break;
         default:
             $retval = parent::getZoneUrl($zone);
             break;
     }
     wfDebug(__METHOD__ . ": " . print_r($zone, true) . ", retval: {$retval} \n");
     return $retval;
 }
コード例 #6
0
ファイル: FSRepo.php プロジェクト: eFFemeer/seizamcore
 /**
  * @see FileRepo::getZoneUrl()
  *
  * @param $zone string
  *
  * @return url
  */
 function getZoneUrl($zone)
 {
     switch ($zone) {
         case 'public':
             return $this->url;
         case 'temp':
             return "{$this->url}/temp";
         case 'deleted':
             return parent::getZoneUrl($zone);
             // no public URL
         // no public URL
         case 'thumb':
             return $this->thumbUrl;
         default:
             return parent::getZoneUrl($zone);
     }
 }