Ignore:
Timestamp:
Dec 27, 2004, 3:30:49 PM (19 years ago)
Author:
plg
Message:
  • admin/update : filesystem synchronization process completely rewritten. How to speed up sync ? by avoiding recursivity !
  • admin/update : option to display verbose information details
  • admin/update : option to simulate only. No database insert, delete or update will be made
  • bug fixed : in admin/cat_list, if you delete a virtual category, you may create a gap in the rank list. This gap will generate errors when trying to move a category on this gap. Fixed by calling ordering and update_global_rank at category deletion.
  • admin/cat_list, only one query to insert a new virtual category (no need of a second query to update uppercats and global_rank)
  • for a given category, even if empty, the representing element must not be the one of a forbidden category for the current user
  • generation time optionnaly displayed on the bottom of each page becomes more price : number of SQL queries and SQL time added.
File:
1 edited

Legend:

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

    r610 r659  
    7070  FROM '.CATEGORIES_TABLE.' AS c INNER JOIN '.IMAGES_TABLE.' AS i
    7171    ON i.id = c.representative_picture_id
    72   WHERE uppercats REGEXP \'(^|,)'.$row['id'].'(,|$)\'
     72  WHERE uppercats REGEXP \'(^|,)'.$row['id'].'(,|$)\'';
     73  // we must not show pictures of a forbidden category
     74  if ($user['forbidden_categories'] != '')
     75  {
     76    $query.= '
     77    AND c.id NOT IN ('.$user['forbidden_categories'].')';
     78  }
     79  $query.= '
    7380  ORDER BY RAND()
    7481  LIMIT 0,1
Note: See TracChangeset for help on using the changeset viewer.