Ejemplo n.º 1
0
 public function isUsingStaticUrlsAllowed()
 {
     if (Mage::getSingleton('adminhtml/session')->getStaticUrlsAllowed()) {
         return true;
     }
     return parent::isUsingStaticUrlsAllowed();
 }
Ejemplo n.º 2
0
 /**
  * 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;
 }
Ejemplo n.º 3
0
 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;
     }
 }
Ejemplo n.º 4
0
 /**
  * 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();
     }
 }
Ejemplo n.º 5
0
 /**
  * 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;
 }