projects
/
mtweb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
plugin mw_minimal fourni avec mtweb
[mtweb]
/
mw
/
env
/
modules
/
mw_env_urls.php
diff --git
a/mw/env/modules/mw_env_urls.php
b/mw/env/modules/mw_env_urls.php
index
d7194f8
..
0f745a7
100644
(file)
--- a/
mw/env/modules/mw_env_urls.php
+++ b/
mw/env/modules/mw_env_urls.php
@@
-22,7
+22,8
@@
return false;
}
return false;
}
- function url($action = "", $_params = array(), $script_name = "index.php"){
+ 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 = "";
if(isset($this->additional_get_params)) foreach($this->additional_get_params as $key => $value) $get_params .= ($get_params ? "&" : "?").$key."=".$value;
if($action) $_params["e"] = $action;
$get_params = "";
if(isset($this->additional_get_params)) foreach($this->additional_get_params as $key => $value) $get_params .= ($get_params ? "&" : "?").$key."=".$value;
@@
-40,6
+41,10
@@
"wait" => $wait
)
);
"wait" => $wait
)
);
+ if(!headers_sent()){
+ if($wait) header_remove("Location");
+ else header("Location: ".str_replace("&", "&", $url));
+ }
}
}
}
}