aboutsummaryrefslogtreecommitdiffstats
path: root/admin/cat_perm.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_perm.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_perm.php')
-rw-r--r--admin/cat_perm.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/admin/cat_perm.php b/admin/cat_perm.php
index b571caeab..d18a5f3b4 100644
--- a/admin/cat_perm.php
+++ b/admin/cat_perm.php
@@ -51,11 +51,11 @@ if ( isset( $_POST['submit'] ) )
$query.= ' FROM '.PREFIX_TABLE.'group_access';
$query.= ' WHERE cat_id = '.$page['cat'];
$query.= ';';
- mysql_query( $query );
+ pwg_query( $query );
$query = 'SELECT id';
$query.= ' FROM '.PREFIX_TABLE.'groups';
$query.= ';';
- $result = mysql_query( $query );
+ $result = pwg_query( $query );
while ( $row = mysql_fetch_array( $result ) )
{
$radioname = 'groupaccess-'.$row['id'];
@@ -65,7 +65,7 @@ if ( isset( $_POST['submit'] ) )
$query.= ' (cat_id,group_id) VALUES';
$query.= ' ('.$page['cat'].','.$row['id'].')';
$query.= ';';
- mysql_query( $query );
+ pwg_query( $query );
}
}
// users access update
@@ -73,11 +73,11 @@ if ( isset( $_POST['submit'] ) )
$query.= ' FROM '.PREFIX_TABLE.'user_access';
$query.= ' WHERE cat_id = '.$page['cat'];
$query.= ';';
- mysql_query( $query );
+ pwg_query( $query );
$query = 'SELECT id';
$query.= ' FROM '.USERS_TABLE;
$query.= ';';
- $result = mysql_query( $query );
+ $result = pwg_query( $query );
while ( $row = mysql_fetch_array( $result ) )
{
$radioname = 'useraccess-'.$row['id'];
@@ -87,7 +87,7 @@ if ( isset( $_POST['submit'] ) )
$query.= ' (cat_id,user_id) VALUES';
$query.= ' ('.$page['cat'].','.$row['id'].')';
$query.= ';';
- mysql_query( $query );
+ pwg_query( $query );
}
check_favorites( $row['id'] );
}
@@ -98,7 +98,7 @@ if ( isset( $_POST['submit'] ) )
$query = 'SELECT id,name';
$query.= ' FROM '.PREFIX_TABLE.'groups';
$query. ';';
-$result = mysql_query( $query );
+$result = pwg_query( $query );
if ( mysql_num_rows( $result ) > 0 )
{
$vtp->addSession( $sub, 'groups' );
@@ -107,7 +107,7 @@ if ( mysql_num_rows( $result ) > 0 )
$query.= ' FROM '.PREFIX_TABLE.'group_access';
$query.= ' WHERE cat_id = '.$_GET['cat_id'];
$query.= ';';
- $subresult = mysql_query( $query );
+ $subresult = pwg_query( $query );
$authorized_groups = array();
while ( $subrow = mysql_fetch_array( $subresult ) )
{
@@ -144,7 +144,7 @@ if ( $user['username'] != $conf['webmaster'] )
$query.= " WHERE username != '".$conf['webmaster']."'";
}
$query.= ';';
-$result = mysql_query( $query );
+$result = pwg_query( $query );
while ( $row = mysql_fetch_array( $result ) )
{
$vtp->addSession( $sub, 'user' );
@@ -195,7 +195,7 @@ while ( $row = mysql_fetch_array( $result ) )
$query.= ' WHERE ug.group_id = g.id';
$query.= ' AND ug.user_id = '.$row['id'];
$query.= ';';
- $subresult = mysql_query( $query );
+ $subresult = pwg_query( $query );
if ( mysql_num_rows( $subresult ) > 0 )
{
$vtp->addSession( $sub, 'usergroups' );