diff options
author | mistic100 <mistic@piwigo.org> | 2014-01-12 12:16:46 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2014-01-12 12:16:46 +0000 |
commit | a984354ee7768fdbc11943ee40f1c31dd357dc97 (patch) | |
tree | a1a7d392ea119073fcd71ef4a50c3bbb849cd307 /admin/tags.php | |
parent | 81ac87bc81b912c81eeb64e32701da68626a3e1b (diff) |
change behavior of reset/cancel button on tags manager + reorganize code
git-svn-id: http://piwigo.org/svn/trunk@26650 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/tags.php')
-rw-r--r-- | admin/tags.php | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/admin/tags.php b/admin/tags.php index 92a38e805..a7c58f796 100644 --- a/admin/tags.php +++ b/admin/tags.php @@ -38,7 +38,7 @@ if (!empty($_POST)) // | edit tags | // +-----------------------------------------------------------------------+ -if (isset($_POST['submit'])) +if (isset($_POST['edit_submit'])) { $query = ' SELECT name @@ -194,7 +194,7 @@ SELECT id, name // | merge tags | // +-----------------------------------------------------------------------+ -if (isset($_POST['confirm_merge'])) +if (isset($_POST['merge_submit'])) { if (!isset($_POST['destination_tag'])) { @@ -428,11 +428,7 @@ if ((isset($_POST['edit']) or isset($_POST['duplicate']) or isset($_POST['merge' $list_name = 'MERGE_TAGS_LIST'; } - $template->assign( - array( - $list_name => implode(',', $_POST['tags']), - ) - ); + $template->assign($list_name, implode(',', $_POST['tags'])); $query = ' SELECT id, name @@ -442,16 +438,11 @@ SELECT id, name $result = pwg_query($query); while ($row = pwg_db_fetch_assoc($result)) { - $name_of[ $row['id'] ] = $row['name']; - } - - foreach ($_POST['tags'] as $tag_id) - { $template->append( 'tags', array( - 'ID' => $tag_id, - 'NAME' => $name_of[$tag_id], + 'ID' => $row['id'], + 'NAME' => $row['name'], ) ); } |