aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2013-11-21 11:22:42 +0000
committermistic100 <mistic@piwigo.org>2013-11-21 11:22:42 +0000
commit2f06b27c26de0f9ae46be3141ee9180c88f183b7 (patch)
treed8b7f4c2c236c27a8d3fb68740758ba889b9cc3e
parent9565aef3b0ad148bbc6dba11b99f451d906380f3 (diff)
move get_query_string_diff and url_is_remote to functions_url.inc.php
git-svn-id: http://piwigo.org/svn/trunk@25615 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--include/functions.inc.php37
-rw-r--r--include/functions_url.inc.php38
2 files changed, 38 insertions, 37 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index 03c9e2873..b0c011453 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -832,43 +832,6 @@ function redirect( $url , $msg = '', $refresh_time = 0)
}
/**
- * returns $_SERVER['QUERY_STRING'] whithout keys given in parameters
- *
- * @param string[] $rejects
- * @param boolean $escape escape *&* to *&amp;*
- * @returns string
- */
-function get_query_string_diff($rejects=array(), $escape=true)
-{
- if (empty($_SERVER['QUERY_STRING']))
- {
- return '';
- }
-
- parse_str($_SERVER['QUERY_STRING'], $vars);
-
- $vars = array_diff_key($vars, array_flip($rejects));
-
- return '?' . http_build_query($vars, '', $escape ? '&amp;' : '&');
-}
-
-/**
- * returns true if the url is absolute (begins with http)
- *
- * @param string $url
- * @returns boolean
- */
-function url_is_remote($url)
-{
- if ( strncmp($url, 'http://', 7)==0
- or strncmp($url, 'https://', 8)==0 )
- {
- return true;
- }
- return false;
-}
-
-/**
* returns available themes
*
* @param bool $show_mobile
diff --git a/include/functions_url.inc.php b/include/functions_url.inc.php
index 02b938ecb..906cf915a 100644
--- a/include/functions_url.inc.php
+++ b/include/functions_url.inc.php
@@ -794,4 +794,42 @@ function get_gallery_home_url()
return make_index_url();
}
}
+
+/**
+ * returns $_SERVER['QUERY_STRING'] whithout keys given in parameters
+ *
+ * @param string[] $rejects
+ * @param boolean $escape escape *&* to *&amp;*
+ * @returns string
+ */
+function get_query_string_diff($rejects=array(), $escape=true)
+{
+ if (empty($_SERVER['QUERY_STRING']))
+ {
+ return '';
+ }
+
+ parse_str($_SERVER['QUERY_STRING'], $vars);
+
+ $vars = array_diff_key($vars, array_flip($rejects));
+
+ return '?' . http_build_query($vars, '', $escape ? '&amp;' : '&');
+}
+
+/**
+ * returns true if the url is absolute (begins with http)
+ *
+ * @param string $url
+ * @returns boolean
+ */
+function url_is_remote($url)
+{
+ if ( strncmp($url, 'http://', 7)==0
+ or strncmp($url, 'https://', 8)==0 )
+ {
+ return true;
+ }
+ return false;
+}
+
?> \ No newline at end of file