aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2013-10-19 18:17:10 +0000
committermistic100 <mistic@piwigo.org>2013-10-19 18:17:10 +0000
commit4926fced5e18cc5ea71f3c32e695649230667efb (patch)
tree807f86d273a1c652105bed147fbd76b4dc639c39 /admin/include
parentae707279a1945e383c312cd648d288606a79e341 (diff)
replace some mass_updates/inserts by single_update/insert
git-svn-id: http://piwigo.org/svn/trunk@25019 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/include')
-rw-r--r--admin/include/functions.php19
1 files changed, 5 insertions, 14 deletions
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))
);
}
}