Fixed incorrect handling of links

This commit is contained in:
Marc Alexander
2011-04-02 11:20:25 +02:00
parent 59a0ab6d90
commit ffeb0a39f3
3 changed files with 9 additions and 6 deletions

View File

@@ -118,6 +118,7 @@ Weitere Sprachen kannst in unserem Internationalen Forum finden: http://www.boar
<change>Fixed missing CSS for li-tags of calendar</change>
<change>Added error handling to installation of modules</change>
<change>Fixed timezone handling of calendar</change>
<change>Fixed incorrect handling of links</change>
</changelog>
<changelog lang="de">
<change>Fehlendes IF $S_BLOCK_ICON hinzugefügt</change>
@@ -129,6 +130,7 @@ Weitere Sprachen kannst in unserem Internationalen Forum finden: http://www.boar
<change>Fehlendes CSS für li-tags des Kalenders hinzugefügt</change>
<change>Fehlerbehandlung zu Installation von Modulen hinzugefügt</change>
<change>Zeitzonenbehandlung in Kalender korrigiert</change>
<change>Falsche Behandlung von Links korrigiert</change>
</changelog>
</entry>
<entry>

View File

@@ -184,7 +184,7 @@
<td style="text-align: center;">{events.EVENT_TITLE}</td>
<td style="text-align: center;">{events.EVENT_DESC}</td>
<td style="text-align: center;"><!-- IF events.EVENT_END -->{L_EVENT_START}:&nbsp;{events.EVENT_START}&nbsp;&#124;&nbsp;{L_EVENT_END}:&nbsp;{events.EVENT_END}<!-- ELSE -->{L_EVENT_TIME}:&nbsp;{events.EVENT_START}<!-- IF events.EVENT_ALL_DAY -->&nbsp;&#124;&nbsp;{L_EVENT_ALL_DAY}<!-- ENDIF --><!-- ENDIF --></td>
<td style="text-align: center;">{events.EVENT_URL}</td>
<td style="text-align: center;"><a href="{events.EVENT_URL}" alt="{events.EVENT_TITLE}">{events.EVENT_URL_RAW}</td>
<td style="text-align: center;">
<a href="{events.U_EDIT}">{ICON_EDIT}</a> <a href="{events.U_DELETE}">{ICON_DELETE}</a>
</td>

View File

@@ -174,7 +174,7 @@ class portal_calendar_module
if((($cur_event['start_time'] + 86400) >= $today_timestamp && $cur_event['all_day']) || ($cur_event['start_time'] <= $today_timestamp && $cur_event['end_time'] >= $today_timestamp))
{
$template->assign_block_vars('cur_events', array(
'EVENT_URL' => (isset($cur_event['url']) && $cur_event['url'] != '') ? $this->validate_url(str_replace('&', '&amp;', $cur_event['url'])) : '',
'EVENT_URL' => (isset($cur_event['url']) && $cur_event['url'] != '') ? $this->validate_url($cur_event['url']) : '',
'EVENT_TITLE' => $cur_event['title'],
'START_TIME' => $user->format_date($cur_event['start_time'], 'j. M Y, H:i'),
'END_TIME' => (!empty($cur_event['end_time'])) ? $user->format_date($cur_event['end_time'], 'j. M Y, H:i') : false,
@@ -185,7 +185,7 @@ class portal_calendar_module
else
{
$template->assign_block_vars('upcoming_events', array(
'EVENT_URL' => (isset($cur_event['url']) && $cur_event['url'] != '') ? $this->validate_url(str_replace('&', '&amp;', $cur_event['url'])) : '',
'EVENT_URL' => (isset($cur_event['url']) && $cur_event['url'] != '') ? $this->validate_url($cur_event['url']) : '',
'EVENT_TITLE' => $cur_event['title'],
'START_TIME' => $user->format_date($cur_event['start_time'], 'j. M Y, H:i'),
'END_TIME' => $user->format_date($cur_event['end_time'], 'j. M Y, H:i'),
@@ -497,7 +497,8 @@ class portal_calendar_module
'EVENT_DESC' => ($action != 'add') ? $events[$i]['desc'] : '',
'EVENT_START' => ($action != 'add') ? $user->format_date($events[$i]['start_time'], $start_time_format) : '',
'EVENT_END' => ($action != 'add' && !$event_all_day) ? $user->format_date($events[$i]['end_time'], $end_time_format) : '',
'EVENT_URL' => ($action != 'add' && isset($events[$i]['url']) && !empty($events[$i]['url'])) ? str_replace('&', '&amp;', $events[$i]['url']) : '',
'EVENT_URL' => ($action != 'add' && isset($events[$i]['url']) && !empty($events[$i]['url'])) ? $this->validate_url($events[$i]['url']) : '',
'EVENT_URL_RAW' => ($action != 'add' && isset($events[$i]['url']) && !empty($events[$i]['url'])) ? $events[$i]['url'] : '',
'U_EDIT' => $u_action . '&amp;action=edit&amp;id=' . $i,
'U_DELETE' => $u_action . '&amp;action=delete&amp;id=' . $i,
'EVENT_ALL_DAY' => $event_all_day,
@@ -576,8 +577,8 @@ class portal_calendar_module
$url = 'http://' . $url;
}
// Is this a link to somewhere inside this board? If so then remove the session id from the url
if (strpos($url, generate_board_url()) !== false && strpos($url, 'sid=') !== false)
// Is this a link to somewhere inside this board? If so then run reapply_sid()
if (strpos($url, generate_board_url()) !== false)
{
$url = reapply_sid($url);
}