aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorflop25 <flop25@piwigo.org>2013-02-13 18:12:10 +0000
committerflop25 <flop25@piwigo.org>2013-02-13 18:12:10 +0000
commit1246fd7922db87202a781a40e2a4aa77b4d20583 (patch)
tree9feaedb5ab4a1361e9a551168644cfc1600085e1 /include
parentd6abd25b6b5f74129653441d04957998ddd63098 (diff)
bug:2845
use of \ to escape the comma "a, b\, 1" will give Array ( [0] => a [1] => b, 1 ) whatever the number of \ git-svn-id: http://piwigo.org/svn/trunk@20741 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r--include/ws_functions.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php
index 50123fc9a..7f0952ec3 100644
--- a/include/ws_functions.inc.php
+++ b/include/ws_functions.inc.php
@@ -1977,10 +1977,10 @@ SELECT *
if (isset($params['tags']) and !empty($params['tags']))
{
$tag_ids = array();
- $tag_names = explode(',', $params['tags']);
+ $tag_names = preg_split('~(?<!\\\),~', $params['tags']);
foreach ($tag_names as $tag_name)
{
- $tag_id = tag_id_from_tag_name($tag_name);
+ $tag_id = tag_id_from_tag_name(preg_replace('#\\\\*,#', ',', $tag_name));
array_push($tag_ids, $tag_id);
}