aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-10-19 21:59:14 +0000
committerplegall <plg@piwigo.org>2005-10-19 21:59:14 +0000
commitf223675e5d5936e2621229397fdfb045e44cf109 (patch)
treeb62dc9760005ec4a868527aa2f42ae21b5e5c52e
parent233bd56dd8e7b512c50e1f98314fcca07624d3aa (diff)
- warning fixed: $_GET['year'] and $_GET['month'] are not always defined to
create navigation bar in admin/stats. $_GET['day'] does not exist git-svn-id: http://piwigo.org/svn/trunk@904 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin/stats.php26
1 files changed, 19 insertions, 7 deletions
diff --git a/admin/stats.php b/admin/stats.php
index 1cc54db0c..252cb86ba 100644
--- a/admin/stats.php
+++ b/admin/stats.php
@@ -273,13 +273,25 @@ $query = '
$page['nb_logs']=$row['nb_logs'];
//display nav bar
- $url = $_SERVER['PHP_SELF'].'?page=stats&year='.$_GET['year'];
- $url .= '&month='.$_GET['month'].'&day='.$_GET['day'];
- $page['navigation_bar'] =
- create_navigation_bar( $url, $page['nb_logs'],$page['start'],$conf['nb_logs_page'], 'admin' );
-$template->assign_block_vars('navigation',
- array('NAV_BAR' => $page['navigation_bar'])
- );
+$url = $_SERVER['PHP_SELF'].'?page=stats';
+$url.= isset($_GET['year']) ? '&amp;year='.$_GET['year'] : '';
+$url.= isset($_GET['month']) ? '&amp;month='.$_GET['month'] : '';
+
+$page['navigation_bar'] =
+create_navigation_bar(
+ $url,
+ $page['nb_logs'],
+ $page['start'],
+ $conf['nb_logs_page'],
+ 'admin'
+ );
+
+$template->assign_block_vars(
+ 'navigation',
+ array(
+ 'NAV_BAR' => $page['navigation_bar']
+ )
+ );
//----------------------------------------------------------- sending html code
$template->assign_var_from_handle('ADMIN_CONTENT', 'stats');