aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/functions.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2011-05-25 13:33:29 +0000
committermistic100 <mistic@piwigo.org>2011-05-25 13:33:29 +0000
commit5257aad873f71bb0125d8b576748c7bf1bf3163d (patch)
tree32c944f23b086d796bf88dd45c4aa6243671b7c4 /admin/include/functions.php
parentd17ffa839faf5435751fcef153b445ed25b20d52 (diff)
bug:2278 fixed (merge r10970 r11008 r11039 from trunk) replace FCBKcomplete by TokenInput to avoid 3rd tag issue on autocomplete
git-svn-id: http://piwigo.org/svn/branches/2.2@11056 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/functions.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index f5afa9633..c929d2c55 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -2100,25 +2100,29 @@ function get_active_menu($menu_page)
return 0;
}
-function get_fckb_taglist($query)
+function get_taglist($query)
{
$result = pwg_query($query);
+
$taglist = array();
while ($row = pwg_db_fetch_assoc($result))
{
array_push(
$taglist,
array(
- 'key' => $row['tag_name'],
- 'value' => '~~'.$row['tag_id'].'~~',
+ 'name' => $row['tag_name'],
+ 'id' => '~~'.$row['tag_id'].'~~',
)
);
}
-
+
+ $cmp = create_function('$a,$b', 'return strcasecmp($a["name"], $b["name"]);');
+ usort($taglist, $cmp);
+
return $taglist;
}
-function get_fckb_tag_ids($raw_tags)
+function get_tag_ids($raw_tags)
{
// In $raw_tags we receive something like array('~~6~~', '~~59~~', 'New
// tag', 'Another new tag') The ~~34~~ means that it is an existing
@@ -2126,6 +2130,7 @@ function get_fckb_tag_ids($raw_tags)
// or "1234" (numeric characters only)
$tag_ids = array();
+ $raw_tags = explode(',',$raw_tags);
foreach ($raw_tags as $raw_tag)
{