Cleaning code

skala
Julio Montoya 15 years ago
parent b23652ddf1
commit 30a2286946
  1. 17
      main/calendar/agenda.inc.php
  2. 2
      main/calendar/myagenda.inc.php
  3. 2
      main/forum/reply.php
  4. 2
      main/link/link.php

@ -2963,8 +2963,9 @@ function display_daycalendar($agendaitems, $day, $month, $year, $weekdaynames, $
// we are loading all the calendar items of all the courses for today
echo "<table class=\"data_table\">";
// the forward and backwards url
$backwardsURL = api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".Security::remove_XSS($_GET['courseCode'])."&action=view&view=day&day=".date("j", $previousday)."&month=".date("n", $previousday)."&year=".date("Y", $previousday);
$forewardsURL = api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".Security::remove_XSS($_GET['courseCode'])."&action=view&view=day&day=".date("j", $nextday)."&month=".date("n", $nextday)."&year=".date("Y", $nextday);
$course_code = isset($_GET['courseCode']) ? Security::remove_XSS($_GET['courseCode']) : null;
$backwardsURL = api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".$course_code."&action=view&view=day&day=".date("j", $previousday)."&month=".date("n", $previousday)."&year=".date("Y", $previousday);
$forewardsURL = api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".$course_code."&action=view&view=day&day=".date("j", $nextday)."&month=".date("n", $nextday)."&year=".date("Y", $nextday);
// The title row containing the day
echo "<tr>", "<th width=\"10%\"><a href=\"", $backwardsURL, "\">".Display::return_icon('action_prev.png',get_lang('Previous'))."</a></th>", "<th>";
echo $DaysLong[$day_of_the_week]." ".date("j", $today)." ".$MonthsLong[date("n", $today) - 1]." ".date("Y", $today);
@ -2987,12 +2988,14 @@ function display_daycalendar($agendaitems, $day, $month, $year, $weekdaynames, $
echo ("<td valign=\"top\" width=\"75\">". ((($i) / 2) - (1 / 2))." ".get_lang("HourShort")." 30</td>");
}
echo "<td $class valign=\"top\" colspan=\"2\">";
if (is_array($agendaitems[$i])) {
foreach ($agendaitems[$i] as $key => $value) {
echo $value;
if (isset($agendaitems[$i])) {
if (is_array($agendaitems[$i])) {
foreach ($agendaitems[$i] as $key => $value) {
echo $value;
}
} else {
echo $agendaitems[$i];
}
} else {
echo $agendaitems[$i];
}
echo "</td>";
echo "</tr>";

@ -675,7 +675,7 @@ function get_personal_agenda_items($user_id, $agendaitems, $day = "", $month = "
$halfhour = $halfhour +1;
}
//Display events by list
$agendaitems[$halfhour] .= "<div><i>$hour:$minute</i> $course_link <a href=\"myagenda.php?action=view&amp;view=personal&amp;day=$day&amp;month=$month&amp;year=$year&amp;id=".$item['id']."#".$item['id']."\" class=\"personal_agenda\">".$item['title']."</a></div>";
$agendaitems[$halfhour] .= "<div><i>$hour:$minute</i> $course_link <a href=\"myagenda.php?action=view&amp;view=personal&amp;day=$day&amp;month=$month&amp;year=$year&amp;id=".$item['id']."#".$item['id']."\" class=\"personal_agenda\">".$item['title']."</a></div>";
}
}

@ -33,7 +33,7 @@ api_protect_course_script(true);
// Including additional library scripts.
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
$nameTools = get_lang('ToolForum');
$nameTools = get_lang('ForumCategories');
$origin = '';
if (isset($_GET['origin'])) {

@ -457,7 +457,7 @@ if (empty($_GET['action']) || ($_GET['action'] != 'editlink' && $_GET['action']
// - instead of a +, the category is no longer clickable and all the links of this category are displayed
$myrow['description'] = text_filter($myrow['description']);
if ($urlview[$i] == '1') {
if (isset($urlview[$i]) && $urlview[$i] == '1') {
$newurlview = $urlview;
$newurlview[$i] = '0';

Loading…
Cancel
Save