function _redirect($url, $params_or_http_code = array()) { App::$controller->layout = false; App::$finish = true; $http_code = 302; if (is_array($params_or_http_code)) { $url = _url($url, $params_or_http_code); } else { $url = _url($url); $http_code = intval($params_or_http_code); } header("Location: {$url}", true, $http_code); App::_break(); }
function _redirect($url, $params = array()) { App::$controller->layout = false; App::$finish = true; $url = _url($url, $params); header("Location: {$url}"); App::_break(); }