aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_calendar.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/functions_calendar.inc.php')
-rw-r--r--include/functions_calendar.inc.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/include/functions_calendar.inc.php b/include/functions_calendar.inc.php
index 59f2ee571..2f71e5d94 100644
--- a/include/functions_calendar.inc.php
+++ b/include/functions_calendar.inc.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | Piwigo - a PHP based photo gallery |
// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org |
// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
// +-----------------------------------------------------------------------+
@@ -21,9 +21,19 @@
// | USA. |
// +-----------------------------------------------------------------------+
+/**
+ * @package functions\calendar
+ */
+
+/** URL keyword for list view */
define('CAL_VIEW_LIST', 'list');
+/** URL keyword for calendar view */
define('CAL_VIEW_CALENDAR', 'calendar');
+
+/**
+ * Initialize _$page_ and _$template_ vars for calendar view.
+ */
function initialize_calendar()
{
global $page, $conf, $user, $template, $filter;
@@ -124,7 +134,8 @@ WHERE id IN (' . implode(',',$page['items']) .')';
}
$cal_style = $page['chronology_style'];
include(PHPWG_ROOT_PATH.'include/'. $styles[$cal_style]['include']);
- $calendar = new Calendar();
+ // TODO : class name overlap, rename them in CalendarMonth and CalendarWeek
+ $calendar = new Calendar();
// Retrieve view
@@ -212,7 +223,7 @@ WHERE id IN (' . implode(',',$page['items']) .')';
$chronology_date = array();
if ( isset($page['chronology_date'][0]) )
{
- array_push($chronology_date, $page['chronology_date'][0]);
+ $chronology_date[] = $page['chronology_date'][0];
}
}
else
@@ -289,4 +300,5 @@ WHERE id IN (' . implode(',',$page['items']) .')';
}
pwg_debug('end initialize_calendar');
}
+
?> \ No newline at end of file