From 79be0313b1f67d3d176b1143d6282431de728cf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= Date: Sat, 6 Feb 2010 13:57:38 +0000 Subject: [PATCH] use php constant to set default year in video page. --- public/videos.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/public/videos.php b/public/videos.php index b0e0c52..827c5e8 100644 --- a/public/videos.php +++ b/public/videos.php @@ -3,9 +3,11 @@ #require_once('lib/magpierss/rss_fetch.inc'); #define('MAGPIE_CACHE_DIR', 'tmp/magpie_cache'); +define('DEFAULT_YEAR', '2010'); + function dispVideos() { -(isset($_GET['year_page'])) ? ($curyear = " ".$_GET['year_page']) : ($curyear = " 2009"); +(isset($_GET['year_page'])) ? ($curyear = " ".$_GET['year_page']) : ($curyear = " ".DEFAULT_YEAR); $str = ' @@ -72,15 +74,16 @@ function dispVideosMenu(){ function dispVideosYear(){ - if ($_GET['year_page']) { $year_page = $_GET['year_page']; } else { - $year_page = 2009; + $year_page = DEFAULT_YEAR; } + + $str = '';//''.$year_page.''; -- GitLab