From d8e4c3f343d9a521f8cb4f767ead1523f8046f69 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 25 Feb 2009 16:27:48 +0100 Subject: [PATCH] [svn r18692] Fixing agenda links when multiple URL feature is enabled see FS#3462 --- main/calendar/agenda.inc.php | 14 ++++++++++++-- main/calendar/myagenda.inc.php | 13 ++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/main/calendar/agenda.inc.php b/main/calendar/agenda.inc.php index abbda1b265..4944a31b63 100644 --- a/main/calendar/agenda.inc.php +++ b/main/calendar/agenda.inc.php @@ -1,4 +1,4 @@ -'.$time.' '.$mycourse['official_code'].' '.$item['title'].'
'; } diff --git a/main/calendar/myagenda.inc.php b/main/calendar/myagenda.inc.php index 0fe3797c7c..2abc24a97e 100644 --- a/main/calendar/myagenda.inc.php +++ b/main/calendar/myagenda.inc.php @@ -564,6 +564,17 @@ function get_personal_agenda_items($agendaitems, $day = "", $month = "", $year = //echo "week:".$week."/"; //echo $type."

"; //echo "

".$sql."
"; + + global $_configuration; + $root_url = $_configuration['root_web']; + if ($_configuration['multiple_access_urls']==true) { + $access_url_id = api_get_current_access_url_id(); + if ($access_url_id != -1 ){ + $url = api_get_access_url($access_url_id); + $root_url = $url['url']; + } + } + $result = api_sql_query($sql, __FILE__, __LINE__); while ($item = Database::fetch_array($result)) { @@ -584,7 +595,7 @@ function get_personal_agenda_items($agendaitems, $day = "", $month = "", $year = // if the student has specified a course we a add a link to that course if ($item['course'] <> "") { - $url = $_configuration['root_web']."main/calendar/agenda.php?cidReq=".urlencode($item['course'])."&day=$day&month=$month&year=$year#$day"; // RH //Patrick Cool: to highlight the relevant agenda item + $url = $root_url."main/calendar/agenda.php?cidReq=".urlencode($item['course'])."&day=$day&month=$month&year=$year#$day"; // RH //Patrick Cool: to highlight the relevant agenda item $course_link = "".$item['course'].""; } else