mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-29 20:59:59 +03:00
bug 3002: Two classes with the same name : Calendar
git-svn-id: http://piwigo.org/svn/trunk@28926 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
fa832428fa
commit
0161fd5a88
3 changed files with 7 additions and 4 deletions
|
@ -38,7 +38,7 @@ define('CDAY', 2);
|
||||||
/**
|
/**
|
||||||
* Monthly calendar style (composed of years/months and days)
|
* Monthly calendar style (composed of years/months and days)
|
||||||
*/
|
*/
|
||||||
class Calendar extends CalendarBase
|
class CalendarMonthly extends CalendarBase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Initialize the calendar.
|
* Initialize the calendar.
|
||||||
|
|
|
@ -38,7 +38,7 @@ define('CDAY', 2);
|
||||||
/**
|
/**
|
||||||
* Weekly calendar style (composed of years/week in years and days in week)
|
* Weekly calendar style (composed of years/week in years and days in week)
|
||||||
*/
|
*/
|
||||||
class Calendar extends CalendarBase
|
class CalendarWeekly extends CalendarBase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Initialize the calendar
|
* Initialize the calendar
|
||||||
|
|
|
@ -114,11 +114,13 @@ WHERE id IN (' . implode(',',$page['items']) .')';
|
||||||
'monthly' => array(
|
'monthly' => array(
|
||||||
'include' => 'calendar_monthly.class.php',
|
'include' => 'calendar_monthly.class.php',
|
||||||
'view_calendar' => true,
|
'view_calendar' => true,
|
||||||
|
'classname' => 'CalendarMonthly',
|
||||||
),
|
),
|
||||||
// Weekly style
|
// Weekly style
|
||||||
'weekly' => array(
|
'weekly' => array(
|
||||||
'include' => 'calendar_weekly.class.php',
|
'include' => 'calendar_weekly.class.php',
|
||||||
'view_calendar' => false,
|
'view_calendar' => false,
|
||||||
|
'classname' => 'CalendarWeekly',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -133,9 +135,10 @@ WHERE id IN (' . implode(',',$page['items']) .')';
|
||||||
$page['chronology_style'] = 'monthly';
|
$page['chronology_style'] = 'monthly';
|
||||||
}
|
}
|
||||||
$cal_style = $page['chronology_style'];
|
$cal_style = $page['chronology_style'];
|
||||||
|
$classname = $styles[$cal_style]['classname'];
|
||||||
|
|
||||||
include(PHPWG_ROOT_PATH.'include/'. $styles[$cal_style]['include']);
|
include(PHPWG_ROOT_PATH.'include/'. $styles[$cal_style]['include']);
|
||||||
// TODO : class name overlap, rename them in CalendarMonth and CalendarWeek
|
$calendar = new $classname();
|
||||||
$calendar = new Calendar();
|
|
||||||
|
|
||||||
// Retrieve view
|
// Retrieve view
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue