Example #1
0
 protected function _redirect($url, array $options = array(), $addAdmin = true)
 {
     $httpReferer = $this->getRequest()->getServer('HTTP_REFERER');
     if ($httpReferer && $url == $httpReferer || !$addAdmin) {
         parent::_redirect($url, $options);
     }
     parent::_redirect($this->view->adminUrl . '/' . ltrim($url, '/ '), $options);
 }
Example #2
0
 /**
  * Redirect to another URL
  *
  * @param string $url [optional]
  * @param bool $addLanguage [optional]
  * @param array $options Options to be used when redirecting
  * @return void
  */
 protected function _redirect($url, array $options = array(), $addLanguage = true)
 {
     $httpReferer = $this->getRequest()->getServer('HTTP_REFERER');
     if ($httpReferer && $url == $httpReferer || !$addLanguage) {
         parent::_redirect($url, $options);
         return;
     }
     parent::_redirect(rtrim(Axis_Locale::getLanguageUrl(), '/') . '/' . ltrim($url, '/'), $options);
 }
Example #3
0
 protected function _redirect($url, array $options = array(), $addAdmin = true)
 {
     if (0 === strpos($url, 'http://') || 0 === strpos($url, 'https://') || !$addAdmin) {
         parent::_redirect($url, $options);
         return;
     }
     $url = $this->view->adminUrl . '/' . ltrim($url, '/ ');
     parent::_redirect(rtrim($url, '/'), $options);
 }
Example #4
0
 /**
  * Redirect to another URL
  *
  * @param string $url [optional]
  * @param bool $addLanguage [optional]
  * @param array $options Options to be used when redirecting
  * @return void
  */
 protected function _redirect($url, array $options = array(), $addLanguage = true)
 {
     if (0 === strpos($url, 'http://') || 0 === strpos($url, 'https://') || !$addLanguage) {
         parent::_redirect($url, $options);
         return;
     }
     if ($url && $url !== '/') {
         $url = '/' . trim($url, '/');
     } else {
         $url = '';
     }
     parent::_redirect(Axis_Locale::getLanguageUrl() . $url, $options);
 }