Code cleanup.
This commit is contained in:
parent
97b4ac60ac
commit
01aae41d74
|
@ -21,10 +21,10 @@ class PHPCalendar_Core {
|
|||
$this->month = (int) $month;
|
||||
$this->year = (int) $year;
|
||||
$this->month_url = $url;
|
||||
|
||||
}
|
||||
|
||||
public function event($day_of_the_week, $event_url = NULL, $css_id = NULL, $custom_text = NULL) {
|
||||
public function event($day_of_the_week, $event_url = NULL, $css_id = NULL, $custom_text = NULL)
|
||||
{
|
||||
$this->event_data += Array($day_of_the_week => Array($event_url, $css_id, $custom_text));
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,8 @@ class PHPCalendar_Core {
|
|||
# http://keithdevens.com/software/php_calendar
|
||||
# see example at http://keithdevens.com/weblog
|
||||
# License: http://keithdevens.com/software/license
|
||||
function generate_calendar($year, $month, $days = array(), $day_name_length = 3, $month_href = NULL, $first_day = 0, $pn = array()){
|
||||
function generate_calendar($year, $month, $days = array(), $day_name_length = 3, $month_href = NULL, $first_day = 0, $pn = array())
|
||||
{
|
||||
$first_of_month = gmmktime(0,0,0,$month,1,$year);
|
||||
#remember that mktime will automatically correct if invalid dates are entered
|
||||
# for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998
|
||||
|
|
|
@ -58,13 +58,6 @@
|
|||
}
|
||||
if ($day_count > 0) {
|
||||
$calendar->event($curr_day, url::site("calendarview/day/" . $calendar_year . "/" . $calendar_user . "/" . $counter_months . "/" . $curr_day));
|
||||
/*
|
||||
$calendar -> attach($calendar -> event()
|
||||
-> condition('year', $calendar_year)
|
||||
-> condition('month', $counter_months)
|
||||
-> condition('day', $curr_day)
|
||||
-> output(html::anchor(url::site("calendarview/day/" . $calendar_year . "/" . $calendar_user . "/" . $counter_months . "/" . $curr_day), $day_count)));
|
||||
*/
|
||||
}
|
||||
$curr_day++;
|
||||
}
|
||||
|
@ -90,13 +83,6 @@
|
|||
}
|
||||
if ($day_count > 0) {
|
||||
$calendar->event($MAX_DAYS, url::site("calendarview/day/" . $calendar_year . "/" . $calendar_user . "/" . $counter_months . "/" . $MAX_DAYS));
|
||||
/*
|
||||
$calendar -> attach($calendar -> event()
|
||||
-> condition('year', $calendar_year)
|
||||
-> condition('month', $counter_months)
|
||||
-> condition('day', $MAX_DAYS)
|
||||
-> output(html::anchor(url::site("calendarview/day/" . $calendar_year . "/" . $calendar_user . "/" . $counter_months . "/" . $MAX_DAYS), $day_count)));
|
||||
*/
|
||||
}
|
||||
}
|
||||
echo $calendar->render();
|
||||
|
@ -153,13 +139,6 @@
|
|||
}
|
||||
if ($day_count > 0) {
|
||||
$calendar->event($curr_day, url::site("calendarview/day/" . $calendar_year . "/" . $calendar_user . "/" . $counter_months . "/" . $curr_day));
|
||||
/*
|
||||
$calendar -> attach($calendar -> event()
|
||||
-> condition('year', $calendar_year)
|
||||
-> condition('month', $counter_months)
|
||||
-> condition('day', $curr_day)
|
||||
-> output(html::anchor(url::site("calendarview/day/" . $calendar_year . "/" . $calendar_user . "/" . $counter_months . "/" . $curr_day), $day_count)));
|
||||
*/
|
||||
}
|
||||
$curr_day++;
|
||||
}
|
||||
|
@ -183,13 +162,6 @@
|
|||
}
|
||||
if ($day_count > 0) {
|
||||
$calendar->event($MAX_DAYS, url::site("calendarview/day/" . $calendar_year . "/" . $calendar_user . "/" . $counter_months . "/" . $MAX_DAYS));
|
||||
/*
|
||||
$calendar -> attach($calendar -> event()
|
||||
-> condition('year', $calendar_year)
|
||||
-> condition('month', $counter_months)
|
||||
-> condition('day', $MAX_DAYS)
|
||||
-> output(html::anchor(url::site("calendarview/day/" . $calendar_year . "/" . $calendar_user . "/" . $counter_months . "/" . $MAX_DAYS), $day_count)));
|
||||
*/
|
||||
}
|
||||
}
|
||||
$counter_months++;
|
||||
|
|
Reference in New Issue
Block a user