Skip to content

Commit

Permalink
merge r26921 from branch 2.6 to trunk
Browse files Browse the repository at this point in the history
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
  • Loading branch information
plegall committed Jan 23, 2014
1 parent 18eb56e commit 788e9ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions admin/include/functions.php
Expand Up @@ -1426,7 +1426,7 @@ function delete_tags($tag_ids)
* @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;

Expand Down Expand Up @@ -1472,9 +1472,10 @@ function tag_id_from_tag_name($tag_name, $create=true)
)
);

$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];
}
}
Expand Down

0 comments on commit 788e9ee

Please sign in to comment.