Changeset 28926


Ignore:
Timestamp:
07/02/14 23:07:16 (5 years ago)
Author:
mistic100
Message:

bug 3002: Two classes with the same name : Calendar

Location:
trunk/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/calendar_monthly.class.php

    r26461 r28926  
    3939 * Monthly calendar style (composed of years/months and days) 
    4040 */ 
    41 class Calendar extends CalendarBase 
     41class CalendarMonthly extends CalendarBase 
    4242{ 
    4343  /** 
  • trunk/include/calendar_weekly.class.php

    r26461 r28926  
    3939 * Weekly calendar style (composed of years/week in years and days in week) 
    4040 */ 
    41 class Calendar extends CalendarBase 
     41class CalendarWeekly extends CalendarBase 
    4242{ 
    4343  /** 
  • trunk/include/functions_calendar.inc.php

    r28491 r28926  
    115115      'include'        => 'calendar_monthly.class.php', 
    116116      'view_calendar'  => true, 
     117      'classname'      => 'CalendarMonthly', 
    117118      ), 
    118119    // Weekly style 
     
    120121      'include'        => 'calendar_weekly.class.php', 
    121122      'view_calendar'  => false, 
     123      'classname'      => 'CalendarWeekly', 
    122124      ), 
    123125    ); 
     
    134136  } 
    135137  $cal_style = $page['chronology_style']; 
     138  $classname = $styles[$cal_style]['classname']; 
     139 
    136140  include(PHPWG_ROOT_PATH.'include/'. $styles[$cal_style]['include']); 
    137   // TODO : class name overlap, rename them in CalendarMonth and CalendarWeek 
    138   $calendar = new Calendar();  
     141  $calendar = new $classname(); 
    139142 
    140143  // Retrieve view 
Note: See TracChangeset for help on using the changeset viewer.