aboutsummaryrefslogtreecommitdiffstats
path: root/admin/cat_list.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/cat_list.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 'admin/cat_list.php')
-rw-r--r--admin/cat_list.php28
1 files changed, 14 insertions, 14 deletions
diff --git a/admin/cat_list.php b/admin/cat_list.php
index 7ed0e4ca9..dc69a5179 100644
--- a/admin/cat_list.php
+++ b/admin/cat_list.php
@@ -69,7 +69,7 @@ SELECT uppercats
FROM '.CATEGORIES_TABLE.'
WHERE id = '.$parent_id.'
;';
- $parent_uppercats = array_pop(mysql_fetch_array(mysql_query($query)));
+ $parent_uppercats = array_pop(mysql_fetch_array(pwg_query($query)));
}
// we have then to add the virtual category
@@ -79,14 +79,14 @@ INSERT INTO '.CATEGORIES_TABLE.'
VALUES
(\''.$_POST['virtual_name'].'\','.$parent_id.','.$_POST['rank'].')
;';
- mysql_query($query);
+ pwg_query($query);
// And last we update the uppercats
$query = '
SELECT MAX(id)
FROM '.CATEGORIES_TABLE.'
;';
- $my_id = array_pop(mysql_fetch_array(mysql_query($query)));
+ $my_id = array_pop(mysql_fetch_array(pwg_query($query)));
$query = '
UPDATE '.CATEGORIES_TABLE.'
@@ -99,7 +99,7 @@ UPDATE '.CATEGORIES_TABLE.'
$query.= '\'
WHERE id = '.$my_id.'
;';
- mysql_query($query);
+ pwg_query($query);
array_push($infos, $lang['cat_list_virtual_category_added']);
}
}
@@ -122,7 +122,7 @@ else
$query.= '
ORDER BY rank ASC
;';
-$result = mysql_query($query);
+$result = pwg_query($query);
while ($row = mysql_fetch_assoc($result))
{
$categories[$row['rank']] = $row;
@@ -169,13 +169,13 @@ UPDATE '.CATEGORIES_TABLE.'
SET rank = '.($current_rank-1).'
WHERE id = '.$_GET['up'].'
;';
- mysql_query($query);
+ pwg_query($query);
$query = '
UPDATE '.CATEGORIES_TABLE.'
SET rank = '.$current_rank.'
WHERE id = '.$categories[($current_rank-1)]['id'].'
;';
- mysql_query($query);
+ pwg_query($query);
// 3. Updating the cache array
$categories[$current_rank] = $categories[($current_rank-1)];
$categories[($current_rank-1)] = $current;
@@ -188,7 +188,7 @@ UPDATE '.CATEGORIES_TABLE.'
SET rank = '.(count($categories) + 1).'
WHERE id = '.$_GET['up'].'
;';
- mysql_query($query);
+ pwg_query($query);
$query = '
UPDATE '.CATEGORIES_TABLE.'
SET rank = rank-1
@@ -203,7 +203,7 @@ UPDATE '.CATEGORIES_TABLE.'
}
$query.= '
;';
- mysql_query($query);
+ pwg_query($query);
// 3. Updating the cache array
array_push($categories, $current);
array_shift($categories);
@@ -228,13 +228,13 @@ UPDATE '.CATEGORIES_TABLE.'
SET rank = '.($current_rank+1).'
WHERE id = '.$_GET['down'].'
;';
- mysql_query($query);
+ pwg_query($query);
$query = '
UPDATE '.CATEGORIES_TABLE.'
SET rank = '.$current_rank.'
WHERE id = '.$categories[($current_rank+1)]['id'].'
;';
- mysql_query($query);
+ pwg_query($query);
// 3. Updating the cache array
$categories[$current_rank]=$categories[($current_rank+1)];
$categories[($current_rank+1)] = $current;
@@ -247,7 +247,7 @@ UPDATE '.CATEGORIES_TABLE.'
SET rank = 0
WHERE id = '.$_GET['down'].'
;';
- mysql_query($query);
+ pwg_query($query);
$query = '
UPDATE '.CATEGORIES_TABLE.'
SET rank = rank+1
@@ -262,7 +262,7 @@ UPDATE '.CATEGORIES_TABLE.'
}
$query.= '
;';
- mysql_query($query);
+ pwg_query($query);
// 3. Updating the cache array
array_unshift($categories, $current);
array_pop($categories);
@@ -350,7 +350,7 @@ SELECT COUNT(id) AS nb_sub_cats
FROM '. CATEGORIES_TABLE.'
WHERE id_uppercat = '.$category['id'].'
;';
- $row = mysql_fetch_array(mysql_query($query));
+ $row = mysql_fetch_array(pwg_query($query));
if ($row['nb_sub_cats'] > 0)
{