aboutsummaryrefslogtreecommitdiffstats
path: root/admin/picture_modify.php
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2004-10-30 15:42:29 +0000
committerz0rglub <z0rglub@piwigo.org>2004-10-30 15:42:29 +0000
commit7cd9b65e3299fb8bc6a83e65f89fcecca62f3178 (patch)
treee068090892b16db654a2bf0c2886b65eaf44a14f /admin/picture_modify.php
parent3730c810f254267ab1fb49f4cad55866e780ad6e (diff)
- function mysql_query replaced by pwg_query : the same with debugging
features - by default, DEBUG is set to 0 (off) git-svn-id: http://piwigo.org/svn/trunk@587 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/picture_modify.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/admin/picture_modify.php b/admin/picture_modify.php
index 1e0e7ce31..c70a4d250 100644
--- a/admin/picture_modify.php
+++ b/admin/picture_modify.php
@@ -82,7 +82,7 @@ if (isset($_POST['submit']))
$query.= ' WHERE id = '.$_GET['image_id'];
$query.= ';';
- mysql_query($query);
+ pwg_query($query);
// make the picture representative of a category ?
$query = '
SELECT DISTINCT(category_id) as category_id,representative_picture_id
@@ -90,7 +90,7 @@ SELECT DISTINCT(category_id) as category_id,representative_picture_id
WHERE c.id = ic.category_id
AND image_id = '.$_GET['image_id'].'
;';
- $result = mysql_query($query);
+ $result = pwg_query($query);
while ($row = mysql_fetch_array($result))
{
// if the user ask the picture to be the representative picture of its
@@ -102,7 +102,7 @@ SELECT DISTINCT(category_id) as category_id,representative_picture_id
$query.= ' SET representative_picture_id = '.$_GET['image_id'];
$query.= ' WHERE id = '.$row['category_id'];
$query.= ';';
- mysql_query($query);
+ pwg_query($query);
}
// if the user ask this picture to be not any more the representative,
// we have to set the representative_picture_id of this category to NULL
@@ -114,7 +114,7 @@ UPDATE '.CATEGORIES_TABLE.'
SET representative_picture_id = NULL
WHERE id = '.$row['category_id'].'
;';
- mysql_query($query);
+ pwg_query($query);
}
}
$associate_or_dissociate = false;
@@ -133,7 +133,7 @@ SELECT id
FROM '.CATEGORIES_TABLE.'
WHERE id = '.$_POST['associate'].'
;';
- if (mysql_num_rows(mysql_query($query)) == 0)
+ if (mysql_num_rows(pwg_query($query)) == 0)
array_push($errors, $lang['cat_unknown_id']);
}
}
@@ -147,7 +147,7 @@ INSERT INTO '.IMAGE_CATEGORY_TABLE.'
VALUES
('.$_POST['associate'].','.$_GET['image_id'].')
;';
- mysql_query($query);
+ pwg_query($query);
$associate_or_dissociate = true;
update_category($_POST['associate']);
}
@@ -158,7 +158,7 @@ SELECT DISTINCT(category_id) as category_id
FROM '.IMAGE_CATEGORY_TABLE.'
WHERE image_id = '.$_GET['image_id'].'
;';
- $result = mysql_query($query);
+ $result = pwg_query($query);
while ($row = mysql_fetch_array($result))
{
if (isset($_POST['dissociate-'.$row['category_id']]))
@@ -168,7 +168,7 @@ DELETE FROM '.IMAGE_CATEGORY_TABLE.'
WHERE image_id = '.$_GET['image_id'].'
AND category_id = '.$row['category_id'].'
;';
- mysql_query($query);
+ pwg_query($query);
$associate_or_dissociate = true;
update_category($row['category_id']);
}
@@ -185,7 +185,7 @@ SELECT *
FROM '.IMAGES_TABLE.'
WHERE id = '.$_GET['image_id'].'
;';
-$row = mysql_fetch_array(mysql_query($query));
+$row = mysql_fetch_array(pwg_query($query));
if (empty($row['name']))
{
@@ -216,7 +216,7 @@ SELECT DISTINCT(category_id) AS category_id,status,visible
WHERE image_id = '.$_GET['image_id'].'
AND category_id = id
;';
-$result = mysql_query($query);
+$result = pwg_query($query);
$categories = '';
while ($cat_row = mysql_fetch_array($result))
{
@@ -286,7 +286,7 @@ if (mysql_num_rows($result) > 0)
// $conf['max_LOV_categories']
$query = 'SELECT COUNT(id) AS nb_total_categories';
$query.= ' FROM '.CATEGORIES_TABLE.';';
-$row = mysql_fetch_array(mysql_query($query));
+$row = mysql_fetch_array(pwg_query($query));
if ($row['nb_total_categories'] < $conf['max_LOV_categories'])
{
$template->assign_block_vars('associate_LOV',array());