Ignore:
Timestamp:
Feb 9, 2012, 10:11:34 PM (12 years ago)
Author:
rvelices
Message:
  • remove square/thumb from choices on picture
  • fix content margin on password register
  • purge derivative cache by type of derivative
  • session saved infos/messages are not given to the page on html redirections
  • shorter/faster code in functions_xxx
File:
1 edited

Legend:

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

    r12954 r13074  
    486486}
    487487
    488 /**
    489  * create a tree from a flat list of categories, no recursivity for high speed
    490  */
    491 function categories_flatlist_to_tree($categories)
    492 {
    493   $tree = array();
    494   $key_of_cat = array();
    495 
    496   foreach ($categories as $key => &$node)
    497   {
    498     $key_of_cat[$node['id']] = $key;
    499 
    500     if (!isset($node['id_uppercat']))
    501     {
    502       $tree[$key] = &$node;
    503     }
    504     else
    505     {
    506       if (!isset($categories[ $key_of_cat[ $node['id_uppercat'] ] ]['sub_categories']))
    507       {
    508         $categories[ $key_of_cat[ $node['id_uppercat'] ] ]['sub_categories'] = array();
    509       }
    510 
    511       $categories[ $key_of_cat[ $node['id_uppercat'] ] ]['sub_categories'][$key] = &$node;
    512     }
    513   }
    514 
    515   return $tree;
    516 }
     488
    517489?>
Note: See TracChangeset for help on using the changeset viewer.