Changeset 13074 for trunk/include/ws_functions.inc.php
- Timestamp:
- Feb 9, 2012, 10:11:34 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/ws_functions.inc.php
r13003 r13074 521 521 } 522 522 523 524 /** 525 * create a tree from a flat list of categories, no recursivity for high speed 526 */ 527 function 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 } 523 553 524 554 /** … … 1670 1700 { 1671 1701 $do_update = false; 1672 1702 1673 1703 $infos = pwg_image_infos($file_path); 1674 1704 1675 1705 foreach (array('width', 'height', 'filesize') as $image_info) 1676 1706 { … … 1745 1775 // else we use "file". 1746 1776 remove_chunks($params['original_sum'], 'thumb'); 1747 1777 1748 1778 if (isset($params['high_sum'])) 1749 1779 {
Note: See TracChangeset
for help on using the changeset viewer.