diff options
author | mistic100 <mistic@piwigo.org> | 2014-07-02 21:07:16 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2014-07-02 21:07:16 +0000 |
commit | 0161fd5a88dedee9184dffe88fb66a9b261b7a99 (patch) | |
tree | 6d010301f3b072e7e9f5afa4d25bda28db875a15 /include/functions_calendar.inc.php | |
parent | fa832428fa744c0c907611c4343a94c9e8e56ff0 (diff) |
bug 3002: Two classes with the same name : Calendar
git-svn-id: http://piwigo.org/svn/trunk@28926 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/functions_calendar.inc.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/functions_calendar.inc.php b/include/functions_calendar.inc.php index 30cdb0db0..850ccdccf 100644 --- a/include/functions_calendar.inc.php +++ b/include/functions_calendar.inc.php @@ -114,11 +114,13 @@ WHERE id IN (' . implode(',',$page['items']) .')'; 'monthly' => array( 'include' => 'calendar_monthly.class.php', 'view_calendar' => true, + 'classname' => 'CalendarMonthly', ), // Weekly style 'weekly' => array( 'include' => 'calendar_weekly.class.php', 'view_calendar' => false, + 'classname' => 'CalendarWeekly', ), ); @@ -133,9 +135,10 @@ WHERE id IN (' . implode(',',$page['items']) .')'; $page['chronology_style'] = 'monthly'; } $cal_style = $page['chronology_style']; + $classname = $styles[$cal_style]['classname']; + include(PHPWG_ROOT_PATH.'include/'. $styles[$cal_style]['include']); - // TODO : class name overlap, rename them in CalendarMonth and CalendarWeek - $calendar = new Calendar(); + $calendar = new $classname(); // Retrieve view |