mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-21 09:03:38 +02:00
Update of the user preferences panel.
Deletion of some PREFIX_TABLE occurences git-svn-id: http://piwigo.org/svn/trunk@630 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -30,8 +30,7 @@
|
||||
function get_group_restrictions( $group_id )
|
||||
{
|
||||
// 1. retrieving ids of private categories
|
||||
$query = 'SELECT id';
|
||||
$query.= ' FROM '.PREFIX_TABLE.'categories';
|
||||
$query = 'SELECT id FROM '.CATEGORIES_TABLE;
|
||||
$query.= " WHERE status = 'private'";
|
||||
$query.= ';';
|
||||
$result = pwg_query( $query );
|
||||
@@ -42,8 +41,7 @@ function get_group_restrictions( $group_id )
|
||||
}
|
||||
// 2. retrieving all authorized categories for the group
|
||||
$authorized = array();
|
||||
$query = 'SELECT cat_id';
|
||||
$query.= ' FROM '.PREFIX_TABLE.'group_access';
|
||||
$query = 'SELECT cat_id FROM '.GROUP_ACCESS_TABLE;
|
||||
$query.= ' WHERE group_id = '.$group_id;
|
||||
$query.= ';';
|
||||
$result = pwg_query( $query );
|
||||
@@ -88,8 +86,7 @@ function is_group_allowed( $category_id, $restrictions )
|
||||
$is_root = false;
|
||||
while ( !$is_root and !in_array( $category_id, $restrictions ) )
|
||||
{
|
||||
$query = 'SELECT id_uppercat';
|
||||
$query.= ' FROM '.PREFIX_TABLE.'categories';
|
||||
$query = 'SELECT id_uppercat FROM '.CATEGORIES_TABLE;
|
||||
$query.= ' WHERE id = '.$category_id;
|
||||
$query.= ';';
|
||||
$row = mysql_fetch_array( pwg_query( $query ) );
|
||||
|
||||
Reference in New Issue
Block a user