Changeset 26201 for extensions/pbase2piwigo/include/functions.inc.php
- Timestamp:
- Dec 26, 2013, 1:22:47 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/pbase2piwigo/include/functions.inc.php
r21291 r26201 1 1 <?php 2 if (!defined('PBASE_PATH'))die('Hacking attempt!');2 defined('PBASE_PATH') or die('Hacking attempt!'); 3 3 4 4 /** … … 306 306 307 307 /** 308 * count pictures and cats in the selected cat 309 * @param: &array tree 310 * @param: string $path 311 * @param: &int nb pictures 312 * @param: &int nb categories 313 * @param: bool recursive 314 * @return: void 315 */ 316 function count_pictures_cats(&$tree, $path, &$nb_pictures, &$nb_categories, $recursive=true) 317 { 318 $current = &get_current_cat($tree, $path); 319 $nb_pictures+= $current['nb_pictures']; 320 $nb_categories++; 321 322 if ( $recursive and !empty($current['categories']) ) 323 { 324 foreach ($current['categories'] as $cat) 325 { 326 count_pictures_cats($tree, $cat['path'], $nb_pictures, $nb_categories, $recursive); 327 } 328 } 329 } 330 331 /** 308 332 * test if a download method is available 309 333 * @return: bool … … 421 445 422 446 return false; 423 }424 }425 426 /**427 * count pictures and cats in the selected cat428 * @param: &array tree429 * @param: string $path430 * @param: &int nb pictures431 * @param: &int nb categories432 * @param: bool recursive433 * @return: void434 */435 function count_pictures_cats(&$tree, $path, &$nb_pictures, &$nb_categories, $recursive=true)436 {437 $current = &get_current_cat($tree, $path);438 $nb_pictures+= $current['nb_pictures'];439 $nb_categories++;440 441 if ( $recursive and !empty($current['categories']) )442 {443 foreach ($current['categories'] as $cat)444 {445 count_pictures_cats($tree, $cat['path'], $nb_pictures, $nb_categories, $recursive);446 }447 447 } 448 448 } … … 516 516 } 517 517 } 518 519 ?>
Note: See TracChangeset
for help on using the changeset viewer.