/** * 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; }
/** * 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; }
/** * 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; }
/** * @see FileRepo::getZoneUrl() */ function getZoneUrl($zone) { switch ($zone) { case 'public': return $this->url; case 'thumb': return $this->thumbUrl; default: return parent::getZoneUrl($zone); } }
/** 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; }
/** * @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); } }