aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2007-09-19 06:47:41 +0000
committerpatdenice <patdenice@piwigo.org>2007-09-19 06:47:41 +0000
commitfc19598a8e46f2d8ab5b3f37d65bf748263f6a2f (patch)
treeaa4628e73f500ba666f1e419aed5af6cc3931334 /admin
parentbb07324f762708142f2158da1a8060f9f812c28b (diff)
0000734: bug on tags edition
Useless functions removed git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2097 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin')
-rw-r--r--admin/tags.php20
1 files changed, 3 insertions, 17 deletions
diff --git a/admin/tags.php b/admin/tags.php
index b3ef994b4..1d7e3ffdb 100644
--- a/admin/tags.php
+++ b/admin/tags.php
@@ -61,14 +61,7 @@ SELECT id, name
// we must not rename tag with an already existing name
foreach (explode(',', $_POST['edit_list']) as $tag_id)
{
- if (function_exists('mysql_real_escape_string'))
- {
- $tag_name = mysql_real_escape_string(stripslashes($_POST['tag_name-'.$tag_id]));
- }
- else
- {
- $tag_name = mysql_escape_string(stripslashes($_POST['tag_name-'.$tag_id]));
- }
+ $tag_name = stripslashes($_POST['tag_name-'.$tag_id]);
if ($tag_name != $current_name_of[$tag_id])
{
@@ -88,7 +81,7 @@ SELECT id, name
$updates,
array(
'id' => $tag_id,
- 'name' => $tag_name,
+ 'name' => addslashes($tag_name),
'url_name' => str2url($tag_name),
)
);
@@ -148,14 +141,7 @@ DELETE
if (isset($_POST['add']) and !empty($_POST['add_tag']) and !is_adviser())
{
- if (function_exists('mysql_real_escape_string'))
- {
- $tag_name = mysql_real_escape_string(stripslashes($_POST['add_tag']));
- }
- else
- {
- $tag_name = mysql_escape_string(stripslashes($_POST['add_tag']));
- }
+ $tag_name = $_POST['add_tag'];
// does the tag already exists?
$query = '