aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_user.inc.php
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2003-05-21 21:45:46 +0000
committerz0rglub <z0rglub@piwigo.org>2003-05-21 21:45:46 +0000
commit887c7ee4d443259498795d4760cc8d38d359ed38 (patch)
treee7e5f4b88af3932d60c658ce8a3a9ee1a5571288 /include/functions_user.inc.php
parentdf0d5d19054bca46a2bcc2f9d8bee136ffa8c8ad (diff)
*** empty log message ***
git-svn-id: http://piwigo.org/svn/trunk@16 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_user.inc.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index b19e53f18..dcb569485 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -224,29 +224,29 @@ function check_login_authorization()
function get_restrictions( $user_id, $user_status, $check_invisible )
{
// 1. getting the ids of the restricted categories
- $query = 'select cat_id';
- $query.= ' from '.PREFIX_TABLE.'restrictions';
- $query.= ' where user_id = '.$user_id;
+ $query = 'SELECT cat_id';
+ $query.= ' FROM '.PREFIX_TABLE.'restrictions';
+ $query.= ' WHERE user_id = '.$user_id;
$query.= ';';
$result = mysql_query( $query );
- $i = 0;
+
$restriction = array();
while ( $row = mysql_fetch_array( $result ) )
{
- $restriction[$i++] = $row['cat_id'];
+ array_push( $restriction, $row['cat_id'] );
}
if ( $check_invisible )
{
// 2. adding to the restricted categories, the invisible ones
- if ( $user_status != "admin" )
+ if ( $user_status != 'admin' )
{
- $query = 'select id';
- $query.= ' from '.PREFIX_TABLE.'categories';
- $query.= " where status='invisible';";
+ $query = 'SELECT id';
+ $query.= ' FROM '.PREFIX_TABLE.'categories';
+ $query.= " WHERE status = 'invisible';";
$result = mysql_query( $query );
while ( $row = mysql_fetch_array( $result ) )
{
- $restriction[$i++] = $row['id'];
+ array_push( $restriction, $row['id'] );
}
}
}