}
}
-if ($url = Horde_Util::getFormData('url')) {
- header('Location: ' . $url);
+if (!empty($url = Horde_Util::getFormData('url'))) {
+ $url = new Horde_Url($url, true);
} else {
- $url = Horde_Util::addParameter($prefs->getValue('defaultview') . '.php',
- array('month' => Horde_Util::getFormData('month'),
- 'year' => Horde_Util::getFormData('year')));
- header('Location: ' . Horde::applicationUrl($url, true));
+ $url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)
+ ->add(array('month' => Horde_Util::getFormData('month'),
+ 'year' => Horde_Util::getFormData('year')));
}
+
+// Make sure URL is unique.
+header('Location: ' . $url->add('unique', hash('md5', microtime())));
exit;
}
- $url = Horde_Util::getFormData('url');
- if (!empty($url)) {
- $location = Horde::applicationUrl($url, true);
+ if (!empty($url = Horde_Util::getFormData('url'))) {
+ $url = new Horde_Url($url, true);
} else {
$date = new Horde_Date(Horde_Util::getFormData('date'));
- $url = Horde_Util::addParameter($prefs->getValue('defaultview') . '.php', 'date', $date->dateString());
- $location = Horde::applicationUrl($url, true);
+ $url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)
+ ->add('date', $date->dateString());
}
// Make sure URL is unique.
- $location = Horde_Util::addParameter($location, 'unique', hash('md5', microtime()));
- header('Location: ' . $location);
+ header('Location: ' . $url->add('unique', hash('md5', microtime())));
exit;
case 'clear':
}
}
-if ($url = Horde_Util::getFormData('url')) {
- $location = $url;
+if (!empty($url = Horde_Util::getFormData('url'))) {
+ $url = new Horde_Url($url, true);
} else {
- $url = Horde_Util::addParameter($prefs->getValue('defaultview') . '.php',
- 'date', Horde_Util::getFormData('date', date('Ymd')));
- $location = Horde::applicationUrl($url, true);
+ $date = new Horde_Date(Horde_Util::getFormData('date'));
+ $url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)
+ ->add('date', Horde_Util::getFormData('date', date('Ymd')));
}
-header('Location: ' . $location);
+// Make sure URL is unique.
+header('Location: ' . $url->add('unique', hash('md5', microtime())));
require_once dirname(__FILE__) . '/lib/base.php';
-$url = Horde_Util::getFormData('url');
$kronolith_driver = Kronolith::getDriver();
if ($exception = Horde_Util::getFormData('del_exception')) {
}
}
-if (!empty($url)) {
- $location = $url;
+if (!empty($url = Horde_Util::getFormData('url'))) {
+ $url = new Horde_Url($url, true);
} else {
- $url = Horde_Util::addParameter($prefs->getValue('defaultview') . '.php',
- array('month' => Horde_Util::getFormData('month'),
- 'year' => Horde_Util::getFormData('year')));
- $location = Horde::applicationUrl($url, true);
+ $url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)
+ ->add(array('month' => Horde_Util::getFormData('month'),
+ 'year' => Horde_Util::getFormData('year')));
}
// Make sure URL is unique.
-$location = Horde_Util::addParameter($location, 'unique', hash('md5', microtime()), false);
-header('Location: ' . $location);
+header('Location: ' . $url->add('unique', hash('md5', microtime())));
case 'EditEvent':
if ($view->event->isPrivate() &&
$view->event->getCreatorId() != Horde_Auth::getAuth()) {
- $url = Horde_Util::getFormData('url');
- if (empty($url)) {
+ if (!empty($url = Horde_Util::getFormData('url'))) {
+ $url = new Horde_Url($url, true);
+ } else {
$url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true);
}
- header('Location: ' . Horde_Util::addParameter($url, 'unique', hash('md5', microtime()), false));
+ header('Location: ' . $url->add('unique', hash('md5', microtime())));
exit;
}
break;
}
if (isset($conf['urls']['pretty']) && $conf['urls']['pretty'] == 'rewrite') {
- $self_url = 'feed/' . $calendar;
+ $self_url = Horde::applicationUrl('feed/' . $calendar, true, -1);
} else {
- $self_url = Horde_Util::addParameter('feed/index.php', 'c', $calendar);
+ $self_url = Horde::applicationUrl('feed/index.php', true, -1)
+ ->add('c', $calendar);
}
-$self_url = Horde::applicationUrl($self_url, true, -1);
$owner = $share->get('owner');
$identity = Horde_Prefs_Identity::factory('none', $owner);
*/
function _title()
{
- global $registry;
require_once dirname(__FILE__) . '/../base.php';
$title = _("All Calendars");
- $url_params = array();
- if (isset($this->_params['calendar']) && $this->_params['calendar'] != '__all') {
- $this->_share = &$GLOBALS['kronolith_shares']->getShare($this->_params['calendar']);
+ $url = Horde::url($GLOBALS['registry']->getInitialPage(), true);
+ if (isset($this->_params['calendar']) &&
+ $this->_params['calendar'] != '__all') {
+ $this->_share = $GLOBALS['kronolith_shares']->getShare($this->_params['calendar']);
if (!is_a($this->_share, 'PEAR_Error')) {
- $url_params = array('display_cal' => $this->_params['calendar']);
+ $url->add('display_cal', $this->_params['calendar']);
$title = htmlspecialchars($this->_share->get('name'));
}
}
$date = new Horde_Date(time());
- return $title . ', ' . Horde::link(Horde::url(Horde_Util::addParameter($registry->getInitialPage(), $url_params), true)) . $date->strftime('%B, %Y') . '</a>';
+ return $title . ', ' . $url->link() . $date->strftime('%B, %Y') . '</a>';
}
/**
}
$html .= '<td align="center" class="' . $td_class . '">';
- $url_params = array('date' => $date_ob->dateString());
+ /* Set up the link to the day view. */
+ $url = Horde::applicationUrl('day.php', true)
+ ->add('date', $date_ob->dateString());
if (isset($this->_params['calendar']) &&
$this->_params['calendar'] != '__all') {
- $url_params['display_cal'] = $this->_params['calendar'];
+ $url->add('display_cal', $this->_params['calendar']);
}
- /* Set up the link to the day view. */
- $url = Horde_Util::addParameter(Horde::applicationUrl('day.php', true),
- $url_params);
$date_stamp = $date_ob->dateString();
if (empty($all_events[$date_stamp])) {
*/
function _title()
{
- 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($GLOBALS['registry']->getInitialPage(), $url_params), true)) . _("Prior Events") . '</a>';
+ return $url->link() . _("Prior Events") . '</a>';
}
/**
*/
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)) . htmlspecialchars($registry->get('name')) . '</a>';
+ return $url->link() . htmlspecialchars($registry->get('name')) . '</a>';
}
/**
} else {
$dayname = $day->strftime($prefs->getValue('date_format'));
}
- $url_params = array('date' => $day->dateString());
+ $url = Horde::applicationUrl('day.php', true)
+ ->add('date', $day->dateString());
if (isset($this->_params['calendar']) &&
$this->_params['calendar'] != '__all') {
- $url_params['display_cal'] = $this->_params['calendar'];
+ $url->add('display_cal', $this->_params['calendar']);
}
- $daylink = Horde::applicationUrl('day.php', true);
- $daylink = Horde_Util::addParameter($daylink, $url_params);
- $html .= Horde::link($daylink, sprintf(_("Goto %s"),
- $dayname));
- $html .= $dayname . '</a></strong></td></tr>';
+ $html .= $url->link(array('title' => sprintf(_("Goto %s"), $dayname)))
+ . $dayname . '</a></strong></td></tr>';
$firstevent = false;
$firstday = false;
}
'mday' => $match[3]));
$formatted = $horde_date->strftime($GLOBALS['prefs']->getValue('date_format'));
return $formatted
- . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('edit.php'), array('calendar' => $this->getCalendar(), 'eventID' => $this->eventID, 'del_exception' => $date, 'url' => Horde_Util::getFormData('url'))), sprintf(_("Delete exception on %s"), $formatted))
+ . Horde::applicationUrl('edit.php')
+ ->add(array('calendar' => $this->getCalendar(),
+ 'eventID' => $this->eventID,
+ 'del_exception' => $date,
+ 'url' => Horde_Util::getFormData('url')))
+ ->link(array('title' => sprintf(_("Delete exception on %s"), $formatted)))
. Horde::img('delete-small.png', _("Delete"), '', $GLOBALS['registry']->getImageDir('horde'))
. '</a>';
}
$optimal->merge($required, false);
$optimal->merge($optional);
- $base_url = Horde::selfUrl();
- $base_url = Horde_Util::removeParameter($base_url, 'date');
- $base_url = Horde_Util::removeParameter($base_url, 'fbview');
- $base_url = Horde_Util::addParameter($base_url, 'fbview', $this->view);
+ $base_url = Horde::selfUrl()
+ ->remove('date')
+ ->remove('fbview')
+ ->add('fbview', $this->view);
$template = new Horde_Template();
$template->set('title', $this->_title());
{
if (isset($GLOBALS['conf']['urls']['pretty']) &&
$GLOBALS['conf']['urls']['pretty'] == 'rewrite') {
- $feed_url = 'feed/' . $calendar;
- } else {
- $feed_url = Horde_Util::addParameter('feed/index.php', 'c', $calendar);
+ return Horde::applicationUrl('feed/' . $calendar, true, -1);
}
- return Horde::applicationUrl($feed_url, true, -1);
+ return Horde::applicationUrl('feed/index.php', true, -1)
+ ->add('c', $calendar);
}
/**
$myemail = $ident->getValue('from_addr');
if (!$myemail) {
- $notification->push(sprintf(_("You do not have an email address configured in your Personal Information Options. You must set one %shere%s before event notifications can be sent."), Horde::link(Horde_Util::addParameter(Horde::getServiceLink('options', 'kronolith'), array('app' => 'horde', 'group' => 'identities'))), '</a>'), 'horde.error', array('content.raw'));
+ $notification->push(sprintf(_("You do not have an email address configured in your Personal Information Options. You must set one %shere%s before event notifications can be sent."), Horde::getServiceLink('options', 'kronolith')->add(array('app' => 'horde', 'group' => 'identities'))->link(), '</a>'), 'horde.error', array('content.raw'));
return;
}
$message .= _("Attached is an iCalendar file with more information about the event. If your mail client supports iTip requests you can use this file to easily update your local copy of the event.");
if ($action == self::ITIP_REQUEST) {
- $attend_link = Horde_Util::addParameter(Horde::applicationUrl('attend.php', true, -1), array('c' => $event->getCalendar(), 'e' => $event->getId(), 'u' => $email), null, false);
- $message .= "\n\n" . sprintf(_("If your email client doesn't support iTip requests you can use one of the following links to accept or decline the event.\n\nTo accept the event:\n%s\n\nTo accept the event tentatively:\n%s\n\nTo decline the event:\n%s\n"), Horde_Util::addParameter($attend_link, 'a', 'accept', false), Horde_Util::addParameter($attend_link, 'a', 'tentative', false), Horde_Util::addParameter($attend_link, 'a', 'decline', false));
+ $attend_link = Horde::applicationUrl('attend.php', true, -1)
+ ->add(array('c' => $event->getCalendar(),
+ 'e' => $event->getId(),
+ 'u' => $email));
+ $message .= "\n\n" . sprintf(_("If your email client doesn't support iTip requests you can use one of the following links to accept or decline the event.\n\nTo accept the event:\n%s\n\nTo accept the event tentatively:\n%s\n\nTo decline the event:\n%s\n"), $attend_link->add('a', 'accept'), $attend_link->add('a', 'tentative'), $attend_link->add('a', 'decline'));
}
/* Build the iCalendar data */
(!empty($conf['hooks']['permsdenied']) ||
$GLOBALS['perms']->hasAppPermission('max_events') === true ||
$GLOBALS['perms']->hasAppPermission('max_events') > self::countEvents())) {
- $menu->add(Horde_Util::addParameter(Horde::applicationUrl('new.php'), 'url', Horde::selfUrl(true, false, true)), _("_New Event"), 'new.png');
+ $menu->add(Horde::applicationUrl('new.php')->add('url', Horde::selfUrl(true, false, true)), _("_New Event"), 'new.png');
}
if ($browser->hasFeature('dom')) {
Horde::addScriptFile('goto.js', 'kronolith', array('direct' => false));
echo '<tbody>';
if ($addLinks) {
- $newEventUrl = Horde_Util::addParameter(
- 'new.php',
- array('datetime' => sprintf($this->dateString() . '%02d%02d00',
- $this->slots[0]['hour'], $this->slots[0]['min']),
- 'allday' => 1,
- 'url' => $this->link(0, true)));
- $newEventUrl = Horde::link(Horde::applicationUrl($newEventUrl), _("Create a New Event"), 'hour') . _("All day") .
- Horde::img('new_small.png', '+', array('class' => 'iconAdd')) . '</a>';
+ $newEventUrl = Horde::applicationUrl('new.php')
+ ->add(array('datetime' => sprintf($this->dateString() . '%02d%02d00',
+ $this->slots[0]['hour'], $this->slots[0]['min']),
+ 'allday' => 1,
+ 'url' => $this->link(0, true)))
+ ->link(array('title' => _("Create a New Event"), 'class' =>
+ 'hour'))
+ . _("All day")
+ . Horde::img('new_small.png', '+', array('class' =>
+ 'iconAdd'))
+ . '</a>';
} else {
$newEventUrl = '<span class="hour">' . _("All day") . '</span>';
}
}
if ($addLinks) {
- $newEventUrl = Horde_Util::addParameter(
- 'new.php',
- array('datetime' => sprintf($this->dateString() . '%02d%02d00',
- $this->slots[$i]['hour'], $this->slots[$i]['min']),
- 'url' => $this->link(0, true)));
- $newEventUrl = Horde::link(Horde::applicationUrl($newEventUrl), _("Create a New Event"), $hourclass) .
- $time . Horde::img('new_small.png', '+', array('class' => 'iconAdd')) . '</a>';
+ $newEventUrl = Horde::applicationUrl('new.php')
+ ->add(array('datetime' => sprintf($this->dateString() . '%02d%02d00',
+ $this->slots[$i]['hour'], $this->slots[$i]['min']),
+ 'url' => $this->link(0, true)))
+ ->link(array('title' =>_("Create a New Event"), 'class' => $hourclass))
+ . $time
+ . Horde::img('new_small.png', '+', array('class' => 'iconAdd'))
+ . '</a>';
} else {
$newEventUrl = '<span class="' . $hourclass . '">' . $time . '</span>';
}
function link($offset = 0, $full = false)
{
- return Horde::applicationUrl(
- Horde_Util::addParameter('day.php', 'date', $this->getTime('%Y%m%d', $offset)),
- $full);
+ return Horde::applicationUrl('day.php', $full)
+ ->add('date', $this->getTime('%Y%m%d', $offset));
}
function getName()
if (isset($url)) {
$cancelurl = $url;
} else {
- $cancelurl = Horde_Util::addParameter('month.php', array('month' => $month,
- 'year', $year));
- $cancelurl = Horde::applicationUrl($cancelurl, true);
+ $cancelurl = Horde::applicationUrl('month.php', true)
+ ->add(array('month' => $month, 'year' => $year));
}
$event = &$this->event;
$showTime = Kronolith::viewShowTime();
$day_url = Horde::applicationUrl('day.php');
$this_link = $this->link(0, true);
- $new_url = Horde_Util::addParameter(Horde::applicationUrl('new.php'), 'url', $this_link);
+ $new_url = Horde::applicationUrl('new.php')->add('url', $this_link);
$new_img = Horde::img('new_small.png', '+');
foreach ($this->_currentCalendars as $id => $cal) {
$html .= '<td class="' . $style . '" height="70" width="14%" valign="top"><div>';
- $url = Horde_Util::addParameter($day_url, 'date', $date->dateString());
- $html .= '<a class="day" href="' . $url . '">' . $date->mday . '</a>';
+ $html .= $day_url->add('date', $date->dateString())
+ ->link(array('class' => 'day'))
+ . $date->mday . '</a>';
if ($addLinks) {
- $url = Horde_Util::addParameter($new_url, 'date', $date->dateString());
+ $new_url->add('date', $date->dateString());
if ($sidebyside) {
- $url = Horde_Util::addParameter($url, 'calendar', $id);
+ $new_url->add('calendar', $id);
}
- $html .= Horde::link($url, _("Create a New Event"), 'newEvent') .
- $new_img . '</a>';
+ $html .= $new_url->link(array('title' => _("Create a New Event"), 'class' => 'newEvent'))
+ . $new_img . '</a>';
}
if ($date->dayOfWeek() == Horde_Date::DATE_MONDAY) {
- $url = Horde_Util::addParameter('week.php', 'date', $date->dateString());
- $html .= Horde::link(Horde::applicationUrl($url), '', 'week') . sprintf(_("Week %d"), $week) . '</a>';
+ $html .= Horde::applicationUrl('week.php')
+ ->add('date', $date->dateString())
+ ->link(array('class' => 'week'))
+ . sprintf(_("Week %d"), $week) . '</a>';
}
$html .= '</div><div class="clear"> </div>';
function link($offset = 0, $full = false)
{
$month = $this->getMonth($offset);
- return Horde::applicationUrl(Horde_Util::addParameter('month.php', 'date', $month->dateString()), $full);
+ return Horde::applicationUrl('month.php', $full)
+ ->add('date', $month->dateString());
}
function getName()
function link($offset = 0, $full = false)
{
$week = $this->getWeek($offset);
- return Horde::applicationUrl(Horde_Util::addParameter($this->_controller,
- 'date',
- $week->dateString()),
- $full);
+ return Horde::applicationUrl($this->_controller, $full)
+ ->add('date', $week->dateString());
}
function getName()
// Heading for each month.
$date = new Horde_Date(sprintf('%04d%02d01010101', $this->year, $month));
$mtitle = $date->strftime('%B');
- $url = Horde_Util::addParameter(Horde::applicationUrl('month.php'), array('date' => $date->dateString()));
- $html .= '<h2 class="smallheader"><a class="smallheader" href="' . $url . '">' . $mtitle . '</a></h2>' .
- '<table class="nopadding monthgrid" cellspacing="0" width="100%"><thead><tr class="item">';
+ $html .= '<h2 class="smallheader"><a class="smallheader" href="'
+ . Horde::applicationUrl('month.php')
+ ->add('date', $date->dateString())
+ . '">' . $mtitle . '</a></h2>'
+ . '<table class="nopadding monthgrid" cellspacing="0" width="100%"><thead><tr class="item">';
if (!$prefs->getValue('week_start_monday')) {
$html .= '<th>' . _("Su"). '</th>';
}
}
/* Set up the link to the day view. */
- $url = Horde::applicationUrl('day.php', true);
- $url = Horde_Util::addParameter($url, 'date', $date->dateString());
+ $url = Horde::applicationUrl('day.php', true)
+ ->add('date', $date->dateString());
if ($date->month != $month) {
$cellday = ' ';
function link($offset = 0, $full = false)
{
- return Horde::applicationUrl(Horde_Util::addParameter('year.php', 'date', $this->year + $offset) . '0101', $full);
+ return Horde::applicationUrl('year.php', $full)
+ ->add('date', ($this->year + $offset) . '0101');
}
function getName()
require dirname(__FILE__) . '/lib/base.php';
/* Check permissions. */
+$url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)
+ ->add(array('month' => Horde_Util::getFormData('month'),
+ 'year' => Horde_Util::getFormData('year')));
if ($GLOBALS['perms']->hasAppPermission('max_events') !== true &&
$GLOBALS['perms']->hasAppPermission('max_events') <= Kronolith::countEvents()) {
try {
$message = @htmlspecialchars(sprintf(_("You are not allowed to create more than %d events."), $GLOBALS['perms']->hasAppPermission('max_events')), ENT_COMPAT, Horde_Nls::getCharset());
}
$notification->push($message, 'horde.error', array('content.raw'));
- $url = Horde_Util::addParameter($prefs->getValue('defaultview') . '.php', array('month' => Horde_Util::getFormData('month'),
- 'year' => Horde_Util::getFormData('year')));
- header('Location: ' . Horde::applicationUrl($url, true));
+ header('Location: ' . $url);
exit;
}
$calendar_id = Horde_Util::getFormData('calendar', Kronolith::getDefaultCalendar(Horde_Perms::EDIT));
if (!$calendar_id) {
- $url = Horde_Util::addParameter($prefs->getValue('defaultview') . '.php', array('month' => Horde_Util::getFormData('month'),
- 'year' => Horde_Util::getFormData('year')));
- header('Location: ' . Horde::applicationUrl($url, true));
+ header('Location: ' . $url);
}
$event = Kronolith::getDriver()->getEvent();
if (isset($url)) {
$cancelurl = $url;
} else {
- $cancelurl = Horde_Util::addParameter('month.php', array('month' => $month,
- 'year' => $year));
- $cancelurl = Horde::applicationUrl($cancelurl, true);
+ $cancelurl = Horde::applicationUrl('month.php', true)->add('month', $month);
}
$title = _("Add a new event");
<tr>
<?php if ($isAdmin):?>
<td>
- <?php echo Horde::link(Horde_Util::addParameter($delete_url_base, 'c', $resource->getId()), _("Delete")) . $delete_img . '</a>' ?>
- <?php echo Horde::link(Horde_Util::addParameter($edit_url_base, 'c', $resource->getId()), _("Edit")) . $edit_img . '</a>' ?>
+ <?php echo $delete_url_base->add('c', $resource->getId())->link(array('title' => _("Delete"))) . $delete_img . '</a>' ?>
+ <?php echo $edit_url_base->add('c', $resource->getId())->link(array('title' => _("Edit"))) . $edit_img . '</a>' ?>
<?php else:?>
<td> </td>
<?php endif;?>
<tr>
<?php if ($isAdmin):?>
<td>
- <?php echo Horde::link(Horde_Util::addParameter($delete_url_base, 'c', $resource->getId()), _("Delete")) . $delete_img . '</a>' ?>
- <?php echo Horde::link(Horde_Util::addParameter($edit_url_base, 'c', $resource->getId()), _("Edit")) . $edit_img . '</a>' ?>
+ <?php echo $delete_url_base->add('c', $resource->getId())->link(array('title' => _("Delete"))) . $delete_img . '</a>' ?>
+ <?php echo $edit_url_base->add('c', $resource->getId())->link(array('title' => _("Edit"))) . $edit_img . '</a>' ?>
<?php else:?>
<td> </td>
<?php endif;?>
<td><?php echo htmlspecialchars($resource->get('name')) ?></td>
- <td><?php $url = Horde_Util::addParameter($display_url_base, 'display_cal', $resource->get('calendar'), false); echo Horde::link($url, _("Click or copy this URL to display this calendar")) . htmlspecialchars(shorten_url($url)) . '</a>' ?></td>
+ <td><?php echo $display_url_base->add('display_cal', $resource->get('calendar'), false)->link(array('title' => _("Click or copy this URL to display this calendar"))) . htmlspecialchars(shorten_url($url)) . '</a>' ?></td>
</tr>
<?php endforeach; ?>
</tbody>
<?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); echo Horde::link($url, _("Click or copy this URL to display this calendar"), '', '_blank') . htmlspecialchars(shorten_url($url)) . '</a>' ?></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 Horde::link(Horde_Util::addParameter($remote_edit_url_base, 'url', $calendar['url']), _("Edit")) . $edit_img . '</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> </td>
<?php endif; ?>
- <td><?php echo Horde::link(Horde_Util::addParameter($remote_unsubscribe_url_base, 'url', $calendar['url']), _("Unsubscribe")) . $delete_img . '</a>' ?></td>
+ <td><?php echo $remote_unsubscribe_url_base->add('url', $calendar['url'])->link(array('title' => _("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); echo Horde::link($url, _("Click or copy this URL to display this calendar")) . htmlspecialchars(shorten_url($url)) . '</a>' ?></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 echo Horde::link(Horde_Util::addParameter($edit_url_base, 'c', $calendar->getName()), _("Edit")) . $edit_img . '</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 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>
+ <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>
<?php endif; ?>
- <td><?php echo Horde::link(Horde_Util::addParameter($delete_url_base, 'c', $calendar->getName()), _("Delete")) . $delete_img . '</a>' ?></td>
+ <td><?php echo $delete_url_base->add('c', $calendar->getName())->link(array('title' => _("Delete"))) . $delete_img . '</a>' ?></td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
<?php
if (empty($url)) {
- $url = Horde_Util::addParameter('month.php', array('month' => $month,
- 'year' => $year));
- $url = Horde::applicationUrl($url, true);
+ $url = Horde::applicationUrl('month.php', true)
+ ->add(array('month' => $month, 'year' => $year));
}
?>
<form action="delete.php" method="post" id="deleteform" name="delete">
<?php
if (empty($url)) {
- $url = Horde_Util::addParameter('month.php', array('month' => $month,
- 'year' => $year));
- $url = Horde::applicationUrl($url, true);
+ $url = Horde::applicationUrl('month.php', true)
+ ->add(array('month' => $month, 'year' => $year));
}
?>
<form action="delete.php" method="post" name="delete">
<a id="sbarShow" href="#" onclick="sbarToggle(); return false;"><?php echo _("Calendars") ?></a>
<a id="sbarHide" href="#" onclick="sbarToggle(); return false;"><?php echo _("Calendars") ?></a>
<?php if (!empty($_SESSION['kronolith']['display_cal'])): ?>
- <a id="sbarClose" href="<?php echo Horde_Util::addParameter(Horde::selfUrl(true), 'display_cal', '') ?>"><?php echo Horde_Auth::getAuth() ? _("Return to my calendars") : _("Return to calendars") ?></a>
+ <a id="sbarClose" href="<?php echo Horde::selfUrl(true)->add('display_cal', '') ?>"><?php echo Horde_Auth::getAuth() ? _("Return to my calendars") : _("Return to calendars") ?></a>
<?php endif; ?>
<div id="pageControlsInner">
<?php if (!empty($_SESSION['kronolith']['display_cal'])): ?>
<?php echo _("Copy this URL for use wherever you need your Free/Busy URL:") ?>
</div>
<p class="text">
- <?php echo Horde_Util::addParameter(Horde::applicationUrl('fb.php', true, -1), 'u', Horde_Auth::getAuth()) ?>
+ <?php echo Horde::applicationUrl('fb.php', true, -1)->add('u', Horde_Auth::getAuth()) ?>
</p>
</div>
<br /><br />
<h1 class="header">
<span class="smallheader rightFloat">
- <?php echo Horde::widget(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'search_mode', 'advanced'), _("Advanced Search"), 'smallheader', '', '', _("Ad_vanced Search")) ?>
+ <?php echo Horde::widget(Horde::applicationUrl('search.php')->add('search_mode', 'advanced'), _("Advanced Search"), 'smallheader', '', '', _("Ad_vanced Search")) ?>
</span>
<?php echo _("Basic Search") ?>
</h1>
<br /><br />
<h1 class="header">
<span class="smallheader rightFloat">
- <?php echo Horde::widget(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'search_mode', 'basic'), _("Basic Search"), 'smallheader', '', '', _("_Basic Search")) ?>
+ <?php echo Horde::widget(Horde::applicationUrl('search.php')->add('search_mode', 'basic'), _("Basic Search"), 'smallheader', '', '', _("_Basic Search")) ?>
</span>
<?php echo _("Advanced Search") ?>
</h1>
(!empty($conf['hooks']['permsdenied']) ||
$GLOBALS['perms']->hasAppPermission('max_events') === true ||
$GLOBALS['perms']->hasAppPermission('max_events') > Kronolith::countEvents())) {
- $addurl = Horde_Util::addParameter('new.php',
- array('date' => $day->dateString(),
- 'url' => $this->link(0, true)));
- echo Horde::link(Horde::applicationUrl($addurl), _("Create a New Event"), 'iconAdd')
- . Horde::img('new_small.png', '+')
- . '</a>';
+ echo Horde::applicationUrl('new.php')
+ ->add(array('date' => $day->dateString(),
+ 'url' => $this->link(0, true)))
+ ->link(array('title' => _("Create a New Event"),
+ 'class' => 'iconAdd'))
+ . Horde::img('new_small.png', '+')
+ . '</a>';
}
?>
<strong><?php echo Horde::link($day->link(), '', 'widget') . $day->getTime('%A, %d.') ?></a></strong>