From 3994cc4814fdf9f451572ccaf4fa72ea601b04fd Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Tue, 18 May 2010 16:53:06 +0200 Subject: [PATCH] Cleaning code --- main/calendar/agenda.php | 13 +++++-------- main/calendar/myagenda.inc.php | 13 ++++++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/main/calendar/agenda.php b/main/calendar/agenda.php index 59d24702a9..399a106301 100755 --- a/main/calendar/agenda.php +++ b/main/calendar/agenda.php @@ -198,16 +198,13 @@ echo ''; //setting the default year and month $select_year = ''; $select_month = ''; -if(!empty($_GET['year'])) -{ +if(!empty($_GET['year'])) { $select_year = (int)$_GET['year']; } -if(!empty($_GET['month'])) -{ +if(!empty($_GET['month'])) { $select_month = (int)$_GET['month']; } -if (empty($select_year) && empty($select_month)) -{ +if (empty($select_year) && empty($select_month)) { $today = getdate(); $select_year = $today['year']; $select_month = $today['mon']; @@ -384,7 +381,7 @@ if (!$_GET['action'] || $_GET['action']=="showall" || $_GET['action']=="showcur if ($_GET['origin'] != 'learnpath') { if (!$_SESSION['view'] || $_SESSION['view'] <> 'month') { if(!empty($_GET['agenda_id'])) { - display_one_agenda_item((int)$_GET['agenda_id']); + display_one_agenda_item($_GET['agenda_id']); } else { display_agenda_items(); } @@ -405,4 +402,4 @@ if ($_GET['origin'] != 'learnpath') { Display::display_footer(); } -?> +?> \ No newline at end of file diff --git a/main/calendar/myagenda.inc.php b/main/calendar/myagenda.inc.php index bfd3345b6e..d4e981008f 100755 --- a/main/calendar/myagenda.inc.php +++ b/main/calendar/myagenda.inc.php @@ -163,14 +163,17 @@ function display_mymonthcalendar($agendaitems, $month, $year, $weekdaynames=arra $backwardsURL = api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".Security::remove_XSS($g_cc)."&action=view&view=month&month=". ($month == 1 ? 12 : $month -1)."&year=". ($month == 1 ? $year -1 : $year); $forewardsURL = api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".Security::remove_XSS($g_cc)."&action=view&view=month&month=". ($month == 12 ? 1 : $month +1)."&year=". ($month == 12 ? $year +1 : $year); - echo "", "", ""; - echo "", "", ""; + echo '
".Display::return_icon('action_prev.png',get_lang('Previous'))."", $monthName, " ", $year, "".Display::return_icon('action_next.png',get_lang('Next'))."
'.''; + echo ''; + echo ''; + echo ''; + echo ''; - echo ""; + echo ''; for ($ii = 1; $ii < 8; $ii ++) { - echo ""; + echo ''; } - echo ""; + echo ''; $curday = -1; $today = getdate(); while ($curday <= $numberofdays[$month]) {
'.Display::return_icon('action_prev.png',get_lang('Previous')).''.$monthName." ".$year.''.Display::return_icon('action_next.png',get_lang('Next')).'
", $DaysShort[$ii % 7], "'.$DaysShort[$ii % 7].'