aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2007-09-12 04:01:54 +0000
committerrvelices <rv-github@modusoptimus.com>2007-09-12 04:01:54 +0000
commit69d0dae55d52338e5ef96074e2af2215a93b63fa (patch)
tree945ff81ad3cc582e7050b2c262f1f0b2ae59fa9f /include
parent9aa5052f6dc25257392cce50005f18486f32375a (diff)
merge -r2088 from branch-1_7 to trunk
- urls used in http redirections must not be html escaped (eg. should use & instead of &amp;) git-svn-id: http://piwigo.org/svn/trunk@2089 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions.inc.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index 310380ca9..b58d67d78 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -429,7 +429,7 @@ function pwg_log($image_id = null, $image_type = null)
}
$do_log = trigger_event('pwg_log_allowed', $do_log, $image_id, $image_type);
-
+
if (!$do_log)
{
return false;
@@ -459,7 +459,7 @@ SELECT CURDATE(), CURTIME()
list($curyear, $curmonth, $curday) = explode('-', $curdate);
list($curhour) = explode(':', $curtime);
-
+
$query = '
INSERT INTO '.HISTORY_TABLE.'
(
@@ -712,9 +712,10 @@ function redirect( $url , $msg = '', $refresh_time = 0)
* returns $_SERVER['QUERY_STRING'] whitout keys given in parameters
*
* @param array $rejects
+ * @param boolean $escape - if true escape & to &amp; (for html)
* @returns string
*/
-function get_query_string_diff($rejects = array())
+function get_query_string_diff($rejects=array(), $escape=true)
{
$query_string = '';
@@ -726,7 +727,7 @@ function get_query_string_diff($rejects = array())
{
if (!in_array($key, $rejects))
{
- $query_string.= $is_first ? '?' : '&amp;';
+ $query_string.= $is_first ? '?' : ($escape ? '&amp;' : '&' );
$is_first = false;
$query_string.= $key.'='.$value;
}
@@ -839,7 +840,7 @@ function get_thumbnail_title($element_info)
{
$thumbnail_title = '';
}
-
+
if (!empty($element_info['filesize']))
{
$thumbnail_title .= ' : '.l10n_dec('%d Kb', '%d Kb', $element_info['filesize']);
@@ -1075,7 +1076,7 @@ function get_l10n_args($key, $args)
* returns a string with formated with l10n_args elements
*
* @param element/array $key_args: element or array of l10n_args elements
- * @param $sep: if $key_args is array,
+ * @param $sep: if $key_args is array,
* separator is used when translated l10n_args elements are concated
* @return string
*/