Ignore:
Timestamp:
Jul 21, 2003, 9:47:14 PM (21 years ago)
Author:
z0rglub
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_user.inc.php

    r21 r26  
    314314{
    315315  $lowest_category_id = $category_id;
    316                
     316
    317317  $is_root = false;
    318318  while ( !$is_root and !in_array( $category_id, $restrictions ) )
     
    323323    $query.= ';';
    324324    $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;
    329326    $category_id = $row['id_uppercat'];
    330327  }
    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;
    340331  // this user is allowed to go in this category
    341332  return 0;
Note: See TracChangeset for help on using the changeset viewer.