X-Git-Url: http://git.dj3c1t.com/?a=blobdiff_plain;f=mw%2Fenv%2Fmodules%2Fmw_env_urls.php;h=b76a270f7b51ec71cbc7ce19fd4cad369b2e32d8;hb=refs%2Fheads%2Fmaster;hp=7bf6153ae8a29649d4663957ac008a9889672f05;hpb=5dfe5e84a7007ddd9737707ce15f0155e6415066;p=mtweb diff --git a/mw/env/modules/mw_env_urls.php b/mw/env/modules/mw_env_urls.php index 7bf6153..b76a270 100644 --- a/mw/env/modules/mw_env_urls.php +++ b/mw/env/modules/mw_env_urls.php @@ -2,9 +2,9 @@ class mw_env_urls extends mw_env{ - var $additional_get_params; + public $additional_get_params; - function init_additional_get_params(){ + public function init_additional_get_params(){ $this->additional_get_params = array(); $_params = $_SERVER["QUERY_STRING"]; $v_params = explode("&", $_params); @@ -17,12 +17,12 @@ } } - function is_a_param($key){ + public function is_a_param($key){ foreach($this->get_PARAMS() as $_key => $_value) if(strcmp($key, $_value) == 0) return true; return false; } - function url($action = "", $_params = array(), $script_name = null){ + public function url($action = "", $_params = array(), $script_name = null){ $script_name = isset($script_name) ? $script_name : ($this->config("script_name") ? $this->config("script_name") : "index.php"); if($action) $_params["e"] = $action; $get_params = ""; @@ -31,7 +31,7 @@ return $this->path("web").$script_name.$get_params; } - function redirect($url, $message, $wait = 1){ + public function redirect($url, $message, $wait = 1){ $this->set_etat("reponses/html/redirect_javascript", false); $this->set_out( "redirect", @@ -41,11 +41,12 @@ "wait" => $wait ) ); - if(!$wait && !headers_sent()){ - header("Location: ".str_replace("&", "&", $url)); + if(!headers_sent()){ + if($wait){ + if(function_exists("header_remove")) header_remove("Location"); + } + else header("Location: ".str_replace("&", "&", $url)); } } } - -?> \ No newline at end of file