/** * First check this file on FS * If it doesn't exist - try to download it from CDN * * @param string $filename * @return bool */ protected function _fileExists($filename) { if (!Mage::getStoreConfig('mycdn/general/enabled')) { return parent::_fileExists($filename); } if (Mage::helper('mycdn')->isFileExists($filename)) { return true; } Mage::helper('mycdn')->addLog('[NEED TO DOWNLOAD] no source on server -> ' . $filename); return Mage::helper('mycdn')->getCdnFile($filename); }
/** * First check this file on FS or DB. If it doesn't then download it from S3 * * @param string $filename * * @return bool */ protected function _fileExists($filename) { return parent::_fileExists($filename) || Mage::helper('cdn')->download($filename); }
/** * @param string $filename * @return bool */ protected function _fileExists($filename) { if (version_compare(Mage::getVersion(), '1.5.0.0') >= 0) { return parent::_fileExists($filename); } else { return file_exists($filename); } }
/** * First check this file on FS * If it doesn't exist - try to download it from DB * * @param string $filename * @return bool */ protected function _fileExists($filename) { if (!Mage::helper('uaudio_storage')->isEnabled()) { return parent::_fileExists($filename); } return $this->_getStorageModel()->fileExists($filename); }