/** * Browse the given uri. * * @param string $uri The uri * @param boolean $duplicateLast True to duplicate the last element if it's the same. * * @return void */ public function browse($uri = null, $duplicateLast = false) { if (null === $uri) { $uri = str_replace(Juri::base(), '', Juri::getInstance()->toString()); } $this->history->enqueue($uri, $duplicateLast); }
/** * Browse the given uri. * * @param string $uri The uri * @param boolean $duplicateLast True to duplicate the last element if it's the same. * * @return void */ public function browse($uri = null, $duplicateLast = false) { // This will enable both SEF and non-SEF URI to be parsed properly $router = JRouter::getInstance('site'); if (null === $uri) { $uri = Juri::getInstance(); } else { $uri = Juri::getInstance($uri); } // We are removing format because of default value is csv if present and if not set // and we are never going to remember csv page in a browser history anyway $uri->delVar('format'); $query = $router->parse($uri); $uri = 'index.php?' . Juri::getInstance()->buildQuery($query); $this->history->enqueue($uri, $duplicateLast); }
/** * Browse the given uri. * * @param string $url The uri * @param boolean $duplicateLast True to duplicate the last element if it's the same. * * @return void */ public function browse($url = 'SERVER', $duplicateLast = false) { if ($url == null) { $url = 'SERVER'; } $uri = $this->getUri($url); $url = 'index.php?' . $uri->getQuery(); $this->history->enqueue($url, $duplicateLast); }