diff options
-rw-r--r-- | admin/cat_modify.php | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/admin/cat_modify.php b/admin/cat_modify.php index 76e952ab9..2eb9d5fdf 100644 --- a/admin/cat_modify.php +++ b/admin/cat_modify.php @@ -40,22 +40,6 @@ if ( isset( $_POST['submit'] ) ) $query.= ' WHERE id = '.$_GET['cat']; $query.= ';'; $row = mysql_fetch_array( mysql_query( $query ) ); - - if ( $_POST['status'] != $row['status'] ) - { - // deletion of all access for groups concerning this category - $query = 'DELETE'; - $query.= ' FROM '.PREFIX_TABLE.'group_access'; - $query.= ' WHERE cat_id = '.$_GET['cat']; - mysql_query( $query ); - // deletion of all access for users concerning this category - $query = 'DELETE'; - $query.= ' FROM '.PREFIX_TABLE.'user_access'; - $query.= ' WHERE cat_id = '.$_GET['cat']; - mysql_query( $query ); - // resynchronize all users - synchronize_all_users(); - } $query = 'UPDATE '.PREFIX_TABLE.'categories'; @@ -87,6 +71,22 @@ if ( isset( $_POST['submit'] ) ) $query.= ';'; mysql_query( $query ); + if ( $_POST['status'] != $row['status'] ) + { + // deletion of all access for groups concerning this category + $query = 'DELETE'; + $query.= ' FROM '.PREFIX_TABLE.'group_access'; + $query.= ' WHERE cat_id = '.$_GET['cat']; + mysql_query( $query ); + // deletion of all access for users concerning this category + $query = 'DELETE'; + $query.= ' FROM '.PREFIX_TABLE.'user_access'; + $query.= ' WHERE cat_id = '.$_GET['cat']; + mysql_query( $query ); + // resynchronize all users + synchronize_all_users(); + } + // checking users favorites $query = 'SELECT id'; $query.= ' FROM '.PREFIX_TABLE.'users'; |