Use Horde_Url.
authorJan Schneider <jan@horde.org>
Wed, 9 Dec 2009 14:07:48 +0000 (15:07 +0100)
committerJan Schneider <jan@horde.org>
Wed, 9 Dec 2009 14:08:13 +0000 (15:08 +0100)
15 files changed:
kronolith/lib/Block/monthlist.php
kronolith/lib/FreeBusy/View/Day.php
kronolith/lib/FreeBusy/View/Month.php
kronolith/lib/FreeBusy/View/Week.php
kronolith/lib/View/EditEvent.php
kronolith/templates/attendees/attendees.inc
kronolith/templates/calendar_list.php
kronolith/templates/day/head.inc
kronolith/templates/edit/edit.inc
kronolith/templates/edit/edit_timespan.inc
kronolith/templates/month/head.inc
kronolith/templates/month/head_side_by_side.inc
kronolith/templates/view/view.inc
kronolith/templates/week/head.inc
kronolith/templates/year/head.inc

index 5a1c2ae..14d2134 100644 (file)
@@ -43,13 +43,12 @@ class Horde_Block_Kronolith_monthlist extends Horde_Block {
      */
     function _title()
     {
-        global $registry;
-        if (isset($this->_params['calendar']) && $this->_params['calendar'] != '__all') {
-            $url_params = array('display_cal' => $this->_params['calendar']);
-        } else {
-            $url_params = array();
+        $url = Horde::url($GLOBALS['registry']->getInitialPage(), true);
+        if (isset($this->_params['calendar']) &&
+            $this->_params['calendar'] != '__all') {
+            $url->add('display_cal', $this->_params['calendar']);
         }
-        return Horde::link(Horde::url(Horde_Util::addParameter($registry->getInitialPage(), $url_params), true)) . _("Upcoming Events") . '</a>';
+        return $url->link() . _("Upcoming Events") . '</a>';
     }
 
     /**
index 96dce8a..af46d02 100644 (file)
@@ -22,11 +22,11 @@ class Kronolith_FreeBusy_View_Day extends Kronolith_FreeBusy_View {
         $prev->mday--;
         $next = new Horde_Date($this->_start);
         $next->mday++;
-        return Horde::link('#', _("Previous Day"), '', '', 'return switchDate(' . $prev->dateString() . ');')
+        return Horde::url('#')->link(array('title' => _("Previous Day"), 'onclick' => 'return switchDate(' . $prev->dateString() . ');'))
             . Horde::img('nav/left.png', '<', null, $registry->getImageDir('horde'))
             . '</a>'
             . $this->_start->strftime($prefs->getValue('date_format'))
-            . Horde::link('#', _("Next Day"), '', '', 'return switchDate(' . $next->dateString() . ');')
+            . Horde::url('#')->link(array('title' => _("Next Day"), 'onclick' => 'return switchDate(' . $next->dateString() . ');'))
             . Horde::img('nav/right.png', '>', null, $registry->getImageDir('horde'))
             . '</a>';
     }
index ee9b754..497b13b 100644 (file)
@@ -25,11 +25,11 @@ class Kronolith_FreeBusy_View_Month extends Kronolith_FreeBusy_View {
         $prev->month--;
         $next = new Horde_Date($this->_start);
         $next->month++;
-        return Horde::link('#', _("Previous Month"), '', '', 'return switchDate(' . $prev->dateString() . ');')
+        return Horde::url('#')->link(array('title' => _("Previous Month"), 'onclick' => 'return switchDate(' . $prev->dateString() . ');'))
             . Horde::img('nav/left.png', '<', null, $registry->getImageDir('horde'))
             . '</a>'
             . $this->_start->strftime('%B %Y')
-            . Horde::link('#', _("Next Month"), '', '', 'return switchDate(' . $next->dateString() . ');')
+            . Horde::url('#')->link(array('title' => _("Next Month"), 'onclick' => 'return switchDate(' . $next->dateString() . ');'))
             . Horde::img('nav/right.png', '>', null, $registry->getImageDir('horde'))
             . '</a>';
     }
@@ -48,7 +48,8 @@ class Kronolith_FreeBusy_View_Month extends Kronolith_FreeBusy_View {
         $t = new Horde_Date($this->_start);
         while ($span_left > 0) {
             $span_left -= $span;
-            $week_label = Horde::link('#', '', '', '', 'return switchDateView(\'Week\',' . $t->dateString() . ');') . ("Week") . ' ' . $week . '</a>';
+            $week_label = Horde::url('#')->link(array('onclick' => 'return switchDateView(\'Week\',' . $t->dateString() . ');'))
+                . ("Week") . ' ' . $week . '</a>';
             $hours_html .= sprintf('<th colspan="%d" width="%s%%">%s</th>',
                                    $span, $dayWidth, $week_label);
             $week++;
@@ -61,7 +62,8 @@ class Kronolith_FreeBusy_View_Month extends Kronolith_FreeBusy_View {
             $t = new Horde_Date(array('month' => $this->_start->month,
                                       'mday' => $this->_start->mday + $i,
                                       'year' => $this->_start->year));
-            $day_label = Horde::link('#', '', '', '', 'return switchDateView(\'Day\',' . $t->dateString() . ');') . sprintf("%s.", $i + 1) . '</a>';
+            $day_label = Horde::url('#')->link(array('onclick' => 'return switchDateView(\'Day\',' . $t->dateString() . ');'))
+                . ($i + 1) . '.</a>';
             $hours_html .= sprintf('<th width="%s%%">%s</th>',
                                    $dayWidth, $day_label);
         }
index b0ea0c6..1e9f4dd 100644 (file)
@@ -25,14 +25,14 @@ class Kronolith_FreeBusy_View_Week extends Kronolith_FreeBusy_View {
         $next->mday += 7;
         $end = new Horde_Date($this->_start);
         $end->mday += $this->_days - 1;
-        return Horde::link('#', _("Previous Week"), '', '', 'return switchDate(' . $prev->dateString() . ');')
+        return Horde::url('#')->link(array('title' => _("Previous Week"), 'onclick' => 'return switchDate(' . $prev->dateString() . ');'))
             . Horde::img('nav/left.png', '<', null, $registry->getImageDir('horde'))
             . '</a>'
             . $this->_start->strftime($prefs->getValue('date_format')) . ' - '
             . $end->strftime($prefs->getValue('date_format'))
-            . Horde::link('#', _("Next Week"), '', '', 'return switchDate(' . $next->dateString() . ');') .
-            Horde::img('nav/right.png', '>', null, $registry->getImageDir('horde')) .
-            '</a>';
+            . Horde::url('#')->link(array('title' => _("Next Week"), 'onclick' => 'return switchDate(' . $next->dateString() . ');'))
+            . Horde::img('nav/right.png', '>', null, $registry->getImageDir('horde'))
+            '</a>';
     }
 
     function _hours()
@@ -50,7 +50,8 @@ class Kronolith_FreeBusy_View_Week extends Kronolith_FreeBusy_View {
             $t = new Horde_Date(array('month' => $this->_start->month,
                                       'mday' => $this->_start->mday + $i,
                                       'year' => $this->_start->year));
-            $day_label = Horde::link('#', '', '', '', 'return switchDateView(\'Day\',' . $t->dateString() . ');') . $t->strftime($date_format) . '</a>';
+            $day_label = Horde::url('#')->link(array('onclick' => 'return switchDateView(\'Day\',' . $t->dateString() . ');'))
+                . $t->strftime($date_format) . '</a>';
             $hours_html .= sprintf('<th colspan="%d" width="%s%%">%s</th>',
                                    $span, $dayWidth, $day_label);
         }
index 2e27827..0419ea4 100644 (file)
@@ -88,7 +88,7 @@ class Kronolith_View_EditEvent {
         }
 
         if (isset($url)) {
-            $cancelurl = $url;
+            $cancelurl = new Horde_Url($url);
         } else {
             $cancelurl = Horde::applicationUrl('month.php', true)
                 ->add(array('month' => $month, 'year' => $year));
index 09bd87a..c0874b6 100644 (file)
@@ -55,7 +55,7 @@ function switchDateView(view, date)
  <tr><td colspan="4"><em><?php echo _("No attendees") ?></em></td></tr>
 <?php else: foreach ($attendees as $email => $status): ?>
  <tr>
-  <td class="nowrap"><?php $name = strpos($email, '@') === false ? $status['name'] : $email; echo Horde::link('#', sprintf(_("Remove %s"), $name), '', '', "performAction('remove', decodeURIComponent('" . rawurlencode($email) . "')); return false;") . Horde::img('delete.png', '', null, $registry->getImageDir('horde')) . '</a> ' . Horde::link('#', sprintf(_("Edit %s"), $name), '', '', "performAction('edit', decodeURIComponent('" . rawurlencode($email) . "')); return false;") . Horde::img('edit.png', '', null, $registry->getImageDir('horde')) . '</a>' ?></td>
+  <td class="nowrap"><?php $name = strpos($email, '@') === false ? $status['name'] : $email; echo Horde::url('#')->link(array('title' => sprintf(_("Remove %s"), $name), 'onclick' => "performAction('remove', decodeURIComponent('" . rawurlencode($email) . "')); return false;")) . Horde::img('delete.png', '', null, $registry->getImageDir('horde')) . '</a> ' . Horde::url('#')->link(array('title' => sprintf(_("Edit %s"), $name), 'onclick' => "performAction('edit', decodeURIComponent('" . rawurlencode($email) . "')); return false;")) . Horde::img('edit.png', '', null, $registry->getImageDir('horde')) . '</a>' ?></td>
   <td><?php echo htmlspecialchars(empty($status['name']) ? $email : Horde_Mime_Address::trimAddress($status['name'] . (strpos($email, '@') === false ? '' : ' <' . $email . '>'))) ?></td>
   <td>
 <label for="<?php echo "attendance_$i" ?>" class="hidden"><?php echo _("Attendance") ?></label>
@@ -91,7 +91,7 @@ function switchDateView(view, date)
  <tr><td colspan="4"><em><?php echo _("No attendees") ?></em></td></tr>
 <?php else: foreach ($resources as $id => $resource): ?>
  <tr>
-  <td class="nowrap"><?php echo Horde::link('#', sprintf(_("Remove %s"), $resource['name']), '', '', "performAction('removeResource', " . $id . "); return false;") . Horde::img('delete.png', '', null, $registry->getImageDir('horde')) ?></a></td>
+  <td class="nowrap"><?php echo Horde::url('#')->link(array('title' => sprintf(_("Remove %s"), $resource['name']), 'onclick' => "performAction('removeResource', " . $id . "); return false;")) . Horde::img('delete.png', '', null, $registry->getImageDir('horde')) ?></a></td>
   <td><?php echo htmlspecialchars($resource['name']) ?></td>
   <td>
   <label for="<?php echo "resourceattendance_$i" ?>" class="hidden"><?php echo _("Attendance") ?></label>
@@ -127,7 +127,7 @@ function switchDateView(view, date)
    <span id="newAttendees_loading_img" style="display:none;"><?php echo Horde::img('loading.gif', _("Loading...")) ?></span>
   </td>
 <?php if ($registry->hasMethod('contacts/search')): ?>
-  <td align="center"><?php echo Horde::link('#', '', 'widget', null, 'window.open(\'' . Horde::applicationUrl('contacts.php') . '\', \'contacts\', \'toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=270,left=100,top=100\'); return false;') . Horde::img('addressbook_browse.png') . '<br />' . _("Address Book") . '</a>' ?></td>
+  <td align="center"><?php echo Horde::url('#')->link(array('class' => 'widget', 'onclick' => 'window.open(\'' . Horde::applicationUrl('contacts.php') . '\', \'contacts\', \'toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=270,left=100,top=100\'); return false;')) . Horde::img('addressbook_browse.png') . '<br />' . _("Address Book") . '</a>' ?></td>
 <?php endif; ?>
  </tr>
  <tr>
index 7214571..b653440 100644 (file)
@@ -36,7 +36,7 @@
    <td><?php echo htmlspecialchars($calendar['name']) ?></td>
    <td><?php echo _("Remote") ?></td>
    <td><?php $url = $display_url_base->add('display_cal', 'remote_' . $calendar['url']); echo $url->link(array('title' => _("Click or copy this URL to display this calendar"), 'target' => '_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 $calendar['url']->link(array('title' => _("Click or copy this URL to display this calendar"), 'target' => '_blank')) . htmlspecialchars(shorten_url($calendar['url'])) . '</a>' ?></td>
    <td><?php echo $remote_edit_url_base->add('url', $calendar['url'])->link(array('title' => _("Edit"))) . $edit_img . '</a>' ?></td>
 <?php if (empty($conf['share']['no_sharing'])): ?>
    <td>&nbsp;</td>
@@ -46,7 +46,7 @@
    <td><?php echo htmlspecialchars($calendar->get('name')) ?></td>
    <td><?php echo _("Local") ?></td>
    <td><?php $url = $display_url_base->add('display_cal', $calendar->getName()); echo $url->link(array('title' => _("Click or copy this URL to display this calendar"))) . htmlspecialchars(shorten_url($url)) . '</a>' ?></td>
-   <td><?php $url = $subscribe_url_base . ($calendar->get('owner') ? $calendar->get('owner') : '-system-') . '/' . $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 $url = $subscribe_url_base . ($calendar->get('owner') ? $calendar->get('owner') : '-system-') . '/' . $calendar->getName() . '.ics'; echo $url->link(array('title' => _("Click or copy this URL to display this calendar"), 'target' => '_blank')) . htmlspecialchars(shorten_url($url)) . '</a>' ?></td>
    <td><?php echo $edit_url_base->add('c', $calendar->getName())->link(array('title' => _("Edit"))) . $edit_img . '</a>' ?></td>
 <?php if (empty($conf['share']['no_sharing'])): ?>
    <td><?php echo $perms_url_base->add('share', $calendar->getName())->link(array('title' => _("Change Permissions"), 'target' => '_blank', 'onclick' => Horde::popupJs($perms_url_base, array('params' => array('share' => $calendar->getName()), 'urlencode' => true)) . 'return false;')) . $perms_img . '</a>' ?></td>
index 97ef786..fae90b0 100644 (file)
@@ -2,9 +2,9 @@
 <?php
 $tomorrow = $this->getTomorrow();
 $yesterday = $this->getYesterday();
-echo Horde::link($this->link(-1), _("Previous day"), 'iconNav', '', 'return ShowView(\'Day\', \'' . $yesterday->dateString() . '\');') . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(-1)->link(array('title' => _("Previous day"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Day\', \'' . $yesterday->dateString() . '\');')) . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
 echo '<span id="view_title">' . htmlspecialchars($this->getTime($prefs->getValue('date_format'))) . '</span>';
-echo Horde::link($this->link(1), _("Next day"), 'iconNav', '', 'return ShowView(\'Day\', \'' . $tomorrow->dateString() . '\');') . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(1)->link(array('title' => _("Next day"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Day\', \'' . $tomorrow->dateString() . '\');')) . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
 ?>
 </h1>
 <table cellspacing="0" width="100%" class="striped">
index bfff30f..902f2f7 100644 (file)
@@ -48,7 +48,7 @@
  <td></td>
  <td colspan="4">
   <?php echo implode("\n", $buttons) ?>
-  <?php echo Horde::link(htmlspecialchars($cancelurl), '', 'button') . _("Cancel") . '</a>' ?>
+  <?php echo $cancelurl->link(array('class' => 'button')) . _("Cancel") . '</a>' ?>
   <input type="button" name="resetButton" class="button" value="<?php echo _("Reset to Defaults") ?>" onclick="document.eventform.reset(); KronolithEventForm.updateWday('start_wday'); KronolithEventForm.updateWday('end_wday');" />
  </td>
 </tr>
@@ -244,7 +244,7 @@ if ($event->alarm) {
 <tr>
  <td></td>
  <td colspan="4">
-  <?php echo Horde::link(Horde::applicationUrl('attendees.php'), '', 'button', '_blank', 'var date = (\'000\' + $F(\'start_year\')).slice(-4) + (\'0\' + $F(\'start_month\')).slice(-2) + (\'0\' + $F(\'start_day\')).slice(-2) + (\'0\' + $(\'start_hour\').value).slice(-2) + (\'0\' + $(\'start_min\').value).slice(-2) + \'00\';var enddate = (\'000\' + $F(\'end_year\')).slice(-4) + (\'0\' + $F(\'end_month\')).slice(-2) + (\'0\' + $F(\'end_day\')).slice(-2) + (\'0\' + $(\'end_hour\').value).slice(-2) + (\'0\' + $(\'end_min\').value).slice(-2) + \'00\'; this.href += (this.href.indexOf(\'?\') == -1 ? \'?\' : \'&\') + \'date=\' + date + \'&enddate=\' + enddate;Horde.popup({ url: this.href });return false;') . _("Edit Attendees and Resources") . '</a>' ?>
+  <?php echo Horde::applicationUrl('attendees.php')->link(array('class' => 'button', 'target' => '_blank', 'onclick' => 'var date = (\'000\' + $F(\'start_year\')).slice(-4) + (\'0\' + $F(\'start_month\')).slice(-2) + (\'0\' + $F(\'start_day\')).slice(-2) + (\'0\' + $(\'start_hour\').value).slice(-2) + (\'0\' + $(\'start_min\').value).slice(-2) + \'00\';var enddate = (\'000\' + $F(\'end_year\')).slice(-4) + (\'0\' + $F(\'end_month\')).slice(-2) + (\'0\' + $F(\'end_day\')).slice(-2) + (\'0\' + $(\'end_hour\').value).slice(-2) + (\'0\' + $(\'end_min\').value).slice(-2) + \'00\'; this.href += (this.href.indexOf(\'?\') == -1 ? \'?\' : \'&\') + \'date=\' + date + \'&enddate=\' + enddate;Horde.popup({ url: this.href });return false;')) . _("Edit Attendees and Resources") . '</a>' ?>
  </td>
 </tr>
 </tbody>
@@ -343,8 +343,8 @@ if ($event->alarm) {
  </td>
  <td>
 <?php
-    Horde::addScriptFile('open_calendar.js', 'horde', array('direct' => false));
-    echo Horde::link('#', _("Select a date"), '', '', 'openCalendar(\'recur_endimg\', \'recur_end\', \'' . addslashes($event->js('recur_end')) . '\'); return false;') . Horde::img('calendar.png', _("Set recurrence end date"), 'id="recur_endimg"', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+Horde::addScriptFile('open_calendar.js', 'horde', array('direct' => false));
+echo Horde::url('#')->link(array('title' => _("Select a date"), 'onclick' => 'openCalendar(\'recur_endimg\', \'recur_end\', \'' . addslashes($event->js('recur_end')) . '\'); return false;')) . Horde::img('calendar.png', _("Set recurrence end date"), 'id="recur_endimg"', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
 endif;
 ?>
  </td>
@@ -413,7 +413,7 @@ endif;
  <td></td>
  <td colspan="4">
   <?php echo implode("\n", $buttons) ?>
-  <?php echo Horde::link(htmlspecialchars($cancelurl), '', 'button') . _("Cancel") . '</a>' ?>
+  <?php echo $cancelurl->link(array('class' => 'button')) . _("Cancel") . '</a>' ?>
   <input type="button" name="resetButton" class="button" value="<?php echo _("Reset to Defaults") ?>" onclick="document.eventform.reset(); KronolithEventForm.updateWday('start_wday'); KronolithEventForm.updateWday('end_wday');" />
   </td>
  </tr>
index 5ab501b..3c6d951 100644 (file)
@@ -26,7 +26,7 @@
  <td>
 <?php Horde::addScriptFile('open_calendar.js', 'horde', array('direct' => false)); ?>
   <div id="goto" style="display:none"></div>
-<?php echo Horde::link('#', _("Select a date"), '', '', 'openCalendar(\'startimg\', \'start\', \'' . addslashes($event->js('start')) . '\'); return false;') . Horde::img('calendar.png', _("Set start date"), 'id="startimg"', $GLOBALS['registry']->getImageDir('horde')) . '</a>'; endif; ?>
+  <?php echo Horde::url('#')->link(array('title' => _("Select a date"), 'onclick' => 'openCalendar(\'startimg\', \'start\', \'' . addslashes($event->js('start')) . '\'); return false;')) . Horde::img('calendar.png', _("Set start date"), 'id="startimg"', $GLOBALS['registry']->getImageDir('horde')) . '</a>'; endif; ?>
  </td>
 </tr>
 
@@ -75,8 +75,8 @@
   </td>
   <td rowspan="2" valign="top">
 <?php
-    Horde::addScriptFile('open_calendar.js', 'horde', array('direct' => false));
-    echo Horde::link('#', _("Select a date"), '', '', 'openCalendar(\'endimg\', \'end\', \'' . addslashes($event->js('end')) . '\'); return false;') . Horde::img('calendar.png', _("Set end date"), 'id="endimg"', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+Horde::addScriptFile('open_calendar.js', 'horde', array('direct' => false));
+echo Horde::url('#')->link(array('title' => _("Select a date"), 'onclick' => 'openCalendar(\'endimg\', \'end\', \'' . addslashes($event->js('end')) . '\'); return false;')) . Horde::img('calendar.png', _("Set end date"), 'id="endimg"', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
 endif;
 ?>
  </td>
index 45faabb..6cca9b0 100644 (file)
@@ -2,9 +2,9 @@
 <?php
 $prev = $this->getMonth(-1);
 $next = $this->getMonth(1);
-echo Horde::link($this->link(-1), _("Last Month"), 'iconNav', '', 'return ShowView(\'Month\', \'' . $prev->dateString() . '\');') . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(-1)->link(array('title' => _("Last Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $prev->dateString() . '\');')) . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
 echo '<span id="view_title">' . htmlspecialchars($this->date->strftime('%B %Y')) . '</span>';
-echo Horde::link($this->link(1), _("Next Month"), 'iconNav', '', 'return ShowView(\'Month\', \'' . $next->dateString() . '\');') . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(1)->link(array('title' => _("Next Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $next->dateString() . '\');')) . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
 ?>
 </h1>
 
index 21c0bf4..44e1a6a 100644 (file)
@@ -2,9 +2,9 @@
 <?php
 $prev = $this->getMonth(-1);
 $next = $this->getMonth(1);
-echo Horde::link($this->link(-1), _("Last Month"), 'iconNav', '', 'return ShowView(\'Month\', \'' . $prev->dateString() . '\');') . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(-1)->link(array('title' => _("Last Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $prev->dateString() . '\');')) . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
 echo htmlspecialchars($this->date->strftime('%B %Y'));
-echo Horde::link($this->link(1), _("Next Month"), 'iconNav', '', 'return ShowView(\'Month\', \'' . $next->dateString() . '\');') . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(1)->link(array('title' => _("Next Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $next->dateString() . '\');')) . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
 ?>
 </h1>
 
index 02457a3..7013a00 100644 (file)
@@ -160,7 +160,7 @@ if ($this->event->isInitialized() && $this->event->alarm > 0):
  </tr>
  <?php $link_emails = $GLOBALS['registry']->hasMethod('mail/compose'); foreach ($attendees as $email => $status): $full = empty($status['name']) ? $email : Horde_Mime_Address::trimAddress($status['name'] . (strpos($email, '@') === false ? '' : ' <' . $email . '>')) ?>
  <tr>
-  <td class="nowrap"><?php echo ($link_emails && strpos($email, '@') !== false) ? (Horde::link($GLOBALS['registry']->call('mail/compose', array(array('to' => $full))), sprintf(_("Send an email to %s"), empty($status['name']) ? $email : $status['name'])) . htmlspecialchars($full) . '</a>') : htmlspecialchars($full) ?></td>
+  <td class="nowrap"><?php echo ($link_emails && strpos($email, '@') !== false) ? (Horde::url($GLOBALS['registry']->call('mail/compose', array(array('to' => $full)))->link(array('title' => sprintf(_("Send an email to %s"), empty($status['name']) ? $email : $status['name']))) . htmlspecialchars($full) . '</a>') : htmlspecialchars($full) ?></td>
   <td><?php echo Kronolith::partToString($status['attendance']) ?></td>
   <td><?php echo Kronolith::responseToString($status['response']) ?></td>
  </tr>
index 503c96b..354b2f6 100644 (file)
@@ -3,9 +3,9 @@
 $currentView = is_a($this, 'Kronolith_View_WorkWeek') ? 'WorkWeek' : 'Week';
 $prev = $this->getWeek(-1);
 $next = $this->getWeek(1);
-echo Horde::link($this->link(-1), _("Last week"), 'iconNav', '', 'return ShowView(\'' . $currentView . '\', \'' . $prev->dateString() . '\');') . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(-1)->link(array('title' => _("Last week"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'' . $currentView . '\', \'' . $prev->dateString() . '\');')) . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
 echo '<span id="view_title">' . htmlspecialchars($this->days[$this->startDay]->getTime($prefs->getValue('date_format')) . ' - ' . $this->days[$this->endDay]->getTime($prefs->getValue('date_format'))) . '</span>';
-echo Horde::link($this->link(1), _("Next week"), 'iconNav', '', 'return ShowView(\'' . $currentView . '\', \'' . $next->dateString() . '\');') . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(1)->link(array('title' => _("Next week"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'' . $currentView . '\', \'' . $next->dateString() . '\');')) . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
 ?>
 </h1>
 
@@ -31,7 +31,7 @@ if (Kronolith::getDefaultCalendar(Horde_Perms::EDIT) &&
         . '</a>';
 }
 ?>
-   <strong><?php echo Horde::link($day->link(), '', 'widget') . $day->getTime('%A, %d.') ?></a></strong>
+   <strong><?php echo $day->link()->link(array('class' => 'widget')) . $day->getTime('%A, %d.') ?></a></strong>
   </th>
 <?php endforeach; ?>
  </tr>
index 5ce8453..e3fa8a7 100644 (file)
@@ -1,7 +1,7 @@
 <h1 class="header" style="text-align:center">
 <?php
-echo Horde::link($this->link(-1), _("Last Year"), 'iconNav', '', 'return ShowView(\'Year\', \'' . sprintf('%04d', $this->year - 1) . '0101\');') . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(-1)->link(array('title' => _("Last Year"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Year\', \'' . sprintf('%04d', $this->year - 1) . '0101\');')) . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
 echo '<span id="view_title">' . htmlspecialchars($this->year) . '</span>';
-echo Horde::link($this->link(1), _("Next Year"), 'iconNav', '', 'return ShowView(\'Year\', \'' . sprintf('%04d', $this->year + 1) . '0101\');') . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(1)->link(array('title' => _("Next Year"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Year\', \'' . sprintf('%04d', $this->year + 1) . '0101\');')) . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
 ?>
 </h1>