Changeset 2344 for trunk/admin


Ignore:
Timestamp:
May 16, 2008, 10:03:30 PM (16 years ago)
Author:
vdigital
Message:

Logical merge from 1.7.1 Revison 2193
Bug with no ref (and maybe 663): Currently if the "Search in subcategories" checkbox was unselected, all existing categories and elements were duplicated.
Cause: Wrong comparison between fileserver directory list and already known files in tables.

Resolution: keeping only the selected directory from the file server directory list in such cases,
if that one is still allocated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/site_update.php

    r2306 r2344  
    236236    array_push($fs_fulldirs, $basedir);
    237237  }
    238 
     238  // If $_POST['subcats-included'] != 1 ("Search in subcategories" is unchecked)
     239  // $db_fulldirs doesn't include any subdirectories and $fs_fulldirs does
     240  // So $fs_fulldirs will be limited to the selected basedir
     241  // (if that one is in $fs_fulldirs)
     242  if (!isset($_POST['subcats-included']) or $_POST['subcats-included'] != 1)
     243  {
     244    $fs_fulldirs = array_intersect($fs_fulldirs, array_keys($db_fulldirs));
     245  }
    239246  $inserts = array();
    240247  // new categories are the directories not present yet in the database
Note: See TracChangeset for help on using the changeset viewer.