aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2014-01-23 13:05:19 +0000
committerplegall <plg@piwigo.org>2014-01-23 13:05:19 +0000
commit788e9eef64d889dd689894ce6c6727758bf3e1f6 (patch)
tree5da1ee716861701ba715824949a1871e19fdedd5 /admin
parent18eb56efd575f2e4c021940c7187771103739ab4 (diff)
merge r26921 from branch 2.6 to trunk
bug 3032 fixed: it seems that the SQL update in invalidate_user_cache_nb_tags corrupts the pwg_db_insert_id (very unexpected) git-svn-id: http://piwigo.org/svn/trunk@26922 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin')
-rw-r--r--admin/include/functions.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index 75ae7084c..1df6e4f45 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -1426,7 +1426,7 @@ DELETE
* @param string $tag_name
* @return int
*/
-function tag_id_from_tag_name($tag_name, $create=true)
+function tag_id_from_tag_name($tag_name)
{
global $page;
@@ -1472,9 +1472,10 @@ SELECT id
)
);
+ $page['tag_id_from_tag_name_cache'][$tag_name] = pwg_db_insert_id(TAGS_TABLE);
+
invalidate_user_cache_nb_tags();
- $page['tag_id_from_tag_name_cache'][$tag_name] = pwg_db_insert_id(TAGS_TABLE);
return $page['tag_id_from_tag_name_cache'][$tag_name];
}
}