mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-06 18:01:31 +02:00
Several bug fixes
* Batch Manager no longer have a php error * Intro Graph display the actual week when it's monday * fix the "groups" reserved word * History is now summarize on the stats pag access * New piwigo no longer have PHP error due to stats.php
This commit is contained in:
@@ -453,6 +453,11 @@ if ($conf['enable_synchronization'])
|
||||
$prefilters[] = array('ID' => 'no_sync_md5sum', 'NAME' => l10n('With no checksum'));
|
||||
}
|
||||
|
||||
function UC_name_compare($a, $b)
|
||||
{
|
||||
return strcmp(strtolower($a['NAME']), strtolower($b['NAME']));
|
||||
}
|
||||
|
||||
$prefilters = trigger_change('get_batch_manager_prefilters', $prefilters);
|
||||
usort($prefilters, 'UC_name_compare');
|
||||
|
||||
|
||||
+8
-5
@@ -205,13 +205,13 @@ $temp_data = array();
|
||||
//Get data from $nb_weeks last weeks
|
||||
while ($mondays < $nb_weeks)
|
||||
{
|
||||
$date->sub(new DateInterval('P1D'));
|
||||
|
||||
if ($date->format('D') == 'Mon')
|
||||
{
|
||||
$week_number[] = $date->format('W');
|
||||
$mondays += 1;
|
||||
}
|
||||
|
||||
$date->sub(new DateInterval('P1D'));
|
||||
}
|
||||
|
||||
$week_number = array_reverse($week_number);
|
||||
@@ -284,10 +284,13 @@ for ($i=1; $i < count($temp_data); $i++)
|
||||
|
||||
$split = 0;
|
||||
//Split (split represented by -1)
|
||||
while (max($diff_x) > 120)
|
||||
if (count($diff_x) > 0)
|
||||
{
|
||||
$diff_x[array_search(max($diff_x), $diff_x)] = -1;
|
||||
$split++;
|
||||
while (max($diff_x) > 120)
|
||||
{
|
||||
$diff_x[array_search(max($diff_x), $diff_x)] = -1;
|
||||
$split++;
|
||||
}
|
||||
}
|
||||
|
||||
//Fill empty chart data for the template
|
||||
|
||||
+6
-1
@@ -216,7 +216,7 @@ check_status(ACCESS_ADMINISTRATOR);
|
||||
// | Refresh summary from details |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
//history_summarize();
|
||||
history_summarize();
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Display statistics header |
|
||||
@@ -242,6 +242,11 @@ $template->assign(
|
||||
|
||||
function set_missing_values($unit, $data, $keep_size=true, $firstDate = null, $lastDate = null)
|
||||
{
|
||||
if (count($data) <= 1)
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
|
||||
$limit = count($data);
|
||||
$result = array();
|
||||
if ($firstDate == null)
|
||||
|
||||
Reference in New Issue
Block a user