From 4926fced5e18cc5ea71f3c32e695649230667efb Mon Sep 17 00:00:00 2001 From: mistic100 Date: Sat, 19 Oct 2013 18:17:10 +0000 Subject: replace some mass_updates/inserts by single_update/insert git-svn-id: http://piwigo.org/svn/trunk@25019 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/include/functions.php | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'admin/include') diff --git a/admin/include/functions.php b/admin/include/functions.php index 39d8f85ee..0142bd023 100644 --- a/admin/include/functions.php +++ b/admin/include/functions.php @@ -1816,34 +1816,25 @@ SELECT id if (count($existing_tags) == 0) { - mass_inserts( + single_insert( TAGS_TABLE, - array('name', 'url_name'), array( - array( - 'name' => $tag_name, - 'url_name' => trigger_event('render_tag_url', $tag_name), - ) + 'name' => $tag_name, + 'url_name' => trigger_event('render_tag_url', $tag_name), ) ); $inserted_id = pwg_db_insert_id(TAGS_TABLE); return array( - 'info' => sprintf( - l10n('Tag "%s" was added'), - stripslashes($tag_name) - ), + 'info' => l10n('Tag "%s" was added', stripslashes($tag_name)), 'id' => $inserted_id, ); } else { return array( - 'error' => sprintf( - l10n('Tag "%s" already exists'), - stripslashes($tag_name) - ) + 'error' => l10n('Tag "%s" already exists', stripslashes($tag_name)) ); } } -- cgit v1.2.3