public function isUsingStaticUrlsAllowed() { if (Mage::getSingleton('adminhtml/session')->getStaticUrlsAllowed()) { return true; } return parent::isUsingStaticUrlsAllowed(); }
/** * Decode HTML element id * * @param string $id * @return string */ public function convertIdToPath($id) { $currentPath = $this->getStorageRoot(); $path = realpath(parent::convertIdToPath($id)); if (is_dir($path) && false !== stripos($path, $currentPath)) { $currentPath = $path; } return $currentPath; }
public function isUsingStaticUrlsAllowed() { $result = parent::isUsingStaticUrlsAllowed(); if (Mage::getSingleton('adminhtml/session')->getStaticUrlsAllowed()) { return true; } if (Mage::getSingleton('adminhtml/session')->getAllowStatic()) { return true; } else { return $result; } }
/** * Return URL based on current selected directory or root directory for startup * * @return string */ public function getCurrentUrl() { if ($this->_getMediaSymlinkHelper()->active()) { if (!$this->_currentUrl) { $path = str_replace(realpath(Mage::getConfig()->getOptions()->getMediaDir()), '', $this->getCurrentPath()); $path = trim($path, DS); $this->_currentUrl = Mage::app()->getStore($this->_storeId)->getBaseUrl('media') . $this->convertPathToUrl($path) . '/'; } return $this->_currentUrl; } else { return parent::getCurrentUrl(); } }
/** * Return path of the current selected directory or root directory for startup * Try to create target directory if it doesn't exist * * @throws Mage_Core_Exception * @return string */ public function getCurrentPath() { if (!Mage::helper('uaudio_storage')->isEnabled()) { return parent::getCurrentPath(); } if (!$this->_currentPath) { $currentPath = $this->getStorageRoot(); $node = $this->_getRequest()->getParam($this->getTreeNodeName()); if ($node) { $this->_currentPath = $this->convertIdToPath($node); } } return $this->_currentPath; }