/**
  * exactly the same as in BaseControl
  *
  */
 public function redirect($code, $destination = NULL, $args = array())
 {
     if ($this->isAjax()) {
         // parent to spracuje a pre ajax posle aj payload->redirect
         parent::redirect($code, $destination, $args);
         // bez zbytocnych dalsich prietahov
         //			$this->sendPayload();
         /*
         $hasPayload = (array) $this->payload;
         //	if nothing new to send, exit..to avoid sending whole page back
         if ($this->isControlInvalid() === false and !$hasPayload) {
         	$this->sendPayload();
         }
         */
     } else {
         if (!is_numeric($code)) {
             $args = $destination;
             $destination = $code;
             if (empty($args)) {
                 parent::redirect($destination);
             } else {
                 parent::redirect($destination, $args);
             }
         } else {
             if (empty($args)) {
                 if (is_null($destination)) {
                     parent::redirect($code);
                 } else {
                     parent::redirect($code, $destination);
                 }
             } else {
                 parent::redirect($code, $destination, $args);
             }
         }
         parent::redirect($code, $destination, $args);
     }
 }