public function setRedirect($url, $msg = null, $type = null)
 {
     if (!strpos($url, 'Itemid')) {
         $url = $url . '&Itemid=' . JRequest::getInt('Itemid', '');
     }
     parent::setRedirect($url, $msg, $type);
 }
Example #2
0
 /**
  * Set a URL for browser redirection.
  *
  * @param   string  $url   URL to redirect to.
  * @param   string  $msg   Message to display on redirect. Optional, defaults to value set internally by controller, if any.
  * @param   string  $type  Message type. Optional, defaults to 'message' or the type set by a previous call to setMessage.
  *
  * @return  JController  This object to support chaining.
  */
 public function setRedirect($url, $msg = null, $type = null)
 {
     $task = $this->getTask();
     $redirect_tasks = $this->redirect_tasks;
     if (!$this->redirect) {
         $this->redirect = AKHelper::_('uri.base64', 'decode', JRequest::getVar('return'));
     }
     if ($this->redirect && in_array($task, $redirect_tasks)) {
         return parent::setRedirect($this->redirect, $msg, $type);
     } else {
         return parent::setRedirect($url, $msg, $type);
     }
 }
 public function setRedirect($url, $msg = null, $type = null)
 {
     if (JFactory::getApplication()->isSite() == true) {
         if (!strpos($url, 'Itemid')) {
             $url = $url . '&Itemid=' . JRequest::getInt('Itemid', '');
         }
     }
     parent::setRedirect($url, $msg, $type);
 }