Fix link generation.
authorJan Schneider <jan@horde.org>
Mon, 3 Aug 2009 17:18:51 +0000 (19:18 +0200)
committerJan Schneider <jan@horde.org>
Mon, 3 Aug 2009 17:18:51 +0000 (19:18 +0200)
kronolith/templates/calendar_list.php

index 539a86e..3fe6ec8 100644 (file)
 <?php $calendar = $calendars[$calendar_id]; if (is_array($calendar)): ?>
    <td><?php echo htmlspecialchars($calendar['name']) ?></td>
    <td><?php echo _("Remote") ?></td>
-   <td><?php $url = Horde_Util::addParameter($display_url_base, 'display_cal', 'remote_' . $calendar['url'], false) ?><a href="<?php echo htmlspecialchars($url) ?>" title="<?php echo _("Click or copy this URL to display this calendar") ?>" target="_blank"><?php echo htmlspecialchars(shorten_url($url)) ?></a></td>
-   <td><a href="<?php echo htmlspecialchars($calendar['url']) ?>" title="<?php echo _("Click or copy this URL to display this calendar") ?>" target="_blank"><?php echo htmlspecialchars(shorten_url($calendar['url'])) ?></a></td>
-   <td><a href="<?php echo Horde_Util::addParameter($remote_edit_url_base, 'url', $calendar['url']) ?>" title="<?php echo _("Edit") ?>"><?php echo $edit_img ?></a></td>
+   <td><?php $url = Horde_Util::addParameter($display_url_base, 'display_cal', 'remote_' . $calendar['url'], false); echo Horde::link($url, _("Click or copy this URL to display this calendar"), '', '_blank') . htmlspecialchars(shorten_url($url)) . '</a>' ?></td>
+   <td><?php echo Horde::link($calendar['url'], _("Click or copy this URL to display this calendar"), '', '_blank') . htmlspecialchars(shorten_url($calendar['url'])) . '</a>' ?></td>
+   <td><?php echo Horde::link(Horde_Util::addParameter($remote_edit_url_base, 'url', $calendar['url']), _("Edit")) . $edit_img . '</a>' ?></td>
 <?php if (empty($conf['share']['no_sharing'])): ?>
    <td>&nbsp;</td>
 <?php endif; ?>
-   <td><a href="<?php echo Horde_Util::addParameter($remote_unsubscribe_url_base, 'url', $calendar['url']) ?>" title="<?php echo _("Unsubscribe") ?>"><?php echo $delete_img ?></a></td>
+   <td><?php echo Horde::link(Horde_Util::addParameter($remote_unsubscribe_url_base, 'url', $calendar['url']), _("Unsubscribe")) . $delete_img . '</a>' ?></td>
 <?php else: ?>
    <td><?php echo htmlspecialchars($calendar->get('name')) ?></td>
    <td><?php echo _("Local") ?></td>
-   <td><?php $url = Horde_Util::addParameter($display_url_base, 'display_cal', $calendar->getName(), false) ?><a href="<?php echo htmlspecialchars($url) ?>" title="<?php echo _("Click or copy this URL to display this calendar") ?>" target="_blank"><?php echo htmlspecialchars(shorten_url($url)) ?></a></td>
-   <td><?php $url = $webdav ? $subscribe_url_base . $calendar->get('owner') . '/' . $calendar->getName() . '.ics' : Horde_Util::addParameter($subscribe_url_base, 'c', $calendar->getName(), false) ?><a href="<?php echo htmlspecialchars($url) ?>" title="<?php echo _("Click or copy this URL to display this calendar") ?>" target="_blank"><?php echo htmlspecialchars(shorten_url($url)) ?></a></td>
-   <td><a href="<?php echo Horde_Util::addParameter($edit_url_base, 'c', $calendar->getName()) ?>" title="<?php echo _("Edit") ?>"><?php echo $edit_img ?></a></td>
+   <td><?php $url = Horde_Util::addParameter($display_url_base, 'display_cal', $calendar->getName(), false); echo Horde::link($url, _("Click or copy this URL to display this calendar"), '', '_blank') . htmlspecialchars(shorten_url($url)) . '</a>' ?></td>
+   <td><?php $url = $subscribe_url_base . $calendar->get('owner') . '/' . $calendar->getName() . '.ics'; echo Horde::link($url, _("Click or copy this URL to display this calendar"), '', '_blank') . htmlspecialchars(shorten_url($url)) . '</a>' ?></td>
+   <td><?php echo Horde::link(Horde_Util::addParameter($edit_url_base, 'c', $calendar->getName()), _("Edit")) . $edit_img . '</a>' ?></td>
 <?php if (empty($conf['share']['no_sharing'])): ?>
-   <td><a onclick="<?php echo Horde::popupJs($perms_url_base, array('params' => array('share' => $calendar->getName()), 'urlencode' => true)) ?>return false" href="<?php echo Horde_Util::addParameter($perms_url_base, 'share', $calendar->getName()) ?>" target="_blank" title="<?php echo _("Change Permissions") ?>"><?php echo $perms_img ?></a></td>
+   <td><?php echo Horde::link(Horde_Util::addParameter($perms_url_base, 'share', $calendar->getName()), _("Change Permissions"), '', '_blank', Horde::popupJs($perms_url_base, array('params' => array('share' => $calendar->getName()), 'urlencode' => true)) . 'return false;') . $perms_img . '</a>' ?></td>
 <?php endif; ?>
-   <td><a href="<?php echo Horde_Util::addParameter($delete_url_base, 'c', $calendar->getName()) ?>" title="<?php echo _("Delete") ?>"><?php echo $delete_img ?></a></td>
+   <td><?php echo Horde::link(Horde_Util::addParameter($delete_url_base, 'c', $calendar->getName()), _("Delete")) . $delete_img . '</a>' ?></td>
 <?php endif; ?>
   </tr>
 <?php endforeach; ?>