} else {
$own_icon = '';
$own_link = '<span class="smallheader rightFloat">'
- . Horde::link(Horde_Util::addParameter($url, array('action' => 'mark_own')))
+ . $url->copy()->add('action', 'mark_own')->link()
. _("Mark this as your own contact") . '</a></span>';
}
false,
array('icon' => 'new.png',
'icondir' => $icondir,
- 'url' => Horde_Util::addParameter($add, array('source' => $addressbook))));
+ 'url' => $add->copy()->add('source', $addressbook)));
}
}
false,
array('icon' => 'browse.png',
'icondir' => $icondir,
- 'url' => Horde_Util::addParameter($browse, array('source' => $addressbook))));
+ 'url' => $browse->copy()->add('source', $addressbook)));
}
}
'recurrence' => array('type' => Horde_Date_Recurrence::RECUR_YEARLY_DATE,
'interval' => 1),
'params' => array('source' => $this->name, 'key' => $key),
- 'link' => Horde_Util::addParameter(Horde::applicationUrl('contact.php', true), array('source' => $this->name, 'key' => $key), null, false));
+ 'link' => Horde::applicationUrl('contact.php', true)->add(array('source' => $this->name, 'key' => $key))->setRaw(true));
}
return $t_objects;
$this->getInfo($this->_vars, $info);
- $next_page = Horde::applicationUrl('edit.php', true);
- $next_page = Horde_Util::addParameter($next_page,
- array('source' => $info['source'],
- 'original_source' => $info['original_source'],
- 'objectkeys' => $info['objectkeys'],
- 'url' => $info['url'],
- 'actionID' => 'groupedit'),
- null, false);
+ $next_page = Horde::applicationUrl('edit.php', true)->add(array(
+ 'source' => $info['source'],
+ 'original_source' => $info['original_source'],
+ 'objectkeys' => $info['objectkeys'],
+ 'url' => $info['url'],
+ 'actionID' => 'groupedit'
+ );
+
$objectkey = array_search($info['source'] . ':' . $info['key'], $info['objectkeys']);
$submitbutton = $this->_vars->get('submitbutton');
if ($submitbutton == _("Finish")) {
$next_page = Horde::url('browse.php', true);
if ($info['original_source'] == '**search') {
- $next_page = Horde_Util::addParameter($next_page, 'key', $info['original_source'], false);
+ $next_page->add('key', $info['original_source']);
} else {
- $next_page = Horde_Util::addParameter($next_page, 'source', $info['original_source'], false);
+ $next_page->add('source', $info['original_source']);
}
} elseif ($submitbutton == _("Previous") && $info['source'] . ':' . $info['key'] != $info['objectkeys'][0]) {
/* Previous contact */
list(, $previous_key) = explode(':', $info['objectkeys'][$objectkey - 1]);
- $next_page = Horde_Util::addParameter($next_page, 'key', $previous_key, false);
+ $next_page->add('key', $previous_key);
if ($this->getOpenSection()) {
- $next_page = Horde_Util::addParameter($next_page, '__formOpenSection', $this->getOpenSection(), false);
+ $next_page->add('__formOpenSection', $this->getOpenSection());
}
} elseif ($submitbutton == _("Next") &&
$info['source'] . ':' . $info['key'] != $info['objectkeys'][count($info['objectkeys']) - 1]) {
/* Next contact */
list(, $next_key) = explode(':', $info['objectkeys'][$objectkey + 1]);
- $next_page = Horde_Util::addParameter($next_page, 'key', $next_key, false);
+ $next_page->add('key', $next_key);
if ($this->getOpenSection()) {
- $next_page = Horde_Util::addParameter($next_page, '__formOpenSection', $this->getOpenSection(), false);
+ $next_page->add('__formOpenSection', $this->getOpenSection());
}
}
- header('Location: ' . $next_page);
+ header('Location: ' . $next_page->setRaw(true));
exit;
}
*/
function url($view = null, $full = false)
{
- $url = Horde_Util::addParameter('contact.php',
- array('source' => $this->driver->name,
- 'key' => $this->getValue('__key')));
+ $url = Horde::applicationUrl('contact.php', $full)->add(array(
+ 'source' => $this->driver->name,
+ 'key' => $this->getValue('__key')
+ ));
+
if (!is_null($view)) {
- $url = Horde_Util::addParameter($url, 'view', $view);
+ $url->add('view', $view);
}
- return Horde::applicationUrl($url, $full);
+ return $url;
}
/**
// Let's see if we can view this one, too.
if ($viewer && !is_a($viewer, 'Horde_Mime_Viewer_default')) {
- $url = Horde::applicationUrl('view.php');
- $url_params['actionID'] = 'view_file';
- $url = Horde_Util::addParameter($url, $url_params);
+ $url = Horde::applicationUrl('view.php')->add('actionID', 'view_file');
$link = Horde::link($url, $file['name'], null, '_blank') . $file['name'] . '</a>';
} else {
$link = $file['name'];
*/
function url($view = null, $full = false)
{
- $url = Horde_Util::addParameter('browse.php',
- array('source' => $this->getSource(),
- 'key' => $this->getValue('__key')));
- return Horde::applicationUrl($url, $full);
+ return Horde::applicationUrl('browse.php', $full)->add(array(
+ 'source' => $this->getSource(),
+ 'key' => $this->getValue('__key')
+ ));
}
/**
}
list($addToList, $addToListSources) = $this->getAddSources();
- $viewurl = urldecode(Horde_Util::addParameter(
- 'browse.php',
- array('key' => Horde_Util::getFormData('key'),
- 'url' => Horde::selfUrl(true, false, true))));
+ $viewurl = Horde::applicationUrl('browse.php')->add(array(
+ 'key' => Horde_Util::getFormData('key'),
+ 'url' => Horde::selfUrl(true, false, true)
+ ));
if ($this->type == 'search') {
$page = Horde_Util::getFormData('page', 0);
'val' => Horde_Util::getFormData('val'),
'source' => Horde_Util::getFormData('source', $default_source)
));
- $viewurl = urldecode(Horde_Util::addParameter('search.php', $params));
+ $viewurl = Horde::applicationUrl('search.php')-add($params);
$vars = Horde_Variables::getDefaultVariables();
$pager = new Horde_Core_Ui_Pager('page', $vars,
}
$notification->push(sprintf(_("Successfully created virtual address book \"%s\""), $vname), 'horde.success');
- $url = Horde::applicationURL('browse.php', true);
- $url = Horde_Util::addParameter($url, array('source' => $vid, null, false));
- header('Location: ' . $url);
+ $url = Horde::applicationURL('browse.php', true)->add('source', $vid);;
+ header('Location: ' . $url->setRaw(true));
exit;
}
<?php foreach (array_keys($sorted_addressbooks) as $addressbook_id): ?>
<?php $addressbook = $addressbooks[$addressbook_id] ?>
<tr>
- <td><a href="<?php echo Horde_Util::addParameter($browse_url_base, 'source', $addressbook->getName()) ?>" title="<?php echo _("Browse") ?>"><?php echo $browse_img ?></a></td>
+ <td><a href="<?php echo $browse_url_base->copy()->add('source', $addressbook->getName()) ?>" title="<?php echo _("Browse") ?>"><?php echo $browse_img ?></a></td>
<td><?php echo htmlspecialchars($addressbook->get('name')) ?></td>
- <td><a href="<?php echo Horde_Util::addParameter($edit_url_base, 'a', $addressbook->getName()) ?>" title="<?php echo _("Edit") ?>"><?php echo $edit_img ?></a></td>
+ <td><a href="<?php echo $edit_url_base->copy()->add('a', $addressbook->getName()) ?>" title="<?php echo _("Edit") ?>"><?php echo $edit_img ?></a></td>
<?php if (empty($conf['share']['no_sharing'])): ?>
<td><?php echo $perms_url_base->add('share', $addressbook->getName())->link(array('title' => _("Change Permissions"), 'target' => '_blank', 'onclick' => Horde::popupJs($perms_url_base, array('params' => array('share' => $addressbook->getName()), 'urlencode' => true)) . 'return false;')) . $perms_img . '</a>';?>
<?php endif; ?>
- <td><a href="<?php echo Horde_Util::addParameter($delete_url_base, 'a', $addressbook->getName()) ?>" title="<?php echo _("Delete") ?>"><?php echo $delete_img ?></a></td>
+ <td><a href="<?php echo $delete_url_base->copy()->add('a', $addressbook->getName()) ?>" title="<?php echo _("Delete") ?>"><?php echo $delete_img ?></a></td>
</tr>
<?php endforeach; ?>
</tbody>
$browse_link = Horde::applicationUrl('browse.php');
if ($this->getType() == 'directory' &&
!empty($cfgSources[$default_source]['map']['__type'])) {
- printf(_("Show %s"), Horde::widget(Horde_Util::addParameter($browse_link, 'show', 'lists'), _("Show Lists"), 'widget', '', '', _("_Lists")) . ', ' .
- Horde::widget(Horde_Util::addParameter($browse_link, 'show', 'contacts'), _("Show Contacts"), 'widget', '', '', _("_Contacts")) . ', ' .
- Horde::widget(Horde_Util::addParameter($browse_link, 'show', 'all'), _("Show Both"), 'widget', '', '', _("Both")));
+ printf(_("Show %s"), Horde::widget($browse_link->copy()->add('show', 'lists'), _("Show Lists"), 'widget', '', '', _("_Lists")) . ', ' .
+ Horde::widget($browse_link->copy()->add('show', 'contacts'), _("Show Contacts"), 'widget', '', '', _("_Contacts")) . ', ' .
+ Horde::widget($browse_link->copy()->add('show', 'all'), _("Show Both"), 'widget', '', '', _("Both")));
}
?>
</div>
<?php if ($this->isSortColumn($i)): ?>
<?php $sortdir = $this->getColumnSortDirection($i); ?>
<?php $changetitle = sprintf(_("Change %s sort to %s"), $columnlabel, $sortdir == 0 ? _("descending") : _("ascending")) ?>
- <a class="widget" title="<?php echo $changetitle ?>" href="<?php echo Horde_Util::addParameter($s_url, array('sortadd' => 1, 'sortby' => $i, 'sortdir' => abs(1 - $sortdir))) ?>"><?php echo $this->getColumnSortImage($i) ?></a>
+ <a class="widget" title="<?php echo $changetitle ?>" href="<?php echo $s_url->copy()->add(array('sortadd' => 1, 'sortby' => $i, 'sortdir' => abs(1 - $sortdir))) ?>"><?php echo $this->getColumnSortImage($i) ?></a>
<?php $changetitle = sprintf(_("Sort by %s only"), $columnlabel) ?>
- <a class="widget" title="<?php echo $changetitle ?>" href="<?php echo Horde_Util::addParameter($s_url, array('sortby' => $i, 'sortdir' => abs(1 - $sortdir))) ?>">
+ <a class="widget" title="<?php echo $changetitle ?>" href="<?php echo $s_url->copy()->add(array('sortby' => $i, 'sortdir' => abs(1 - $sortdir))) ?>">
<?php else: ?>
<?php $sorttitle = sprintf(_("Sort by %s, then by %s"), $this->getSortOrderDescription(), $columnlabel) ?>
- <a class="widget" title="<?php echo $sorttitle ?>" href="<?php echo Horde_Util::addParameter($s_url, array('sortadd' => 1, 'sortby' => $i, 'sortdir' => 0)) ?>"><?php echo $this->getColumnSortImage($i, $sorttitle) ?></a>
- <a class="widget" title="<?php echo sprintf(_("Sort by %s"), $columnlabel) ?>" href="<?php echo Horde_Util::addParameter($s_url, array('sortby' => $i, 'sortdir' => 0)) ?>">
+ <a class="widget" title="<?php echo $sorttitle ?>" href="<?php echo $s_url->copy()->add(array('sortadd' => 1, 'sortby' => $i, 'sortdir' => 0)) ?>"><?php echo $this->getColumnSortImage($i, $sorttitle) ?></a>
+ <a class="widget" title="<?php echo sprintf(_("Sort by %s"), $columnlabel) ?>" href="<?php echo $s_url->copy()->add(array('sortby' => $i, 'sortdir' => 0)) ?>">
<?php endif; ?>
<?php endif; ?>
<?php echo $columnlabel ?>
$edit_url = $vcard_url = ' ';
if ($ob->hasValue('__key')) {
- $vcard_url = Horde_Util::addParameter('vcard.php',
- array('source' => $ob->getSource(),
- 'key' => $ob->getValue('__key')));
+ $vcard_url = Horde::applicationUrl('vcard.php')->add(array(
+ 'source' => $ob->getSource(),
+ 'key' => $ob->getValue('__key')
+ ));
$vcard_url = Horde::link(Horde::applicationUrl($vcard_url),
_("Download vCard"))
. Horde::img('mime/vcard.png', _("Download vCard"))
$cell = Horde::link($ob->url()) . $link_text . '</a>';
if ($ob->hasPermission(Horde_Perms::EDIT)) {
- $edit_url = Horde_Util::addParameter(
- 'contact.php',
- array('view' => 'EditContact',
- 'source' => $ob->getSource(),
- 'key' => $ob->getValue('__key'),
- 'url' => Horde::selfUrl(true, false, true)));
+ $edit_url = Horde::applicationUrl('contact.php')->add(array(
+ 'view' => 'EditContact',
+ 'source' => $ob->getSource(),
+ 'key' => $ob->getValue('__key'),
+ 'url' => Horde::selfUrl(true, false, true)
+ ));
$edit_url = Horde::link(Horde::applicationUrl($edit_url), _("Edit"))
. Horde::img('edit.png', _("Edit"))
. '</a>';
if ($currentPage == '*') {
echo '<strong>(' . _("All") . ')</strong> ';
} else {
- echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($viewurl, array('page' => '*',
- 'show' => $show)))) . _("All") . '</a> ';
+ Horde::applicationUrl($viewurl)->add(array('page' => '*', 'show' => $show))->link() . _("All") . '</a> ';
}
for ($i = 65; $i < 91; $i++) {
$a = chr($i);
if ($currentPage == $a) {
echo '<strong>(' . $a . ')</strong> ';
} else {
- $link = Horde_Util::addParameter($viewurl, array('page' => $a,
- 'show' => $show));
- echo Horde::link(Horde::applicationUrl($link)) . $a . '</a> ';
+ echo Horde::applicationUrl($viewurl)->add(array('page' => $a, 'show' => $show))->link() . $a . '</a> ';
}
}
?>