original_string: public function redirect($page = null, $args = array())
      {
          /*
           * Redirect to specified page. $args are $_GET arguments.
           * Use this function instead of issuing header("Location") stuff
           */
          $url = $this->url($page, $args);
          if ($this->app->isAjaxOutput()) {
              if ($_GET['cut_page']) {
                  echo '<script>'.$this->app->js()->redirect($url).'</script>Redirecting page...';
                  exit;
              } else {
                  $this->app->js()->redirect($url)->execute();
              }
          }
          header('Location: '.$url);
          exit;
      }
code: public function redirect($page = null, $args = array())
      {
          /*
           * Redirect to specified page. $args are $_GET arguments.
           * Use this function instead of issuing header("Location") stuff
           */
          $url = $this->url($page, $args);
          if ($this->app->isAjaxOutput()) {
              if ($_GET['cut_page']) {
                  echo '<script>'.$this->app->js()->redirect($url).'</script>Redirecting page...';
                  exit;
              } else {
                  $this->app->js()->redirect($url)->execute();
              }
          }
          header('Location: '.$url);
          exit;
      }
code_tokens: public function redirect ( $ page = null , $ args = array ( ) ) { /*
           * Redirect to specified page. $args are $_GET arguments.
           * Use this function instead of issuing header("Location") stuff
           */ $ url = $ this -> url ( $ page , $ args ) ; if ( $ this -> app -> isAjaxOutput ( ) ) { if ( $ _GET [ 'cut_page' ] ) { echo '<script>' . $ this -> app -> js ( ) -> redirect ( $ url ) . '</script>Redirecting page...' ; exit ; } else { $ this -> app -> js ( ) -> redirect ( $ url ) -> execute ( ) ; } } header ( 'Location: ' . $ url ) ; exit ; }
docstring: Perform instant redirect to another page.
  
  @param string $page
  @param array  $args
docstring_tokens: Perform instant redirect to another page .