2007-03-12 22:33:53 +00:00
|
|
|
<?php
|
|
|
|
// +-----------------------------------------------------------------------+
|
2019-06-04 17:13:51 +02:00
|
|
|
// | This file is part of Piwigo. |
|
2008-04-04 22:57:23 +00:00
|
|
|
// | |
|
2019-06-04 17:13:51 +02:00
|
|
|
// | For copyright and license information, please view the COPYING.txt |
|
|
|
|
// | file that was distributed with this source code. |
|
2007-03-12 22:33:53 +00:00
|
|
|
// +-----------------------------------------------------------------------+
|
|
|
|
|
2013-11-18 10:02:17 +00:00
|
|
|
/**
|
|
|
|
* @package functions\filter
|
|
|
|
*/
|
2007-03-12 22:33:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2013-11-18 10:02:17 +00:00
|
|
|
* Updates data of categories with filtered values
|
2007-03-12 22:33:53 +00:00
|
|
|
*
|
2013-11-23 22:57:15 +00:00
|
|
|
* @param array &$cats
|
2007-03-12 22:33:53 +00:00
|
|
|
*/
|
|
|
|
function update_cats_with_filtered_data(&$cats)
|
|
|
|
{
|
|
|
|
global $filter;
|
|
|
|
|
|
|
|
if ($filter['enabled'])
|
|
|
|
{
|
2008-05-01 01:12:34 +00:00
|
|
|
$upd_fields = array('date_last', 'max_date_last', 'count_images', 'count_categories', 'nb_images');
|
2007-03-12 22:33:53 +00:00
|
|
|
|
|
|
|
foreach ($cats as $cat_id => $category)
|
|
|
|
{
|
|
|
|
foreach ($upd_fields as $upd_field)
|
|
|
|
{
|
|
|
|
$cats[$cat_id][$upd_field] = $filter['categories'][$category['id']][$upd_field];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-11-18 10:02:17 +00:00
|
|
|
?>
|