aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2006-04-14 23:23:10 +0000
committerrub <rub@piwigo.org>2006-04-14 23:23:10 +0000
commitaa493527fceb8436aa2fc23f16ea5577dcf2e21f (patch)
treeef96df0ba32c711731297693a72551b066bde16d /include/functions.inc.php
parent18570279efdbdfd171e16d9948175fb0b959546a (diff)
Issue ID 330:
o Remove "background treatment" o Add button "Continue treatment" git-svn-id: http://piwigo.org/svn/trunk@1177 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions.inc.php71
1 files changed, 0 insertions, 71 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index 2fb4e3cba..5e5b1ab9c 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -871,75 +871,4 @@ function get_available_upgrade_ids()
return $available_upgrade_ids;
}
-/**
- * Adaptation of _HTTPRequestToString (http://fr.php.net/urlencode)
- *
- *
- * @return array request to string
- */
-function http_request_to_string($arr_request, $var_name, $separator='&') {
- $ret = "";
- if (is_array($arr_request)) {
- foreach ($arr_request as $key => $value) {
- if (is_array($value)) {
- if ($var_name) {
- $ret .= http_request_to_string($value, "{$var_name}[{$key}]", $separator);
- } else {
- $ret .= http_request_to_string($value, "{$key}", $separator);
- }
- } else {
- if ($var_name) {
- $ret .= "{$var_name}[{$key}]=".urlencode($value)."&";
- } else {
- $ret .= "{$key}=".urlencode($value)."&";
- }
- }
- }
- }
- if (!$var_name) {
- $ret = substr($ret,0,-1);
- }
- return $ret;
-}
-
-/**
- * Post request HTTP on backgroung and redirec to selected url
- *
- * Note : once this function called, the execution doesn't go further
- * (presence of an exit() instruction.
- *
- * @param string $url_redirect
- * @param string $redirect_message
- * @param integer $redirect_refreh_time
- * @return void
- */
-function re_post_http($url_redirect, $redirect_message, $redirect_refreh_time)
-{
- global $conf;
-
- $data_post = http_request_to_string($_POST, '');
-
- $message_post = "POST ".$_SERVER['PHP_SELF'].html_entity_decode(get_query_string_diff(array()))." HTTP/1.1\r\n";
-
-/* foreach (array_flip(array_diff(array_flip(apache_request_headers()), array('Content-Type', 'Content-Length'))) as $header_name => $header_value)
- {
- $message_post .= $header_name.": ".$header_value."\r\n";
- }*/
- $message_post .= "Host: ".$_SERVER['HTTP_HOST']."\r\n";
- $message_post .= "Cookie: ".$conf['session_name']."=".$_COOKIE[$conf['session_name']]."\r\n";
-
-
- $message_post .= "Content-Type: application/x-www-form-urlencoded\r\n";
- $message_post .= "Content-Length: ".strlen($data_post)."\r\n";
- $message_post .= "\r\n";
- $message_post .= $data_post."\r\n";
-
- $fd = fsockopen($_SERVER['HTTP_HOST'], $_SERVER['SERVER_PORT']);
- fputs($fd, $message_post);
- fclose($fd);
-
- redirect($url_redirect, $redirect_message, $redirect_refreh_time);
- //exit(); done by redirect
-}
-
?>