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/ws_functions.inc.php

    r13003 r13074  
    521521}
    522522
     523
     524/**
     525 * create a tree from a flat list of categories, no recursivity for high speed
     526 */
     527function categories_flatlist_to_tree($categories)
     528{
     529  $tree = array();
     530  $key_of_cat = array();
     531
     532  foreach ($categories as $key => &$node)
     533  {
     534    $key_of_cat[$node['id']] = $key;
     535
     536    if (!isset($node['id_uppercat']))
     537    {
     538      $tree[$key] = &$node;
     539    }
     540    else
     541    {
     542      if (!isset($categories[ $key_of_cat[ $node['id_uppercat'] ] ]['sub_categories']))
     543      {
     544        $categories[ $key_of_cat[ $node['id_uppercat'] ] ]['sub_categories'] = array();
     545      }
     546
     547      $categories[ $key_of_cat[ $node['id_uppercat'] ] ]['sub_categories'][$key] = &$node;
     548    }
     549  }
     550
     551  return $tree;
     552}
    523553
    524554/**
     
    16701700  {
    16711701    $do_update = false;
    1672    
     1702
    16731703    $infos = pwg_image_infos($file_path);
    1674    
     1704
    16751705    foreach (array('width', 'height', 'filesize') as $image_info)
    16761706    {
     
    17451775  // else we use "file".
    17461776  remove_chunks($params['original_sum'], 'thumb');
    1747  
     1777
    17481778  if (isset($params['high_sum']))
    17491779  {
Note: See TracChangeset for help on using the changeset viewer.