Changeset 26 for trunk/include/functions_user.inc.php
- Timestamp:
- Jul 21, 2003, 9:47:14 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_user.inc.php
r21 r26 314 314 { 315 315 $lowest_category_id = $category_id; 316 316 317 317 $is_root = false; 318 318 while ( !$is_root and !in_array( $category_id, $restrictions ) ) … … 323 323 $query.= ';'; 324 324 $row = mysql_fetch_array( mysql_query( $query ) ); 325 if ( $row['id_uppercat'] == '' ) 326 { 327 $is_root = true; 328 } 325 if ( $row['id_uppercat'] == '' ) $is_root = true; 329 326 $category_id = $row['id_uppercat']; 330 327 } 331 332 if ( in_array( $lowest_category_id, $restrictions ) ) 333 { 334 return 1; 335 } 336 if ( in_array( $category_id, $restrictions ) ) 337 { 338 return 2; 339 } 328 329 if ( in_array( $lowest_category_id, $restrictions ) ) return 1; 330 if ( in_array( $category_id, $restrictions ) ) return 2; 340 331 // this user is allowed to go in this category 341 332 return 0;
Note: See TracChangeset
for help on using the changeset viewer.