$forums = &Agora_Messages::singleton($scope, $forum_id);
if ($forums instanceof PEAR_Error) {
$notification->push($forums->message, 'horde.error');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Check permissions */
if (!$forums->hasPermission(Horde_Perms::DELETE)) {
$notification->push(sprintf(_("You don't have permissions to ban users from forum %s."), $forum_id), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Ban action */
$notification->push($result->getMessage(), 'horde.error');
}
- $url = Agora::setAgoraId($forum_id, null, Horde::applicationUrl('ban.php'), $scope);
+ $url = Agora::setAgoraId($forum_id, null, Horde::url('ban.php'), $scope);
header('Location: ' . $url);
exit;
}
/* Get the list of banned users. */
-$delete = Horde_Util::addParameter(Horde::applicationUrl('ban.php'),
+$delete = Horde_Util::addParameter(Horde::url('ban.php'),
array('action' => 'delete',
'scope' => $scope,
'forum_id' => $forum_id));
$_prefs['avatar_link'] = array(
'type' => 'rawhtml',
- 'url' => '<p>' . _("Choose from a gallery of avatars:") . ' <input class="button" type="button" value="' . _("Click to Show Gallery") . '" onclick="' . Horde::popupJs(Horde::applicationUrl('avatars/gallery.php'), array('height' => 320, 'width' => 320)) . '" /></p>'
+ 'url' => '<p>' . _("Choose from a gallery of avatars:") . ' <input class="button" type="button" value="' . _("Click to Show Gallery") . '" onclick="' . Horde::popupJs(Horde::url('avatars/gallery.php'), array('height' => 320, 'width' => 320)) . '" /></p>'
);
/* Forums */
/* Check permissions */
if (!$forums->hasPermission(Horde_Perms::DELETE)) {
$notification->push(sprintf(_("You don't have permissions to delete forums in %s"), $registry->get('name', $scope)), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Get forum. */
$forum = $forums->getForum($forum_id);
if ($forum instanceof PEAR_Error) {
$notification->push($forum->message, 'horde.error');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Prepare forum. */
} else {
$notification->push(_("Forum not deleted."), 'horde.message');
}
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Set up template variables. */
/* Check permissions */
if ($forum_id && !$registry->isAdmin(array('permission' => 'agora:admin'))) {
$notification->push(sprintf(_("You don't have permissions to edit forum %s"), $registry->get('name', $scope)), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
if (!$registry->isAdmin(array('permission' => 'agora:admin'))) {
$notification->push(sprintf(_("You don't have permissions to create a new forum in %s"), $registry->get('name', $scope)), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
$form = new ForumForm($vars, $title);
$forum_id = $form->execute($vars);
if ($forum_id instanceof PEAR_Error) {
$notification->push(sprintf(_("Could not create the forum. %s"), $forum_id->message), 'horde.error');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
$notification->push($vars->get('forum_id') ? _("Forum Modified") : _("Forum created."), 'horde.success');
- header('Location: ' . Agora::setAgoraId($forum_id, null, Horde::applicationUrl('threads.php', true)));
+ header('Location: ' . Agora::setAgoraId($forum_id, null, Horde::url('threads.php', true)));
exit;
}
/* Set up actions */
if ($registry->isAdmin()) {
- $url = Horde::applicationUrl('forums.php');
+ $url = Horde::url('forums.php');
foreach ($registry->listApps(array('hidden', 'notoolbar', 'active')) as $app) {
if ($registry->hasMethod('hasComments', $app) &&
$registry->callByPackage($app, 'hasComments') === true) {
$scope = Horde_Util::getGet('scope', 'agora');
/* Agora Home. */
- $url = Horde_Util::addParameter(Horde::applicationUrl('forums.php'), 'scope', $scope);
+ $url = Horde_Util::addParameter(Horde::url('forums.php'), 'scope', $scope);
$menu->add($url, _("_Forums"), 'forums.png', $img_dir, null, null,
dirname($_SERVER['PHP_SELF']) == $GLOBALS['registry']->get('webroot') && basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
/* Thread list, if applicable. */
if (isset($GLOBALS['forum_id'])) {
- $menu->add(Agora::setAgoraId($GLOBALS['forum_id'], null, Horde::applicationUrl('threads.php')), _("_Threads"), 'threads.png', Horde_Themes::img());
+ $menu->add(Agora::setAgoraId($GLOBALS['forum_id'], null, Horde::url('threads.php')), _("_Threads"), 'threads.png', Horde_Themes::img());
if ($scope == 'agora' && $GLOBALS['registry']->getAuth()) {
- $menu->add(Agora::setAgoraId($GLOBALS['forum_id'], null, Horde::applicationUrl('messages/edit.php')), _("New Thread"), 'newmessage.png', Horde_Themes::img());
+ $menu->add(Agora::setAgoraId($GLOBALS['forum_id'], null, Horde::url('messages/edit.php')), _("New Thread"), 'newmessage.png', Horde_Themes::img());
}
}
if ($scope == 'agora' && Agora_Messages::hasPermission(Horde_Perms::DELETE, 0, $scope)) {
- $menu->add(Horde::applicationUrl('editforum.php'), _("_New Forum"), 'newforum.png', $img_dir, null, null, Horde_Util::getFormData('agora') ? '__noselection' : null);
+ $menu->add(Horde::url('editforum.php'), _("_New Forum"), 'newforum.png', $img_dir, null, null, Horde_Util::getFormData('agora') ? '__noselection' : null);
}
if (Agora_Messages::hasPermission(Horde_Perms::DELETE, 0, $scope)) {
- $url = Horde_Util::addParameter(Horde::applicationUrl('moderate.php'), 'scope', $scope);
+ $url = Horde_Util::addParameter(Horde::url('moderate.php'), 'scope', $scope);
$menu->add($url, _("_Moderate"), 'moderate.png', $img_dir);
}
if ($GLOBALS['registry']->isAdmin()) {
- $menu->add(Horde::applicationUrl('moderators.php'), _("_Moderators"), 'hot.png', $img_dir);
+ $menu->add(Horde::url('moderators.php'), _("_Moderators"), 'hot.png', $img_dir);
}
- $url = Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'scope', $scope);
+ $url = Horde_Util::addParameter(Horde::url('search.php'), 'scope', $scope);
$menu->add($url, _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'));
if ($returnType == 'object') {
return PEAR::raiseError(_("Malformed database entry."));
}
- $avatar_path = Horde::applicationUrl('avatars/?id=' . urlencode($matches[4]) . ':' . $avatar_collection_id, true, $scopeend_sid);
+ $avatar_path = Horde::url('avatars/?id=' . urlencode($matches[4]) . ':' . $avatar_collection_id, true, $scopeend_sid);
break;
}
protected function _title()
{
- return Horde::applicationUrl('forums.php', true)->link() . _("Forums") . '</a>';
+ return Horde::url('forums.php', true)->link() . _("Forums") . '</a>';
}
/**
}
$title = sprintf(_("Threads in \"%s\""), $this->_threads->_forum['forum_name']);
- $url = Horde::applicationUrl('threads.php', true);
+ $url = Horde::url('threads.php', true);
if (!empty($scope)) {
$url = Horde_Util::addParameter($url, 'scope', $scope);
}
$sort_dir = Agora::getSortDir('comments');
$html = '<div class="header">' . _("Comments") . ' (' . $messages->_forum['message_count'] . ')' . ' ';
if (!$GLOBALS['prefs']->isLocked('comments_view_bodies')) {
- $rss = Horde_Util::addParameter(Horde::applicationUrl('rss/threads.php', true, -1), array('scope' => $scope, 'forum_id' => $forum_id));
+ $rss = Horde_Util::addParameter(Horde::url('rss/threads.php', true, -1), array('scope' => $scope, 'forum_id' => $forum_id));
$html .= '<span style="font-size: 0.8em;">';
$html .= '<form action=' . urldecode($base_url) . ' method="post" name="sorter" style="display: inline;">';
$html .= _("View") . ' <select name="bodies" onchange="document.sorter.submit()" >';
}
/* Set up the base urls for actions. */
- $view_url = Horde::applicationUrl('messages/index.php');
+ $view_url = Horde::url('messages/index.php');
if ($base_url) {
$edit_url = $base_url;
$del_url = Horde_Util::addParameter($base_url, 'delete', 'true');
} else {
- $edit_url = Horde::applicationUrl('messages/edit.php');
- $del_url = Horde::applicationUrl('messages/delete.php');
+ $edit_url = Horde::url('messages/edit.php');
+ $del_url = Horde::url('messages/delete.php');
}
// Get needed prefs
$per_page = $GLOBALS['prefs']->getValue('thread_per_page');
$view_bodies = $GLOBALS['prefs']->getValue('thread_view_bodies');
- $abuse_url = Horde::applicationUrl('messages/abuse.php');
+ $abuse_url = Horde::url('messages/abuse.php');
$hot_img = Horde::img('hot.png', _("Hot thread"), array('title' => _("Hot thread")));
$new_img = Horde::img('required.png', _("New posts"), array('title' => _("New posts")));
$is_moderator = $this->hasPermission(Horde_Perms::DELETE);
$message['actions'][] = Horde::link($url, _("Delete"), '', '', '', _("Delete message")) . _("Delete") . '</a>';
/* Link to lock/unlock the message. */
- $url = Agora::setAgoraId($this->_forum_id, $id, Horde::applicationUrl('messages/lock.php'), $this->_scope);
+ $url = Agora::setAgoraId($this->_forum_id, $id, Horde::url('messages/lock.php'), $this->_scope);
$label = ($message['locked']) ? _("Unlock") : _("Lock");
$message['actions'][] = Horde::link($url, $label, '', '', '', $label) . $label . '</a>';
/* Link to move thread to another forum. */
if ($this->_scope == 'agora') {
if ($message['message_thread'] == $id) {
- $url = Agora::setAgoraId($this->_forum_id, $id, Horde::applicationUrl('messages/move.php'), $this->_scope);
+ $url = Agora::setAgoraId($this->_forum_id, $id, Horde::url('messages/move.php'), $this->_scope);
$message['actions'][] = Horde::link($url, _("Move"), '', '', '', _("Move")) . _("Move") . '</a>';
/* Link to merge a message thred with anoter thread. */
- $url = Agora::setAgoraId($this->_forum_id, $id, Horde::applicationUrl('messages/merge.php'), $this->_scope);
+ $url = Agora::setAgoraId($this->_forum_id, $id, Horde::url('messages/merge.php'), $this->_scope);
$message['actions'][] = Horde::link($url, _("Merge"), '', '', '', _("Merge")) . _("Merge") . '</a>';
} elseif ($message['message_thread'] != 0) {
/* Link to split thread to two threads, from this message after. */
- $url = Agora::setAgoraId($this->_forum_id, $id, Horde::applicationUrl('messages/split.php'), $this->_scope);
+ $url = Agora::setAgoraId($this->_forum_id, $id, Horde::url('messages/split.php'), $this->_scope);
$message['actions'][] = Horde::link($url, _("Split"), '', '', '', _("Split")) . _("Split") . '</a>';
}
}
}
/* Loop through the messages and set up the array. */
- $approve_url = Horde_Util::addParameter(Horde::applicationUrl('moderate.php'), 'approve', true);
- $del_url = Horde::applicationUrl('messages/delete.php');
+ $approve_url = Horde_Util::addParameter(Horde::url('moderate.php'), 'approve', true);
+ $del_url = Horde::url('messages/delete.php');
foreach ($messages as $id => &$message) {
$message['forum_name'] = $this->convertFromDriver($forums_list[$message['forum_id']]);
$message['message_id'] = $id;
/* Actions. */
$actions = array();
- $url = Agora::setAgoraId($this->_forum_id, null, Horde::applicationUrl('messages/edit.php'));
+ $url = Agora::setAgoraId($this->_forum_id, null, Horde::url('messages/edit.php'));
if ($this->hasPermission(Horde_Perms::EDIT)) {
$actions[] = array('url' => $url, 'label' => _("Post message"));
}
if ($this->hasPermission(Horde_Perms::DELETE)) {
if ($this->_scope == 'agora') {
- $url = Agora::setAgoraId($this->_forum_id, null, Horde::applicationUrl('editforum.php'));
+ $url = Agora::setAgoraId($this->_forum_id, null, Horde::url('editforum.php'));
$actions[] = array('url' => $url, 'label' => _("Edit Forum"));
}
- $url = Agora::setAgoraId($this->_forum_id, null, Horde::applicationUrl('deleteforum.php'), $this->_scope);
+ $url = Agora::setAgoraId($this->_forum_id, null, Horde::url('deleteforum.php'), $this->_scope);
$actions[] = array('url' => $url, 'label' => _("Delete Forum"));
- $url = Agora::setAgoraId($this->_forum_id, null, Horde::applicationUrl('ban.php'), $this->_scope);
+ $url = Agora::setAgoraId($this->_forum_id, null, Horde::url('ban.php'), $this->_scope);
$actions[] = array('url' => $url, 'label' => _("Ban"));
}
/* Constuct the link with a tooltip for further info on the download. */
$html = '<br />';
- $view_url = Horde::applicationUrl('view.php');
+ $view_url = Horde::url('view.php');
foreach ($files as $file_id => $file) {
$mime_icon = $GLOBALS['injector']->getInstance('Horde_Mime_Viewer')->getIcon($file['file_type']);
$title = _("download") . ': ' . $file['file_name'];
$moderate = array();
$user = $GLOBALS['registry']->getAuth();
- $edit_url = Horde::applicationUrl('messages/edit.php');
- $editforum_url = Horde::applicationUrl('editforum.php');
- $delete_url = Horde::applicationUrl('deleteforum.php');
+ $edit_url = Horde::url('messages/edit.php');
+ $editforum_url = Horde::url('editforum.php');
+ $delete_url = Horde::url('deleteforum.php');
foreach ($forums as $forum_id => &$forum) {
if (!$this->hasPermission(Horde_Perms::SHOW, $forum_id, $forum['scope'])) {
continue;
}
- $forum['url'] = Agora::setAgoraId($forum_id, null, Horde::applicationUrl('threads.php'), $forum['scope'], true);
+ $forum['url'] = Agora::setAgoraId($forum_id, null, Horde::url('threads.php'), $forum['scope'], true);
$forum['message_count'] = number_format($forum['message_count']);
$forum['thread_count'] = number_format($forum['thread_count']);
if ($forum['last_message_id']) {
$forum['last_message_date'] = $this->dateFormat($forum['last_message_timestamp']);
- $forum['last_message_url'] = Agora::setAgoraId($forum_id, $forum['last_message_id'], Horde::applicationUrl('messages/index.php'), $forum['scope'], true);
+ $forum['last_message_url'] = Agora::setAgoraId($forum_id, $forum['last_message_id'], Horde::url('messages/index.php'), $forum['scope'], true);
}
$forum['actions'] = array();
return $unapproved;
}
- $url = Horde::link(Horde::applicationUrl('moderate.php', true), _("Moderate")) . _("Moderate") . '</a>';
+ $url = Horde::link(Horde::url('moderate.php', true), _("Moderate")) . _("Moderate") . '</a>';
foreach ($unapproved as $forum_id => $count) {
$forum['actions'][] = $url . ' (' . $count . ')' ;
}
}
$results = array();
- $msg_url = Horde::applicationUrl('messages/index.php');
- $forum_url = Horde::applicationUrl('threads.php');
+ $msg_url = Horde::url('messages/index.php');
+ $forum_url = Horde::url('threads.php');
while ($message = $messages->fetchRow()) {
if (!isset($results[$message['forum_id']])) {
$index = array('agora' => $message['forum_id'], 'scope' => $this->_scope);
$messages = &Agora_Messages::singleton($scope, $forum_id);
if ($messages instanceof PEAR_Error) {
$notification->push($messages->getMessage(), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Get requested message, if fail then back to forums list. */
$message = $messages->getMessage($message_id);
if ($message instanceof PEAR_Error) {
$notification->push(sprintf(_("Could not open the message. %s"), $message->getMessage()), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* We have any moderators? */
$forum = $messages->getForum();
if (!isset($forum['moderators'])) {
$notification->push(_("No moderators are associated with this forum."), 'horde.warning');
- $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope);
+ $url = Agora::setAgoraId($forum_id, $message_id, Horde::url('messages/index.php', true), $scope);
header('Location: ' . $url);
exit;
}
if ($form->validate()) {
- $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope);
+ $url = Agora::setAgoraId($forum_id, $message_id, Horde::url('messages/index.php', true), $scope);
if ($vars->get('submitbutton') == _("Cancel")) {
header('Location: ' . $url);
$messages = &Agora_Messages::singleton($scope, $forum_id);
if ($messages instanceof PEAR_Error) {
$notification->push($messages->getMessage(), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Get requested message, if fail then back to forums list. */
$message = $messages->getMessage($message_id);
if ($message instanceof PEAR_Error) {
$notification->push(sprintf(_("Could not open the message. %s"), $message->getMessage()), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Check delete permissions */
if (!$messages->hasPermission(Horde_Perms::DELETE)) {
$notification->push(sprintf(_("You don't have permission to delete messages in forum %s."), $forum_id), 'horde.warning');
- $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope);
+ $url = Agora::setAgoraId($forum_id, $message_id, Horde::url('messages/index.php', true), $scope);
header('Location: ' . $url);
exit;
}
if ($form->validate()) {
if ($vars->get('submitbutton') != _("Delete")) {
$notification->push(_("Message not deleted."), 'horde.message');
- $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope);
+ $url = Agora::setAgoraId($forum_id, $message_id, Horde::url('messages/index.php', true), $scope);
header('Location: ' . $url);
exit;
}
$notification->push(sprintf(_("Could not delete the message. %s"), $thread_id->getMessage()), 'horde.error');
} elseif ($thread_id) {
$notification->push(_("Message deleted."), 'horde.success');
- $url = Agora::setAgoraId($forum_id, $thread_id, Horde::applicationUrl('messages/index.php', true), $scope);
+ $url = Agora::setAgoraId($forum_id, $thread_id, Horde::url('messages/index.php', true), $scope);
header('Location: ' . $url);
exit;
} else {
$notification->push(_("Thread deleted."), 'horde.success');
- $url = Agora::setAgoraId($forum_id, null, Horde::applicationUrl('threads.php', true), $scope);
+ $url = Agora::setAgoraId($forum_id, null, Horde::url('threads.php', true), $scope);
header('Location: ' . $url);
exit;
}
$messages = &Agora_Messages::singleton($scope, $forum_id);
if ($messages instanceof PEAR_Error) {
$notification->push(_("Could not post the message: ") . $messages->getMessage(), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Check edit permissions */
if (!$messages->hasPermission(Horde_Perms::EDIT)) {
$notification->push(sprintf(_("You don't have permission to post messages in forum %s."), $forum_id), 'horde.warning');
- $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope);
+ $url = Agora::setAgoraId($forum_id, $message_id, Horde::url('messages/index.php', true), $scope);
header('Location: ' . $url);
exit;
}
if (!empty($info['url'])) {
$url = Horde::url($info['url'], true);
} else {
- $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope);
+ $url = Agora::setAgoraId($forum_id, $message_id, Horde::url('messages/index.php', true), $scope);
}
header('Location: ' . $url);
exit;
$messages = &Agora_Messages::singleton($scope, $forum_id);
if ($messages instanceof PEAR_Error) {
$notification->push($messages->getMessage(), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Get requested message, if fail then back to forums list. */
$message = $messages->getMessage($message_id);
if ($message instanceof PEAR_Error) {
$notification->push(sprintf(_("Could not open the message. %s"), $message->getMessage()), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Check if we must show bodies */
/* Check if the thread allows replies. */
if (!$message['locked']) {
- $url = Agora::setAgoraId($forum_id, null, Horde::applicationUrl('messages/edit.php'));
+ $url = Agora::setAgoraId($forum_id, null, Horde::url('messages/edit.php'));
$url = Horde_Util::addParameter($url, 'message_parent_id', $message_id);
$actions[] = Horde::link($url, _("Reply")) . _("Reply") . '</a>';
}
/* Add admin permissons */
if ($messages->hasPermission(Horde_Perms::DELETE)) {
- $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/edit.php'));
+ $url = Agora::setAgoraId($forum_id, $message_id, Horde::url('messages/edit.php'));
$actions[] = Horde::link($url, _("Edit")) . _("Edit") . '</a>';
- $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/delete.php'));
+ $url = Agora::setAgoraId($forum_id, $message_id, Horde::url('messages/delete.php'));
$actions[] = Horde::link($url, _("Delete")) . _("Delete") . '</a>';
- $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/lock.php'));
+ $url = Agora::setAgoraId($forum_id, $message_id, Horde::url('messages/lock.php'));
$label = ($message['locked']) ? _("Unlock thread") : _("Lock thread");
$actions[] = Horde::link($url, $label) . $label . '</a>';
}
$threads_list = $messages->getThreads($message['message_thread'], true, $sort_by, $sort_dir, ($view_bodies ? 1 : 0), '', null, $thread_start, $thread_per_page);
if ($threads_list instanceof PEAR_Error) {
$notification->push($threads_list->getMessage(), 'horde.error');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Set up pager. */
$col_headers = Agora::formatColumnHeaders($col_headers, $sort_by, $sort_dir, 'thread');
/* Actions. */
-$url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php'));
+$url = Agora::setAgoraId($forum_id, $message_id, Horde::url('messages/index.php'));
/* Get the thread table. */
switch ($view_bodies) {
$view->actions = $actions;
$view->threads = $threads;
-$view->rss = Horde_Util::addParameter(Horde::applicationUrl('rss/messages.php', true, -1), array('scope' => $scope, 'message_id' => $message_id, 'forum_id' => $forum_id));
+$view->rss = Horde_Util::addParameter(Horde::url('rss/messages.php', true, -1), array('scope' => $scope, 'message_id' => $message_id, 'forum_id' => $forum_id));
/* Display an edit-dialogue if the thread is not locked and we can edit messages in them. */
if (!$messages->hasPermission(Horde_Perms::EDIT)) {
$messages = &Agora_Messages::singleton($scope, $forum_id);
if ($messages instanceof PEAR_Error) {
$notification->push($messages->getMessage(), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Get requested message, if fail then back to forums list. */
$message = $messages->getMessage($message_id);
if ($message instanceof PEAR_Error) {
$notification->push(sprintf(_("Could not open the message. %s"), $message->getMessage()), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Check delete permissions */
if (!$messages->hasPermission(Horde_Perms::DELETE)) {
$notification->push(sprintf(_("You don't have permission to delete messages in forum %s."), $forum_id), 'horde.warning');
- $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope);
+ $url = Agora::setAgoraId($forum_id, $message_id, Horde::url('messages/index.php', true), $scope);
header('Location: ' . $url);
exit;
}
} else {
$notification->push(_("Thread unlocked."), 'horde.success');
}
- $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true));
+ $url = Agora::setAgoraId($forum_id, $message_id, Horde::url('messages/index.php', true));
header('Location: ' . $url);
exit;
}
$messages = &Agora_Messages::singleton($scope, $forum_id);
if ($messages instanceof PEAR_Error) {
$notification->push($messages->getMessage(), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Get requested message, if fail then back to forums list. */
$message = $messages->getMessage($message_id);
if ($message instanceof PEAR_Error) {
$notification->push(sprintf(_("Could not open the message. %s"), $message->getMessage()), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Check delete permissions */
if (!$messages->hasPermission(Horde_Perms::DELETE)) {
$notification->push(sprintf(_("You don't have permission to delete messages in forum %s."), $forum_id), 'horde.warning');
- $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope);
+ $url = Agora::setAgoraId($forum_id, $message_id, Horde::url('messages/index.php', true), $scope);
header('Location: ' . $url);
exit;
}
$notification->push($merge->getMessage(), 'horde.error');
} else {
$notification->push(sprintf(_("Thread %s merged with thread %s after message %s."), $message_id, $info['new_thread_id'], $info['after_message_id']), 'horde.error');
- header('Location: ' . Agora::setAgoraId($forum_id, $info['new_thread_id'], Horde::applicationUrl('messages/index.php', true), $scope));
+ header('Location: ' . Agora::setAgoraId($forum_id, $info['new_thread_id'], Horde::url('messages/index.php', true), $scope));
exit;
}
}
$messages = &Agora_Messages::singleton($scope, $forum_id);
if ($messages instanceof PEAR_Error) {
$notification->push($messages->getMessage(), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Get requested message, if fail then back to forums list. */
$message = $messages->getMessage($message_id);
if ($message instanceof PEAR_Error) {
$notification->push(sprintf(_("Could not open the message. %s"), $message->getMessage()), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Check delete permissions */
if (!$messages->hasPermission(Horde_Perms::DELETE)) {
$notification->push(sprintf(_("You don't have permission to delete messages in forum %s."), $forum_id), 'horde.warning');
- $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope);
+ $url = Agora::setAgoraId($forum_id, $message_id, Horde::url('messages/index.php', true), $scope);
header('Location: ' . $url);
exit;
}
$notification->push($move->getMessage(), 'horde.error');
} else {
$notification->push(sprintf(_("Thread %s moved to from forum %s to %s."), $message_id, $forum_id, $info['new_forum_id']), 'horde.success');
- header('Location: ' . Agora::setAgoraId($info['new_forum_id'], $message_id, Horde::applicationUrl('messages/index.php', true), $scope));
+ header('Location: ' . Agora::setAgoraId($info['new_forum_id'], $message_id, Horde::url('messages/index.php', true), $scope));
exit;
}
}
$messages = &Agora_Messages::singleton($scope, $forum_id);
if ($messages instanceof PEAR_Error) {
$notification->push($messages->getMessage(), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Get requested message, if fail then back to forums list. */
$message = $messages->getMessage($message_id);
if ($message instanceof PEAR_Error) {
$notification->push(sprintf(_("Could not open the message. %s"), $message->getMessage()), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Check delete permissions */
if (!$messages->hasPermission(Horde_Perms::DELETE)) {
$notification->push(sprintf(_("You don't have permission to delete messages in forum %s."), $forum_id), 'horde.warning');
- $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope);
+ $url = Agora::setAgoraId($forum_id, $message_id, Horde::url('messages/index.php', true), $scope);
header('Location: ' . $url);
exit;
}
$notification->push($split->getMessage(), 'horde.error');
} else {
$notification->push(sprintf(_("Thread splitted by message %s."), $message_id), 'horde.error');
- header('Location: ' . Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope));
+ header('Location: ' . Agora::setAgoraId($forum_id, $message_id, Horde::url('messages/index.php', true), $scope));
exit;
}
}
$messages_list = $messages->getModerateList($sort_by, $sort_dir);
if ($messages_list instanceof PEAR_Error) {
$notification->push($messages_list->getMessage(), 'horde.error');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
} elseif (empty($messages_list)) {
$messages_count = 0;
$notification->push(_("No messages are waiting for moderation."), 'horde.message');
Horde_Registry::appInit('agora');
if (!$registry->isAdmin()) {
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Set up the messages object. */
$messages = &Agora_Messages::singleton($scope);
if ($messages instanceof PEAR_Error) {
$notification->push($messages->getMessage(), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Moderator action */
$notification->push($result->getMessage(), 'horde.error');
}
- Horde::applicationUrl('moderators.php', true)->redirect();
+ Horde::url('moderators.php', true)->redirect();
}
/* Get the list of forums. */
$forums_list = $messages->getForums(0, true, 'forum_name');
if ($forums_list instanceof PEAR_Error) {
$notification->push($forums_list->getMessage(), 'horde.error');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Add delete links to moderators */
-$url = Horde_Util::addParameter(Horde::applicationUrl('moderators.php'), 'action', 'delete');
+$url = Horde_Util::addParameter(Horde::url('moderators.php'), 'action', 'delete');
foreach ($forums_list as $forum_id => $forum) {
if (!isset($forum['moderators'])) {
unset($forums_list[$forum_id]);
echo _("No threads");
} else {
$link_back = $registry->hasMethod('show', $scope);
- $url = Horde::applicationUrl('agora/messages/index.php');
+ $url = Horde::url('agora/messages/index.php');
/* link threads if possible */
foreach ($threads as &$thread) {
<language>' . str_replace('_', '-', strtolower($registry->preferredLang())) . '</language>
<lastBuildDate>' . date('r') . '</lastBuildDate>
<description>' . htmlspecialchars($title) . '</description>
- <link>' . Horde::applicationUrl('index.php', true, -1) . '</link>
+ <link>' . Horde::url('index.php', true, -1) . '</link>
<generator>' . htmlspecialchars($registry->get('name')) . '</generator>';
foreach ($forums_list as $forum_id => $forum) {
<item>
<title>' . htmlspecialchars($forum['forum_name']) . ' </title>
<description>' . htmlspecialchars($forum['forum_description']) . ' </description>
- <link>' . Horde_Util::addParameter(Horde::applicationUrl('threads.php', true, -1), array('scope' => $scope, 'forum_id' => $forum_id)) . '</link>
+ <link>' . Horde_Util::addParameter(Horde::url('threads.php', true, -1), array('scope' => $scope, 'forum_id' => $forum_id)) . '</link>
</item>';
}
<language>' . str_replace('_', '-', strtolower($registry->preferredLang())) . '</language>
<lastBuildDate>' . date('r') . '</lastBuildDate>
<description>' . htmlspecialchars($message['message_subject']) . '</description>
- <link>' . Horde::applicationUrl('index.php', true, -1) . '</link>
+ <link>' . Horde::url('index.php', true, -1) . '</link>
<generator>' . htmlspecialchars($registry->get('name')) . '</generator>';
foreach ($threads_list as $thread_id => $thread) {
- $url = Horde::applicationUrl('messages/index.php', true, -1);
+ $url = Horde::url('messages/index.php', true, -1);
$url = Agora::setAgoraId($forum_id, $thread_id, $url, $scope, true);
$rss .= '
<item>
<language>' . str_replace('_', '-', strtolower($registry->preferredLang())) . '</language>
<lastBuildDate>' . date('r') . '</lastBuildDate>
<description>' . htmlspecialchars($title) . '</description>
- <link>' . Horde::applicationUrl('index.php', true, -1) . '</link>
+ <link>' . Horde::url('index.php', true, -1) . '</link>
<generator>' . htmlspecialchars($registry->get('name')) . '</generator>';
// Use commentCallback to get the return link
// show is not enought as we can have many parameters, like turba source etc
- $url = Horde::applicationUrl('messages/index.php', true, -1);
+ $url = Horde::url('messages/index.php', true, -1);
if ($scope != 'agora' && $registry->hasMethod('commentCallback', $scope)) {
$try = $registry->callByPackage($scope, 'commentCallback', array($forum_name, 'link'));
if ($try instanceof PEAR_Error) {
$searchResults = $messages->search($info, $sort_by, $sort_dir, $thread_start, $thread_per_page);
if ($searchResults instanceof PEAR_Error) {
$notification->push($searchResults->getMessage(), 'horde.error');
- Horde::applicationUrl('search.php')->redirect();
+ Horde::url('search.php')->redirect();
}
if ($searchResults['total'] > count($searchResults['results'])) {
<title><?php echo htmlspecialchars($page_title) ?></title>
<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
<?php Horde_Themes::includeStylesheetFiles() ?>
-<link rel="alternate" title="<?php echo _("Forums") ?>" href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('rss/index.php', true, -1), 'scope', $scope) ?>" type="application/rss+xml" />
+<link rel="alternate" title="<?php echo _("Forums") ?>" href="<?php echo Horde_Util::addParameter(Horde::url('rss/index.php', true, -1), 'scope', $scope) ?>" type="application/rss+xml" />
</head>
<body>
/* Make sure we have a forum id. */
list($forum_id, , $scope) = Agora::getAgoraId();
if (empty($forum_id)) {
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Check if this is a valid thread, otherwise show the forum list. */
$threads = &Agora_Messages::singleton($scope, $forum_id);
if ($threads instanceof PEAR_Error) {
$notification->push(sprintf(_("Could not list threads. %s"), $threads->getMessage()), 'horde.warning');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
/* Which thread page are we on? Default to page 0. */
$threads_list = $threads->getThreads(0, false, $sort_by, $sort_dir, false, '', null, $thread_start, $threads_per_page);
if ($threads_list instanceof PEAR_Error) {
$notification->push($threads_list->getMessage(), 'horde.error');
- Horde::applicationUrl('forums.php', true)->redirect();
+ Horde::url('forums.php', true)->redirect();
}
if (empty($threads_list)) {
$threads_count = 0;
$notification->notify(array('listeners' => 'status'));
$view->notify = Horde::endBuffer();
-$view->rss = Horde_Util::addParameter(Horde::applicationUrl('rss/threads.php', true, -1), array('scope' => $scope, 'forum_id' => $forum_id));
+$view->rss = Horde_Util::addParameter(Horde::url('rss/threads.php', true, -1), array('scope' => $scope, 'forum_id' => $forum_id));
/* Set up pager. */
$vars = Horde_Variables::getDefaultVariables();
Horde::addScriptFile('prototype.js', 'horde');
$layout = new Horde_Block_Layout_View(
@unserialize($prefs->getValue('myansel_layout')),
- Horde::applicationUrl('browse_edit.php'),
- Horde::applicationUrl('browse.php', true));
+ Horde::url('browse_edit.php'),
+ Horde::url('browse.php', true));
$layout_html = $layout->toHtml();
$title = _("Photo Galleries");
Ansel_Search_Tag::clearSearch();
require ANSEL_BASE . '/templates/common-header.inc';
require ANSEL_TEMPLATES . '/menu.inc';
-echo '<div id="menuBottom"><a href="' . Horde::applicationUrl('browse_edit.php') . '">' . _("Add Content") . '</a></div><div class="clear"> </div>';
+echo '<div id="menuBottom"><a href="' . Horde::url('browse_edit.php') . '">' . _("Add Content") . '</a></div><div class="clear"> </div>';
echo $layout_html;
require $registry->get('templates', 'horde') . '/common-footer.inc';
$gallery = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getGallery($vars->get('gallery'));
} catch (Ansel_Exception $e) {
$notification->push($gallery->getMessage());
- Horde::applicationUrl('view.php?view=List', true)->redirect();
+ Horde::url('view.php?view=List', true)->redirect();
exit;
}
$url = $vars->get('url');
if ($form->isSubmitted()) {
if (Horde_Util::getFormData('submitbutton') == _("Cancel")) {
$notification->push("You are not authorised to view this photo.", 'horde.warning');
- Horde::applicationUrl('view.php?view=List', true)->redirect();
+ Horde::url('view.php?view=List', true)->redirect();
exit;
} else {
$_SESSION['ansel']['user_age'] = (int)$gallery->get('age');
$face = $faces->getFaceById($face_id);
} catch (Horde_Exception $e) {
$notification->push($e->getMessage());
- Horde::applicationUrl('faces/search/all.php')->redirect();
+ Horde::url('faces/search/all.php')->redirect();
exit;
}
$report = Ansel_Report::factory();
$gallery = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getGallery($face['gallery_id']);
- $face_link = Horde::applicationUrl('faces/custom.php', true)->add(
+ $face_link = Horde::url('faces/custom.php', true)->add(
array('name' => $vars->get('person'),
'face' => $face_id,
'image' => $face['image_id']))->setRaw(true);
if (!empty($url)) {
$urlparams['url'] = $url;
}
-$form_post = Horde::applicationUrl('faces/savecustom.php')->add($urlparams);
+$form_post = Horde::url('faces/savecustom.php')->add($urlparams);
try {
$image = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getImage($image_id);
} catch (Ansel_Exception $e) {
$notification->push($image);
- Horde::applicationUrl('list.php')->redirect();
+ Horde::url('list.php')->redirect();
exit;
}
}
} catch (Horde_Exception $e) {
$notification->push($e->getMessage());
- Horde::applicationUrl('list.php')->redirect();
+ Horde::url('list.php')->redirect();
}
}
$face = $faces->getFaceById($face_id);
} catch (Horde_Exception $e) {
$notification->push($face->getMessage());
- Horde::applicationUrl('faces/index.php')->redirect();
+ Horde::url('faces/index.php')->redirect();
exit;
}
$reloadimage = Horde::img('reload.png');
$customimage = Horde::img('layout.png');
-$customurl = Horde::applicationUrl('faces/custom.php')->add('page', $page);
+$customurl = Horde::url('faces/custom.php')->add('page', $page);
$face = $injector->getInstance('Ansel_Faces');
$autogenerate = $face->canAutogenerate();
if (!empty($result)) {
$imgdir = Horde_Themes::img(null, 'horde');
- $customurl = Horde::applicationUrl('faces/custom.php');
+ $customurl = Horde::url('faces/custom.php');
require_once ANSEL_TEMPLATES . '/faces/image.inc';
} else {
echo _("No faces found");
$face = $faces->getFaceById($face_id);
} catch (Horde_Exception $e) {
$notification->push($e->getMessage());
- Horde::applicationUrl('faces/search/all.php')->redirect();
+ Horde::url('faces/search/all.php')->redirect();
exit;
}
$report = Ansel_Report::factory();
$gallery = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getGallery($face['gallery_id']);
- $face_link = Horde::applicationUrl('faces/face.php', true)->add(
+ $face_link = Horde::url('faces/face.php', true)->add(
array('name' => $vars->get('person'),
'face' => $face_id,
'image' => $face['image_id']))->setRaw(true);
$page = Horde_Util::getFormData('page', 0);
$back_url = empty($url)
- ? Horde::applicationUrl('faces/gallery.php')->add(
+ ? Horde::url('faces/gallery.php')->add(
array('gallery' => $gallery_id,
'page' => $page))->setRaw(true)
: new Horde_Url($url);
$dimensions = $img->getDimensions();
} catch (Horde_Image_Exception $e) {
$notification->push($e->getMessage());
- Horde::applicationUrl('faces/search/image.php')->redirect();
+ Horde::url('faces/search/image.php')->redirect();
exit;
}
if ($dimensions['width'] < 50 || $dimensions['height'] < 50) {
$notification->push(_("Photo is too small. Search photo must be at least 50x50 pixels."));
- Horde::applicationUrl('faces/search/image.php')->redirect();
+ Horde::url('faces/search/image.php')->redirect();
exit;
}
min($conf['screen']['height'], $dimensions['height']));
} catch (Horde_Image_Exception $e) {
$notification->push($e->getMessage());
- Horde::applicationUrl('faces/search/image.php')->redirect();
+ Horde::url('faces/search/image.php')->redirect();
exit;
}
$path = $tmp . '/search_face_' . $registry->getAuth() . Ansel_Faces::getExtension();
if (file_put_contents($path, $img->raw())) {
- Horde::applicationUrl('faces/search/image_define.php')->redirect();
+ Horde::url('faces/search/image_define.php')->redirect();
} else {
$notification->push(_("Cannot store search photo"));
- Horde::applicationUrl('faces/search/image.php')->redirect();
+ Horde::url('faces/search/image.php')->redirect();
}
exit;
if (file_exists($path) !== true) {
$notification->push(_("You must upload the search photo first"));
- Horde::applicationUrl('faces/search/image.php')->redirect();
+ Horde::url('faces/search/image.php')->redirect();
}
$title = _("Create a new face");
if (!file_exists($path)) {
$notification->push(_("You must upload the search photo first"));
- Horde::applicationUrl('faces/search/image.php')->redirect();
+ Horde::url('faces/search/image.php')->redirect();
}
$x1 = (int)Horde_Util::getFormData('x1');
if ($x2 - $x1 < 50 || $y2 - $y1 < 50) {
$notification->push(_("Photo is too small. Search photo must be at least 50x50 pixels."));
- Horde::applicationUrl('faces/search/image.php')->redirect();
+ Horde::url('faces/search/image.php')->redirect();
exit;
}
$result = $img->loadFile($path);
} catch (Horde_Image_Exception $e) {
$notification->push($e->getMessage());
- Horde::applicationUrl('faces/search/image.php')->redirect();
+ Horde::url('faces/search/image.php')->redirect();
exit;
}
$result = $img->crop($x1, $y1, $x2, $y2);
} catch (Horde_Image_Exception $e) {
$notification->push($e->getMessage());
- Horde::applicationUrl('faces/search/image.php')->redirect();
+ Horde::url('faces/search/image.php')->redirect();
exit;
}
}
} catch (Horde_Image_Exception $e) {
$notification->push($e->getMessage());
- Horde::applicationUrl('faces/search/image.php')->redirect();
+ Horde::url('faces/search/image.php')->redirect();
}
/* Save image. */
$path = $tmp . '/search_face_thumb_' . $registry->getAuth() . Ansel_Faces::getExtension();
if (!file_put_contents($path, $img->raw())) {
$notification->push(_("Cannot store search photo"));
- Horde::applicationUrl('faces/search/image.php')->redirect();
+ Horde::url('faces/search/image.php')->redirect();
exit;
}
$signature = $faces->getSignatureFromFile($path);
if (empty($signature)) {
$notification->push(_("Cannot read photo signature"));
- Horde::applicationUrl('faces/search/image.php')->redirect();
+ Horde::url('faces/search/image.php')->redirect();
exit;
}
/* Save signature. */
$path = $tmp . '/search_face_' . $registry->getAuth() . '.sig';
if (file_put_contents($path, $signature)) {
- Horde::applicationUrl('faces/search/image.php')->redirect();
+ Horde::url('faces/search/image.php')->redirect();
exit;
}
$notification->push(_("Cannot save photo signature"));
-Horde::applicationUrl('faces/search/image.php')->redirect();
+Horde::url('faces/search/image.php')->redirect();
exit;
$results = $faces->getSignatureMatches($signature, $face_id, $perpage * $page, $perpage);
} catch (Ansel_Exception $e) {
$notification->push($e->getMessage());
- Horde::applicationUrl('faces/search/image.php')->redirect();
+ Horde::url('faces/search/image.php')->redirect();
}
} else {
$tmp = Horde::getTempDir();
$path = $tmp . '/search_face_' . $registry->getAuth() . '.sig';
if (file_exists($path) !== true) {
$notification->push(_("You must upload the search photo first"));
- Horde::applicationUrl('faces/search/image.php')->redirect();
+ Horde::url('faces/search/image.php')->redirect();
}
$signature = file_get_contents($path);
try {
/* Show tabs */
$vars = Horde_Variables::getDefaultVariables();
$tabs = new Horde_Core_Ui_Tabs('search_faces', $vars);
-$tabs->addTab(_("All faces"), Horde::applicationUrl('faces/search/all.php'), 'all');
-$tabs->addTab(_("From my galleries"), Horde::applicationUrl('faces/search/owner.php'), 'owner');
-$tabs->addTab(_("Named faces"), Horde::applicationUrl('faces/search/named.php'), 'named');
-$tabs->addTab(_("Search by name"), Horde::applicationUrl('faces/search/name.php'), 'name');
+$tabs->addTab(_("All faces"), Horde::url('faces/search/all.php'), 'all');
+$tabs->addTab(_("From my galleries"), Horde::url('faces/search/owner.php'), 'owner');
+$tabs->addTab(_("Named faces"), Horde::url('faces/search/named.php'), 'named');
+$tabs->addTab(_("Search by name"), Horde::url('faces/search/name.php'), 'name');
if ($conf['faces']['search']) {
- $tabs->addTab(_("Search by photo"), Horde::applicationUrl('faces/search/image.php'), 'image');
+ $tabs->addTab(_("Search by photo"), Horde::url('faces/search/image.php'), 'image');
}
// Redirect to the gallery list if no action has been requested.
$actionID = Horde_Util::getFormData('actionID');
if (is_null($actionID)) {
- Horde::applicationUrl('view.php?view=List', true)->redirect();
+ Horde::url('view.php?view=List', true)->redirect();
exit;
}
$parent = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getGallery($parentId);
} catch (Ansel_Exception $e) {
$notification->push($e->getMessage(), 'horde.error');
- Horde::applicationUrl('view.php?view=List', true)->redirect();
+ Horde::url('view.php?view=List', true)->redirect();
exit;
}
if (!$parent->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
$notification->push(sprintf(_("Access denied adding a gallery to \"%s\"."),
$parent->get('name')), 'horde.error');
- Horde::applicationUrl('view.php?view=List', true)->redirect();
+ Horde::url('view.php?view=List', true)->redirect();
exit;
}
!$gallery->hasPermission($registry->getAuth(), Horde_Perms::READ)) {
$notification->push(sprintf(_("Access denied downloading photos from \"%s\"."), $gallery->get('name')), 'horde.error');
- Horde::applicationUrl('view.php?view=List', true)->redirect();
+ Horde::url('view.php?view=List', true)->redirect();
exit;
}
($injector->getInstance('Horde_Perms')->exists('ansel') &&
!$injector->getInstance('Horde_Perms')->hasPermission('ansel', $registry->getAuth(), Horde_Perms::EDIT))) {
$notification->push(_("Access denied editing galleries."), 'horde.error');
- Horde::applicationUrl('view.php?view=List', true)->redirect();
+ Horde::url('view.php?view=List', true)->redirect();
exit;
}
$result = $gallery->setParent($new_parent);
} catch (Ansel_Exception $e) {
$notification->push($e->getMessage(), 'horde.error');
- Horde::applicationUrl(Ansel::getUrlFor('view', array('view' => 'List'), true))->redirect();
+ Horde::url(Ansel::getUrlFor('view', array('view' => 'List'), true))->redirect();
exit;
}
}
$parent = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getGallery($gallery_parent);
} catch (Ansel_Exception $e) {
$notification->push($e->getMessage(), 'horde.error');
- Horde::applicationUrl(Ansel::getUrlFor('view', array('view' => 'List'), true))->redirect();
+ Horde::url(Ansel::getUrlFor('view', array('view' => 'List'), true))->redirect();
exit;
}
if (!$parent->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
_("You do not have permission to add children to %s."),
$parent->get('name')), 'horde.error');
- Horde::applicationUrl(Ansel::getUrlFor('view', array('view' => 'List'), true))->redirect();
+ Horde::url(Ansel::getUrlFor('view', array('view' => 'List'), true))->redirect();
exit;
}
}
$url = Horde_Util::getFormData('url');
if (empty($url) && empty($exists)) {
// Redirect to the images upload page for newly creted galleries
- $url = Horde::applicationUrl('img/upload.php')->add('gallery', $galleryId);
+ $url = Horde::url('img/upload.php')->add('gallery', $galleryId);
} elseif (empty($url)) {
- $url = Horde::applicationUrl('index.php', true);
+ $url = Horde::url('index.php', true);
} else {
$url = new Horde_Url($url);
}
}
// Return to the gallery list.
- Horde::applicationUrl(Ansel::getUrlFor('view', array('view' => 'List'), true))->redirect();
+ Horde::url(Ansel::getUrlFor('view', array('view' => 'List'), true))->redirect();
exit;
case 'generateDefault':
$gallery = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getGallery($galleryId);
$gallery->clearStacks();
$notification->push(_("The gallery's default photo has successfully been reset."), 'horde.success');
- Horde::applicationUrl('view.php', true)->add('gallery', $galleryId)->redirect();
+ Horde::url('view.php', true)->add('gallery', $galleryId)->redirect();
exit;
} catch (Ansel_Exception $e) {
$notification->push($e->getMessage(), 'horde.error');
- Horde::applicationUrl('index.php', true)->redirect();
+ Horde::url('index.php', true)->redirect();
exit;
}
$gallery = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getGallery($galleryId);
} catch (Ansel_Exception $e) {
$notification->push($gallery->getMessage(), 'horde.error');
- Horde::applicationUrl('index.php', true)->redirect();
+ Horde::url('index.php', true)->redirect();
exit;
}
$gallery->clearThumbs();
$notification->push(_("The gallery's thumbnails have successfully been reset."), 'horde.success');
- Horde::applicationUrl('view.php', true)->add('gallery', $galleryId)->redirect();
+ Horde::url('view.php', true)->add('gallery', $galleryId)->redirect();
exit;
case 'deleteCache':
$gallery = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getGallery($galleryId);
} catch (Ansel_Exception $e) {
$notification->push($gallery->getMessage(), 'horde.error');
- Horde::applicationUrl('index.php', true)->redirect();
+ Horde::url('index.php', true)->redirect();
exit;
}
$gallery->clearViews();
$notification->push(_("The gallery's views have successfully been reset."), 'horde.success');
- Horde::applicationUrl('view.php', true)->add('gallery', $galleryId)->redirect();
+ Horde::url('view.php', true)->add('gallery', $galleryId)->redirect();
exit;
default:
- Horde::applicationUrl(Ansel::getUrlFor('view', array('view' => 'List'), true))->redirect();
+ Horde::url(Ansel::getUrlFor('view', array('view' => 'List'), true))->redirect();
exit;
}
'page' => $page),
$date),
true);
- $imageurl = Horde::applicationUrl('image.php')->add(
+ $imageurl = Horde::url('image.php')->add(
array_merge(
array('gallery' => $gallery_id,
'slug' => $gallery->get('slug'),
$image->watermark('screen', $watermark, $watermark_halign,
$watermark_valign, $watermark_font);
$image->updateData($image->raw('screen'), 'screen');
- Horde::applicationUrl('image.php', true)->add(
+ Horde::url('image.php', true)->add(
array_merge(
array('gallery' => $gallery_id,
'image' => $image_id,
}
}
- Horde::applicationUrl('image.php', true)->add(
+ Horde::url('image.php', true)->add(
array_merge(
array('gallery' => $gallery_id,
'image' => $image_id,
exit;
case 'previewcustomwatermark':
- $imageurl = Horde::applicationUrl('image.php', true)->add(
+ $imageurl = Horde::url('image.php', true)->add(
array_merge(
array('gallery' => $gallery_id,
'image' => $image_id,
$gallery->hasPasswd() || !$gallery->isOldEnough()) {
$notification->push(sprintf(_("Access denied downloading photos from \"%s\"."), $gallery->get('name')), 'horde.error');
- Horde::applicationUrl('view.php?view=List', true)->redirect();
+ Horde::url('view.php?view=List', true)->redirect();
exit;
}
}
$result = $faces->getFromPicture($image_id, $autocreate);
}
if (!empty($result)) {
- $customurl = Horde::applicationUrl('faces/custom.php');
+ $customurl = Horde::url('faces/custom.php');
$url = (!empty($args['url']) ? urldecode($args['url']) : '');
Horde::startBuffer();
include ANSEL_TEMPLATES . '/faces/image.inc';
$result = $faces->getFromPicture($this->_params['image_id'], $autocreate);
}
if (!empty($result)) {
- $customurl = Horde::applicationUrl('faces/custom.php');
+ $customurl = Horde::url('faces/custom.php');
$url = (!empty($args['url']) ? urldecode($args['url']) : '');
Horde::startBuffer();
require_once ANSEL_TEMPLATES . '/faces/image.inc';
}
if (!empty($result)) {
$imgdir = Horde_Themes::img(null, 'horde');
- $customurl = Horde::applicationUrl('faces/custom.php');
+ $customurl = Horde::url('faces/custom.php');
$url = (!empty($args['url']) ? urldecode($args['url']) : '');
Horde::startBuffer();
require_once ANSEL_TEMPLATES . '/faces/image.inc';
case 'untag':
$image->geotag('', '', '');
// Now get the "add geotag" stuff
- $addurl = Horde::applicationUrl('map_edit.php')->add('image', $img);
- $addLink = $addurl->link(array('onclick' => Horde::popupJs(Horde::applicationUrl('map_edit.php'), array('params' => array('image' => $img), 'urlencode' => true, 'width' => '750', 'height' => '600')) . 'return false;'));
+ $addurl = Horde::url('map_edit.php')->add('image', $img);
+ $addLink = $addurl->link(array('onclick' => Horde::popupJs(Horde::url('map_edit.php'), array('params' => array('image' => $img), 'urlencode' => true, 'width' => '750', 'height' => '600')) . 'return false;'));
$imgs = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getRecentImagesGeodata($GLOBALS['registry']->getAuth());
if (count($imgs) > 0) {
$imgsrc = '<div class="ansel_location_sameas">';
} elseif ($groupby == 'none') {
$url = 'all/';
}
- $url = Horde::applicationUrl($url, $full, $append_session);
+ $url = Horde::url($url, $full, $append_session);
// Keep the URL as clean as possible - don't append the page
// number if it's zero, which would be the default.
if (!empty($data['page'])) {
'day' => (empty($data['day']) ? 0 : $data['day'])));
}
- return Horde::applicationUrl($url, $full, $append_session);
+ return Horde::url($url, $full, $append_session);
} else {
- $url = Horde::applicationUrl('view.php', $full, $append_session);
+ $url = Horde::url('view.php', $full, $append_session);
/* See note above about delegating url generation to gallery/view */
if ($data['view'] == 'Image' &&
}
unset($data['groupby']);
- $url = Horde::applicationUrl($url, $full, $append_session);
+ $url = Horde::url($url, $full, $append_session);
if (count($data)) {
$url->add($data);
}
return $url;
} else {
- return Horde::applicationUrl('group.php', $full, $append_session)->add($data);
+ return Horde::url('group.php', $full, $append_session)->add($data);
}
case 'rss_user':
if ($rewrite) {
- return Horde::applicationUrl('user/' . urlencode($data['owner']) . '/rss', $full, $append_session);
+ return Horde::url('user/' . urlencode($data['owner']) . '/rss', $full, $append_session);
} else {
- $url = Horde::applicationUrl(new Horde_Url('rss.php'), $full, $append_session);
+ $url = Horde::url(new Horde_Url('rss.php'), $full, $append_session);
return $url->add(array('stream_type' => 'user', 'id' => $data['owner']));
}
case 'rss_gallery':
if ($rewrite) {
$id = (!empty($data['slug'])) ? $data['slug'] : 'id/' . (int)$data['gallery'];
- return Horde::applicationUrl(new Horde_Url('gallery/' . $id . '/rss'), $full, $append_session);
+ return Horde::url(new Horde_Url('gallery/' . $id . '/rss'), $full, $append_session);
} else {
- return Horde::applicationUrl('rss.php', $full, $append_session)->add(
+ return Horde::url('rss.php', $full, $append_session)->add(
array('stream_type' => 'gallery',
'id' => (int)$data['gallery']));
}
case 'default_view':
switch ($prefs->getValue('defaultview')) {
case 'browse':
- return Horde::applicationUrl(new Horde_Url('browse.php'), $full, $append_session);
+ return Horde::url(new Horde_Url('browse.php'), $full, $append_session);
case 'galleries':
$url = Ansel::getUrlFor('view', array('view' => 'List'), true);
}
if (empty($imageId)) {
- return Horde::applicationUrl((string)Ansel::getErrorImage($view), $full);
+ return Horde::url((string)Ansel::getErrorImage($view), $full);
}
// Default to ansel_default since we really only need to know the style
$image = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getImage($imageId);
} catch (Ansel_Exception $e) {
Horde::logMessage($e, 'ERR');
- return Horde::applicationUrl((string)Ansel::getErrorImage($view), $full);
+ return Horde::url((string)Ansel::getErrorImage($view), $full);
}
try {
$image->createView($view, $style, false);
} catch (Ansel_Exception $e) {
- return Horde::applicationUrl((string)Ansel::getErrorImage($view), $full);
+ return Horde::url((string)Ansel::getErrorImage($view), $full);
}
$viewHash = $image->getViewHash($view, $style) . '/' . $image->getVFSName($view);
}
if (!is_null($style)) {
$params['style'] = $style;
}
- return Horde::applicationUrl('img/' . $view . '.php', $full)->add($params);
+ return Horde::url('img/' . $view . '.php', $full)->add($params);
}
// Using vfs-direct
$menu = new Horde_Menu();
/* Browse/Search */
- $menu->add(Horde::applicationUrl('browse.php'), _("_Browse"),
+ $menu->add(Horde::url('browse.php'), _("_Browse"),
'browse.png', null, null, null,
(($GLOBALS['prefs']->getValue('defaultview') == 'browse' &&
basename($_SERVER['PHP_SELF']) == 'index.php') ||
if ($GLOBALS['registry']->isAdmin() ||
(!$GLOBALS['injector']->getInstance('Horde_Perms')->exists('ansel') && $GLOBALS['registry']->getAuth()) ||
$GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('ansel', $GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
- $menu->add(Horde::applicationUrl('gallery.php')->add('actionID', 'add'),
+ $menu->add(Horde::url('gallery.php')->add('actionID', 'add'),
_("_New Gallery"), 'add.png', null, null, null,
(basename($_SERVER['PHP_SELF']) == 'gallery.php' &&
Horde_Util::getFormData('actionID') == 'add')
}
if ($conf['faces']['driver'] && $registry->isAuthenticated()) {
- $menu->add(Horde::applicationUrl('faces/search/all.php'), _("_Faces"), 'user.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde::url('faces/search/all.php'), _("_Faces"), 'user.png', Horde_Themes::img(null, 'horde'));
}
/* Print. */
$css = array();
if (!empty($GLOBALS['ansel_stylesheets'])) {
foreach ($GLOBALS['ansel_stylesheets'] as $css_file) {
- $css[] = array('u' => Horde::applicationUrl($themesuri . '/' . $css_file, true),
+ $css[] = array('u' => Horde::url($themesuri . '/' . $css_file, true),
'f' => $themesfs . '/' . $css_file);
}
}
if (empty($GLOBALS['conf']['gallery']['downloadzip'])) {
$GLOBALS['notification']->push(_("Downloading zip files is not enabled. Talk to your server administrator."));
- Horde::applicationUrl('view.php?view=List', true)->redirect();
+ Horde::url('view.php?view=List', true)->redirect();
exit;
}
$notification->push(sprintf(_("There are no photos in %s to download."),
$gallery->get('name')), 'horde.message');
- Horde::applicationUrl('view.php?view=List', true)->redirect();
+ Horde::url('view.php?view=List', true)->redirect();
exit;
}
if (!empty($results['galleries'])) {
foreach ($results['galleries'] as $gallery) {
$gal = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getGallery($gallery);
- $view_url = Horde::applicationUrl('view.php')->add(
+ $view_url = Horde::url('view.php')->add(
array('gallery' => $gallery,
'view' => 'Gallery'));
$return[] = array('title' => $gal->get('name'),
return $e->getMessage();
}
- $preview_url = Horde::applicationUrl('preview.php');
+ $preview_url = Horde::url('preview.php');
$header = array(_("Gallery Name"), _("Last Modified"), _("Photo Count"));
$html = <<<HEADER
<div id="ansel_preview"></div>
$results = $this->_asortbyindex($results, 'message_timestamp');
$html = '<div id="ansel_preview"></div>'
. '<script type="text/javascript">'
- . 'function previewImage(e, image_id) {$(\'ansel_preview\').style.left = Event.pointerX(e) + \'px\'; $(\'ansel_preview\').style.top = Event.pointerY(e) + \'px\';new Ajax.Updater({success:\'ansel_preview\'}, \'' . Horde::applicationUrl('preview.php') . '\', {method: \'post\', parameters:\'?image=\' + image_id, onsuccess:$(\'ansel_preview\').show()});}'
+ . 'function previewImage(e, image_id) {$(\'ansel_preview\').style.left = Event.pointerX(e) + \'px\'; $(\'ansel_preview\').style.top = Event.pointerY(e) + \'px\';new Ajax.Updater({success:\'ansel_preview\'}, \'' . Horde::url('preview.php') . '\', {method: \'post\', parameters:\'?image=\' + image_id, onsuccess:$(\'ansel_preview\').show()});}'
. '</script>'
. '<table class="linedRow" cellspacing="0" style="width:100%"><thead><tr class="item nowrap"><th class="item leftAlign">' . _("Date") . '</th><th class="item leftAlign">' . _("Image") . '</th><th class="item leftAlign">' . _("Subject") . '</th><th class="item leftAlign">' . _("By") . '</th></tr></thead><tbody>';
} catch (Ansel_Exception $e) {
return $e->getMessage();
}
- $preview_url = Horde::applicationUrl('preview.php', true);
+ $preview_url = Horde::url('preview.php', true);
$header = array(_("Date"), _("Photo"), _("Gallery"));
$html = <<<HEADER
// Build the actual html
$html = '<div id="face' . $face_id . '"><table><tr><td>' . $img_view_url->link() . $imghtml . '</a></td><td>';
if (!empty($face['face_name'])) {
- $html .= Horde::applicationUrl('faces/face.php')->add('face', $face['face_id'])->link() . $face['face_name'] . '</a><br />';
+ $html .= Horde::url('faces/face.php')->add('face', $face['face_id'])->link() . $face['face_name'] . '</a><br />';
}
// Display the face name or a link to claim the face.
if (empty($face['face_name']) && $GLOBALS['conf']['report_content']['driver']) {
- $html .= Horde::applicationUrl('faces/claim.php')->add('face', $face_id)->link(array('title' => _("Do you know someone in this photo?"))) . _("Claim") . '</a>';
+ $html .= Horde::url('faces/claim.php')->add('face', $face_id)->link(array('title' => _("Do you know someone in this photo?"))) . _("Claim") . '</a>';
}
// Link for searching for similar faces.
if (Horde_Util::loadExtension('libpuzzle') !== false) {
- $html .= Horde::applicationUrl('faces/search/image_search.php')->add('face_id', $face_id)->link() . _("Find similar") . '</a>';
+ $html .= Horde::url('faces/search/image_search.php')->add('face_id', $face_id)->link() . _("Find similar") . '</a>';
}
$html .= '</div></td></tr></table>';
// If not viewing directly out of the VFS, hand off to img.php
if ($conf['vfs']['src'] != 'direct') {
- return Horde::applicationUrl('faces/img.php', $full)->add('face', $face_id);
+ return Horde::url('faces/img.php', $full)->add('face', $face_id);
} else {
$path = substr(str_pad($image_id, 2, 0, STR_PAD_LEFT), -2) . '/faces';
return $GLOBALS['conf']['vfs']['path'] . htmlspecialchars($path . '/' . $face_id . Ansel_Faces::getExtension());
/* Use the local cache to preserve the order */
$count = 0;
foreach ($this->_tags as $tagname => $tagid) {
- $remove_url = Horde::applicationUrl('view.php', true)->add(
+ $remove_url = Horde::url('view.php', true)->add(
array('view' => 'Results',
'tag' => $tagname,
'actionID' => 'remove'));
. '</a>';
if ($gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT) && !$mini) {
- $properties_link = Horde::applicationUrl('gallery.php', true)->add(
+ $properties_link = Horde::url('gallery.php', true)->add(
array('gallery' => $gallery->id,
'actionID' => 'modify',
'havesearch' => $haveSearch,
$thumbstyle = $mini ? 'mini' : $style['thumbstyle'];
/* URL for image properties/actions etc... */
- $image_url = Horde::applicationUrl('image.php')->add(
+ $image_url = Horde::url('image.php')->add(
array_merge(
array('gallery' => $image->gallery,
'page' => $page,
EOT;
/* Special requirements for lightbox */
if (!empty($lbjsurl)) {
- $graphic_dir = Horde::applicationUrl(Horde_Themes::img(), true, -1);
+ $graphic_dir = Horde::url(Horde_Themes::img(), true, -1);
$imageText = _("Photo");
$labelOf = _("of");
$html .= <<<EOT
true);
$params = array('gallery' => $this->gallery->id, 'url' => $galleryurl);
- Horde::applicationUrl('disclamer.php')->add($params)->setRaw(true)->redirect();
+ Horde::url('disclamer.php')->add($params)->setRaw(true)->redirect();
exit;
}
true);
$params = array('gallery' => $this->gallery->id, 'url' => $galleryurl);
- Horde::applicationUrl('protect.php')->add($params)->setRaw(true)->redirect();
+ Horde::url('protect.php')->add($params)->setRaw(true)->redirect();
exit;
}
$pager = new Horde_Core_Ui_Pager('page', $vars, $params);
Horde::startBuffer();
/* Create the js variables to pass to the lightbox script */
- $jsvars = array('graphics_dir' => Horde::applicationUrl(Horde_Themes::img(), true, -1),
+ $jsvars = array('graphics_dir' => Horde::url(Horde_Themes::img(), true, -1),
'image_text' => _("Photo"),
'of_text' => _("of"),
'start_page' => $page);
$params = array('gallery' => $this->gallery->id, 'url' => $url);
- Horde::applicationUrl('disclamer.php')->add($params)->setRaw(true)->redirect();
+ Horde::url('disclamer.php')->add($params)->setRaw(true)->redirect();
exit;
}
$params = array('gallery' => $this->gallery->id, 'url' => $url);
- Horde::applicationUrl('protect.php')->add($params)->setRaw(true)->redirect();
+ Horde::url('protect.php')->add($params)->setRaw(true)->redirect();
exit;
}
/* Not needed when being called via api */
if (empty($this->_params['api'])) {
- $this->_urls['ecard'] = Horde::applicationUrl('img/ecard.php')->add(
+ $this->_urls['ecard'] = Horde::url('img/ecard.php')->add(
array_merge(array('gallery' => $this->gallery->id,
'image' => $this->resource->id),
$this->_date));
/* Build the various urls */
- $imageActionUrl = Horde::applicationUrl('image.php')->add(
+ $imageActionUrl = Horde::url('image.php')->add(
array_merge(array('gallery' => $this->gallery->id,
'image' => $this->resource->id,
'page' => $this->_page),
$this->_urls['edit'] = $imageActionUrl->copy()->add('actionID', 'editimage');
$this->_urls['delete'] = $imageActionUrl->copy()->add('actionID', 'delete');
- $this->_urls['download'] = Horde::applicationUrl('img/download.php', true)->add('image', $this->resource->id);
- $this->_urls['report'] = Horde::applicationUrl('report.php')->add(
+ $this->_urls['download'] = Horde::url('img/download.php', true)->add('image', $this->resource->id);
+ $this->_urls['report'] = Horde::url('report.php')->add(
array('gallery' => $this->gallery->id,
'image' => $this->resource->id));
}
array($this->resource->id, $this->gallery->id),
urldecode($this->_params['slideshow_link']));
} else {
- $this->_urls['slideshow'] = Horde::applicationUrl('view.php')->add(
+ $this->_urls['slideshow'] = Horde::url('view.php')->add(
array_merge(array('gallery' => $this->gallery->id,
'image' => $this->resource->id,
'view' => 'Slideshow'),
if ($this->_numGalleries == 0 && empty($this->_params['api'])) {
if ($this->_owner && $filter == $this->_owner && $this->_owner == $GLOBALS['registry']->getAuth()) {
$notification->push(_("You have no photo galleries, add one!"), 'horde.message');
- Horde::applicationUrl('gallery.php')->add('actionID', 'add')->redirect();
+ Horde::url('gallery.php')->add('actionID', 'add')->redirect();
exit;
}
$notification->push(_("There are no photo galleries available."), 'horde.message');
/* Check for empty tag search and redirect if empty */
if ($this->_search->tagCount() < 1) {
- Horde::applicationUrl('browse.php', true)->redirect();
+ Horde::url('browse.php', true)->redirect();
exit;
}
}
}
$styleDef = Ansel::getStyleDefinition($GLOBALS['prefs']->getValue('default_gallerystyle'));
$style = $styleDef['name'];
- $viewurl = Horde::applicationUrl('view.php')->add(array('view' => 'Results',
+ $viewurl = Horde::url('view.php')->add(array('view' => 'Results',
'actionID' => 'add'));
$vars = Horde_Variables::getDefaultVariables();
{
$html = $this->_htmlBegin();
$id = $this->_view->gallery->id;
- $galleryurl = Horde::applicationUrl('gallery.php')->add('gallery', $id);
+ $galleryurl = Horde::url('gallery.php')->add('gallery', $id);
if ($this->_view->gallery->hasFeature('upload')) {
- $uploadurl = Horde::applicationUrl('img/upload.php')->add(
+ $uploadurl = Horde::url('img/upload.php')->add(
array('gallery' => $id,
'page' => !empty($this->_view->_params['page']) ? $this->_view->_params['page'] : 0));
}
} else {
/* Get any date info the gallery has */
$date = $this->_view->gallery->getDate();
- $slideshow_url = Horde::applicationUrl('view.php')->add(
+ $slideshow_url = Horde::url('view.php')->add(
array_merge(array('gallery' => $id,
'image' => array_pop($this->_view->gallery->listImages(0, 1)),
'view' => 'Slideshow'),
global $registry, $conf;
$id = $this->_view->gallery->id;
- $galleryurl = Horde::applicationUrl('gallery.php')->add('gallery', $id);
+ $galleryurl = Horde::url('gallery.php')->add('gallery', $id);
$selfurl = Horde::selfUrl(true, false, true);
$count = $this->_view->gallery->countImages();
$date = $this->_view->gallery->getDate();
/* Captions */
if ($this->_view->gallery->hasFeature('image_captions')) {
$params = array_merge(array('gallery' => $id), $date);
- $html .= '<li>' . Horde::applicationUrl('gallery/captions.php')->add($params)->link(array('class' => 'widget')) . Horde::img('text.png') . ' ' . _("Set captions") . ' ' . '</a></li>';
+ $html .= '<li>' . Horde::url('gallery/captions.php')->add($params)->link(array('class' => 'widget')) . Horde::img('text.png') . ' ' . _("Set captions") . ' ' . '</a></li>';
}
/* Sort */
if ($this->_view->gallery->hasFeature('sort_images')) {
- $sorturl = Horde::applicationUrl('gallery/sort.php')->add(array_merge(array('gallery' => $id), $date));
+ $sorturl = Horde::url('gallery/sort.php')->add(array_merge(array('gallery' => $id), $date));
$html .= '<li>' . $sorturl->copy()->add('actionId' , 'getOrder')->link(array('class' => 'widget')) . Horde::img('arrow_switch.png') . ' ' . _("Sort photos") . '</a></li>';
}
/* Find faces */
if ($conf['faces']['driver'] && $this->_view->gallery->hasFeature('faces')) {
- $html .= '<li>' . Horde::applicationUrl('faces/gallery.php')->add(
+ $html .= '<li>' . Horde::url('faces/gallery.php')->add(
array_merge($date,
array('gallery' => $id, 'page' => (!empty($this->_view->_params['page']) ? $this->_view->_params['page'] : 0))))
->link(array('class' => 'widget')) . Horde::img('user.png') . ' ' . _("Find faces") . '</a></li>';
if ($GLOBALS['registry']->getAuth() &&
$this->_view->gallery->get('owner') == $GLOBALS['registry']->getAuth()) {
$url = new Horde_Url('#');
- $html .= '<li>' . $url->link(array('class' => 'popup widget', 'onclick' => Horde::popupJs(Horde::applicationUrl('perms.php'), array('params' => array('cid' => $this->_view->gallery->id), 'urlencode' => true)) . 'return false;')) . Horde::img('perms.png') . ' ' . _("Set permissions") . '</a></li>';
+ $html .= '<li>' . $url->link(array('class' => 'popup widget', 'onclick' => Horde::popupJs(Horde::url('perms.php'), array('params' => array('cid' => $this->_view->gallery->id), 'urlencode' => true)) . 'return false;')) . Horde::img('perms.png') . ' ' . _("Set permissions") . '</a></li>';
} elseif (!empty($conf['report_content']['driver']) &&
(($conf['report_content']['allow'] == 'authenticated' &&
$registry->isAuthenticated()) ||
$conf['report_content']['allow'] == 'all')) {
- $reporturl = Horde::applicationUrl('report.php')->add('gallery', $id);
+ $reporturl = Horde::url('report.php')->add('gallery', $id);
$html .= '<li>' . $reporturl->link(array('class' => 'widget')) . _("Report") . '</a></li>';
}
$images = $faces->getGalleryFaces($this->_view->resource->id);
if ($this->_view->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
$link_text = (empty($images) ? _("Find faces") : _("Edit faces"));
- $html .= Horde::applicationUrl('faces/gallery.php')->add('gallery', $this->_view->gallery->id)->link(
+ $html .= Horde::url('faces/gallery.php')->add('gallery', $this->_view->gallery->id)->link(
array('id' => 'edit_faces',
'class' => 'widget'))
. $link_text . '</a>';
{
$ansel_storage = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope();
$geodata = $ansel_storage->getImagesGeodata($this->_params['images']);
- $url = Horde::applicationUrl('map_edit.php', true);
+ $url = Horde::url('map_edit.php', true);
$rtext = _("Relocate this image");
$dtext = _("Delete geotag");
} elseif ($permsEdit) {
// Image view, but no geotags, provide ability to add it.
- $addurl = Horde::applicationUrl('map_edit.php')->add('image', $this->_params['images'][0]);
- $addLink = $addurl->link(array('onclick' => Horde::popupJs(Horde::applicationUrl('map_edit.php'), array('params' => array('image' => $this->_params['images'][0]), 'urlencode' => true, 'width' => '750', 'height' => '600')) . 'return false;'));
+ $addurl = Horde::url('map_edit.php')->add('image', $this->_params['images'][0]);
+ $addLink = $addurl->link(array('onclick' => Horde::popupJs(Horde::url('map_edit.php'), array('params' => array('image' => $this->_params['images'][0]), 'urlencode' => true, 'width' => '750', 'height' => '600')) . 'return false;'));
$imgs = $ansel_storage->getRecentImagesGeodata($GLOBALS['registry']->getAuth());
if (count($imgs) > 0) {
$imgsrc = '<div class="ansel_location_sameas">';
// although, currently, *that* page requires js as well so...
if ($this->_view->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
$link_text = (empty($images) ? _("Find faces") : _("Edit faces"));
- $html .= Horde::applicationUrl('faces/gallery.php')->add('gallery', $this->_view->gallery->id)->link(
+ $html .= Horde::url('faces/gallery.php')->add('gallery', $this->_view->gallery->id)->link(
array('id' => 'edit_faces',
'class' => 'widget'))
. $link_text . '</a> | '
- . Horde::applicationUrl('faces/custom.php')->add(
+ . Horde::url('faces/custom.php')->add(
array('image' => $this->_view->resource->id,
'url' => $this->_params['selfUrl']))->link(array('class' => 'widget'))
. _("Manual face selection") . '</a>';
return null;
}
- $this->_title = Horde::applicationUrl('faces/search/owner.php')->add('owner', $this->_owner)->link()
+ $this->_title = Horde::url('faces/search/owner.php')->add('owner', $this->_owner)->link()
. sprintf(_("People in galleries owned by %s (%d of %d)"), $this->_owner, min(12, $this->_count), number_format($this->_count))
. '</a>';
));
$html .= Horde::endBuffer();
- $actionUrl = Horde::applicationUrl('image.php')->add(
+ $actionUrl = Horde::url('image.php')->add(
array('image' => $this->_view->resource->id,
'gallery' => $this->_view->gallery->id));
$gallery = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getGallery($vars->get('gallery'));
} catch (Ansel_Exception $e) {
$notification->push($e->getMessage());
- Horde::applicationUrl('list.php')->redirect();
+ Horde::url('list.php')->redirect();
exit;
}
$form = new Horde_Form($vars, _("This gallery is protected by a password. Please enter it below."));
$_SESSION['ansel']['passwd'][$gallery->id] = md5($vars->get('passwd'));
$url = $vars->get('url');
if (empty($url)) {
- $url = Horde::applicationUrl('view.php')->add('gallery', $gallery->id);
+ $url = Horde::url('view.php')->add('gallery', $gallery->id);
}
$url->redirect();
exit;
$gallery = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getGallery($gallery_id);
} catch (Ansel_Exception $e) {
$notification->push($gallery->getMessage());
- Horde::applicationUrl('view.php?view=List', true)->redirect();
+ Horde::url('view.php?view=List', true)->redirect();
exit;
}
} else {
$getparams = array();
}
- $stream_rss = Horde::applicationUrl('rss.php', true, -1)->add($getparams);
- $stream_rss2 = Horde::applicationUrl('rss.php', true, -1)->add($getparams);
+ $stream_rss = Horde::url('rss.php', true, -1)->add($getparams);
+ $stream_rss2 = Horde::url('rss.php', true, -1)->add($getparams);
$images = $imgs;
Horde::startBuffer();
</script>
-<div><img src="<?php echo Horde::applicationUrl('faces/search/img.php'); ?>" alt="[icon]" id="faceImage" /></div>
+<div><img src="<?php echo Horde::url('faces/search/img.php'); ?>" alt="[icon]" id="faceImage" /></div>
-<form method="post" action="<?php echo Horde::applicationUrl('faces/search/image_save.php'); ?>">
+<form method="post" action="<?php echo Horde::url('faces/search/image_save.php'); ?>">
<div class="control" style="width: <?php echo $conf['screen']['height'] ?>px">
<input type="submit" name="submit" id="submit" value="<?php echo _("Search") ?>" />
<img src="<?php echo $faces->getFaceUrl($face['image_id'], $face_id) ?>" style="padding: 5px;" alt="<?php echo $facename?>" /><br />
<?php echo sprintf(ngettext("%d gallery", "%d galleries", count($face['galleries'])), count($face['galleries'])); ?><br />
<?php if ($GLOBALS['conf']['report_content']['driver']): ?>
- <?php echo Horde::applicationUrl('faces/report.php')->add('face', $face_id)->link(
+ <?php echo Horde::url('faces/report.php')->add('face', $face_id)->link(
array('class' => 'small',
'title' => _("Report abuse or submit a removal request"))) . _("Report") . '</a><br />'?>
<?php endif; ?>
<?php if ($conf['faces']['search'] && Horde_Util::loadExtension('libpuzzle')) {
- echo Horde::applicationUrl('faces/search/image_search.php')->add('face_id', $face_id)->link(array('title' => _("Find similar"))) . _("Similar faces") . '</a>';
+ echo Horde::url('faces/search/image_search.php')->add('face_id', $face_id)->link(array('title' => _("Find similar"))) . _("Similar faces") . '</a>';
} ?>
</td>
<td>
var imgids = <?php echo Horde_Serialize::serialize($imageids, Horde_Serialize::JSON, $GLOBALS['registry']->getCharset()); ?>;
function proccessImageFaces(image_id, reget) {
- var url = '<?php echo Horde::applicationUrl('faces/image.php'); ?>';
+ var url = '<?php echo Horde::url('faces/image.php'); ?>';
$('processface' + image_id).innerHTML = '<?php echo _("Loading...") ?>';
var params = {'reload':reget, 'image': image_id};
new Ajax.Updater({success:'processface' + image_id},
}
function deleteFace(image_id, face_id) {
- var url = '<?php echo Horde::applicationUrl('xrequest.php')->add(array('requestType' => 'EditFaces')); ?>';
+ var url = '<?php echo Horde::url('xrequest.php')->add(array('requestType' => 'EditFaces')); ?>';
var params = {'image': image_id, face: face_id};
new Ajax.Request(url + '/action=delete',
{
function setFaceName(image_id, face_id) {
var params = {face: face_id, 'image': image_id, facename: encodeURIComponent($F('facename' + face_id))};
- var url = '<?php echo Horde::applicationUrl('xrequest.php')->add(array('requestType' => 'EditFaces')); ?>';
+ var url = '<?php echo Horde::url('xrequest.php')->add(array('requestType' => 'EditFaces')); ?>';
new Ajax.Updater({success: 'face' + face_id},
url + '/action=setname',
{
<?php foreach ($result as $face_id => $face_name):?>
<div id="face<?php echo $face_id ?>">
- <img src="<?php echo $autocreate ? $faces->getFaceUrl($image_id, $face_id) : Horde::applicationUrl('faces/img.php')->add('face', $face_id); ?>" alt="<?php echo $face_id ?>" style="padding-bottom: 5px; padding-left: 5px; width: 50px; height: 50px;" />
+ <img src="<?php echo $autocreate ? $faces->getFaceUrl($image_id, $face_id) : Horde::url('faces/img.php')->add('face', $face_id); ?>" alt="<?php echo $face_id ?>" style="padding-bottom: 5px; padding-left: 5px; width: 50px; height: 50px;" />
<input type="text" name="facename<?php echo $face_id ?>" id="facename<?php echo $face_id ?>" size="15" value="<?php echo $face_name ?>" />
<a href="javascript:void(0)" onclick="Ansel.setFaceName(<?php echo $image_id ?>, <?php echo $face_id ?>)" title="<?php echo _("Save face name") . '">' . Horde::img('save.png')?></a>
<a href="javascript:void(0)" onclick="Ansel.deleteFace(<?php echo $image_id ?>, <?php echo $face_id ?>)" title="<?php echo _("Delete face") . '">' . Horde::img('delete.png')?></a>
<br />
<img src="<?php echo $faces->getFaceUrl($face['image_id'], $face_id) ?>" style="padding: 5px;" alt="<?php echo $facename?>" /><br />
<?php echo sprintf(ngettext("%d photo", "%d photos", count($results)), count($results)); ?><br />
- <?php echo Horde::applicationUrl('faces/report.php')->add(array('face', $face_id))->link(
+ <?php echo Horde::url('faces/report.php')->add(array('face', $face_id))->link(
array('class' => 'small',
'title' => _("Report abuse or submit a removal request"))) . _("Report") . '</a>'?>
<?php else: ?>
- <img src="<?php echo Horde::applicationUrl('faces/search/img.php')->add('thumb', 1) ?>" style="padding: 5px;" alt="<?php echo $title ?>" style="width: 50px; height 50px;" /></a>
+ <img src="<?php echo Horde::url('faces/search/img.php')->add('thumb', 1) ?>" style="padding: 5px;" alt="<?php echo $title ?>" style="width: 50px; height 50px;" /></a>
<?php endif; ?>
</td>
<td>
<td align="right" valign="top"><strong id="slug_flag"><?php echo _("Gallery Slug") ?></strong> </td>
<td>
<input name="gallery_slug" id="gallery_slug" type="text" value="<?php echo htmlspecialchars($gallery_slug) ?>" size="50" /><br />
- <?php if ($GLOBALS['conf']['urls']['pretty'] == 'rewrite') echo _("Slugs allows direct access to this gallery by visiting:") . ': ' . Horde::applicationUrl('gallery/slugname', true) ?><br />
+ <?php if ($GLOBALS['conf']['urls']['pretty'] == 'rewrite') echo _("Slugs allows direct access to this gallery by visiting:") . ': ' . Horde::url('gallery/slugname', true) ?><br />
<?php echo _("Slug names may contain only letters, numbers, @, or _ (underscore).") ?>
</td>
</tr>
}
if (Ansel::isAvailable('TextWatermark')) {
$url = new Horde_Url('#');
- echo $url->link(array('target' => '_blank', 'onclick.raw' => Horde::popupJs(Horde::applicationUrl($imageurl), array('params' => array('actionID' => 'setwatermark', 'share' => $gallery->getName()), 'width' => 450, 'height' => 250, 'urlencode' => true)) . 'return false;')) . Horde::img('text.png') . ' ' . _("Watermark") . '</a> ';
+ echo $url->link(array('target' => '_blank', 'onclick.raw' => Horde::popupJs(Horde::url($imageurl), array('params' => array('actionID' => 'setwatermark', 'share' => $gallery->getName()), 'width' => 450, 'height' => 250, 'urlencode' => true)) . 'return false;')) . Horde::img('text.png') . ' ' . _("Watermark") . '</a> ';
}
$selfUrl = Horde::selfUrl(true);
<h1 class="header"><?php echo htmlspecialchars($title, ENT_COMPAT, $GLOBALS['registry']->getCharset()) ?></h1>
<?php
-$base_url = Horde::applicationUrl('image.php');
+$base_url = Horde::url('image.php');
$base_url = $base_url->copy()->add(array_merge(
array('gallery' => $gallery_id,
'image' => $image_id,
<h1 class="header"><?php echo htmlspecialchars($title, ENT_COMPAT, $GLOBALS['registry']->getCharset()) ?></h1>
<?php
-$base_url = Horde::applicationUrl('image.php')->add(
+$base_url = Horde::url('image.php')->add(
array_merge(
array('gallery' => $gallery_id,
'image' => $image_id,
}
if (Ansel::isAvailable('text_watermark')) {
$url = new Horde_Url('#');
- echo $url->link(array('target' => '_blank', 'onclick.raw' => Horde::popupJs(Horde::applicationUrl($imageurl), array('params' => array('actionID' => 'setwatermark', 'share' => $gallery->getName()), 'width' => 450, 'height' => 250, 'urlencode' => true)) . 'return false;')) . Horde::img('text.png') . ' ' . _("Watermark") . '</a> ';
+ echo $url->link(array('target' => '_blank', 'onclick.raw' => Horde::popupJs(Horde::url($imageurl), array('params' => array('actionID' => 'setwatermark', 'share' => $gallery->getName()), 'width' => 450, 'height' => 250, 'urlencode' => true)) . 'return false;')) . Horde::img('text.png') . ' ' . _("Watermark") . '</a> ';
}
$selfUrl = Horde::selfUrl(true);
function runTest() {
updateCarouselSize();
- carousel = new UI.Ajax.Carousel("horizontal_carousel", {url: "<?php echo Horde::applicationUrl('img/upload_preview.php')->add('gallery', $gallery->id) ?>", elementSize: 90})
+ carousel = new UI.Ajax.Carousel("horizontal_carousel", {url: "<?php echo Horde::url('img/upload_preview.php')->add('gallery', $gallery->id) ?>", elementSize: 90})
.observe("request:started", function() {
$('spinner').show().morph("opacity:0.8", {duration:0.5});
})
<span class="rightFloat">
<?php ($galleries_perpage < $num_galleries) ? printf(_("%d to %d of %d Galleries"), $start, $end, $num_galleries) : printf(ngettext("%d Gallery", "%d Galleries", $num_galleries), $num_galleries) ?>
</span>
- <?php echo @htmlspecialchars($list_title, ENT_COMPAT, $GLOBALS['registry']->getCharset()) . ' ' . Horde::applicationUrl($refresh_link)->link(array('title' => _("Refresh List"))) . Horde::img('reload.png', _("Refresh List")) . '</a>' ?>
+ <?php echo @htmlspecialchars($list_title, ENT_COMPAT, $GLOBALS['registry']->getCharset()) . ' ' . Horde::url($refresh_link)->link(array('title' => _("Refresh List"))) . Horde::img('reload.png', _("Refresh List")) . '</a>' ?>
</div>
<table width="100%" style="background:<?php echo $styleDef['background'] ?>;"><tr>
if ($face['face_name']) {
echo '<a href="' . $face_url . '" title="' . _("Find other photos this face appears in") . '">' . _("Others") . '</a><br />';
} elseif ($GLOBALS['conf']['report_content']['driver']) {
- echo Horde::applicationUrl('faces/claim.php')->add('face', $face_id)->link(array('title' => _("Tell us who is in this photo")))
+ echo Horde::url('faces/claim.php')->add('face', $face_id)->link(array('title' => _("Tell us who is in this photo")))
. _("Claim") . '</a><br />';
- echo Horde::applicationUrl('faces/report.php')->add('face', $face_id)->link(array('title' => _("Report abuse or submit a removal request")))
+ echo Horde::url('faces/report.php')->add('face', $face_id)->link(array('title' => _("Report abuse or submit a removal request")))
. _("Report") . '</a><br />';
}
if ($conf['faces']['search'] && Horde_Util::loadExtension('libpuzzle') !== false) {
- echo Horde::applicationUrl('faces/search/image_search.php')->add('face_id', $face_id)->link(array('title' => _("Find similar"))) . _("Similar faces") . '</a>';
+ echo Horde::url('faces/search/image_search.php')->add('face_id', $face_id)->link(array('title' => _("Find similar"))) . _("Similar faces") . '</a>';
}
?>
</div>
<?php if ($option_edit): ?>
<?php echo $image_url->copy()->add(array('actionID' => 'modify'))->link(
array('target' => '_blank',
- 'onclick' => Horde::popupJs(Horde::applicationUrl($image_url), array('params' => array('actionID' => 'modify', 'urlencode' => true)))
+ 'onclick' => Horde::popupJs(Horde::url($image_url), array('params' => array('actionID' => 'modify', 'urlencode' => true)))
. 'return false;')) . _("Properties")?></a>
| <?php echo $image_url->copy()->add('actionID', 'editimage')->link() . _("Edit") ?></a>
<?php endif; ?>
function editDates()
{
var haveImages = false;
- var imageDateUrl = '<?php echo Horde::applicationUrl('edit_dates.php')->add(array('gallery' => $this->galleryId)) ?>';
+ var imageDateUrl = '<?php echo Horde::url('edit_dates.php')->add(array('gallery' => $this->galleryId)) ?>';
for (var i = 0; i< document.forms['gallery'].elements.length; ++i) {
if (document.forms['gallery'].elements[i].checked == true &&
document.forms['gallery'].elements[i].type == 'checkbox') {
<tr>
<td style="vertical-align:top;width:<?php echo ($this->view->countWidgets() ? "75%" : "100%") ?>;">
<?php if (empty($this->view->api) && $option_select && $this->numTiles): ?>
- <form name="gallery" action="<?php echo Horde::applicationUrl('image.php', true)?>" method="get">
+ <form name="gallery" action="<?php echo Horde::url('image.php', true)?>" method="get">
<?php echo Horde_Util::formInput() ?>
<input type="hidden" name="actionID" value="" />
<input type="hidden" name="gallery" value="<?php echo htmlspecialchars($this->galleryId) ?>" />
function editDates()
{
var haveImages = false;
- var imageDateUrl = '<?php echo Horde::applicationUrl('edit_dates.php')->add(array('gallery' => $this->galleryId)) ?>';
+ var imageDateUrl = '<?php echo Horde::url('edit_dates.php')->add(array('gallery' => $this->galleryId)) ?>';
for (var i = 0; i< document.forms['gallery'].elements.length; ++i) {
if (document.forms['gallery'].elements[i].checked == true &&
document.forms['gallery'].elements[i].type == 'checkbox') {
<tr>
<td style="vertical-align:top;width:<?php echo ($this->view->countWidgets() ? "75%" : "100%") ?>;">
<?php if (empty($this->view->api) && $option_select && $this->numTiles): ?>
- <form name="gallery" action="<?php echo Horde::applicationUrl('image.php', true)?>" method="get">
+ <form name="gallery" action="<?php echo Horde::url('image.php', true)?>" method="get">
<?php echo Horde_Util::formInput() ?>
<input type="hidden" name="actionID" value="" />
<input type="hidden" name="gallery" value="<?php echo $this->galleryId ?>" />
<span id="listCounts" class="rightFloat">
<?php if ($this->_g_perPage < $this->_numGalleries) printf(_("%d to %d of %d Galleries"), $this->_start, $end, $this->_numGalleries); else printf(ngettext("%d Gallery", "%d Galleries", $this->_numGalleries), $this->_numGalleries) ?>
</span>
- <?php if (empty($this->_params['api'])) echo Ansel::getBreadcrumbs() . ' ' . Horde::applicationUrl($refresh_link)->link(array('title' => _("Refresh List"))) . Horde::img('reload.png', _("Refresh List")) . '</a>' ?>
+ <?php if (empty($this->_params['api'])) echo Ansel::getBreadcrumbs() . ' ' . Horde::url($refresh_link)->link(array('title' => _("Refresh List"))) . Horde::img('reload.png', _("Refresh List")) . '</a>' ?>
</div>
<?php if (empty($this->_params['api'])): ?>
<div class="anselActions widget">
}
</script>
<?php if ($numimages): ?>
-<form name="gallery" action="<?php Horde::applicationUrl('view.php', true)?>" method="get">
+<form name="gallery" action="<?php Horde::url('view.php', true)?>" method="get">
<?php echo Horde_Util::formInput() ?>
<input type="hidden" name="actionID" value="" />
<input type="hidden" name="view" value="Results" />
<td>
<?php if ($this->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)): ?>
<?php $url = new Horde_Url('#'); echo $url->link(array('onclick.raw' => $this->_urls['prop_popup'] . ' SlideController.pause(); return false;','id' => 'image_properties_link')) . _("Properties") ?></a>
- | <?php echo Horde::applicationUrl($this->_urls['edit'])->link(array('id' => 'image_edit_link')) . _("Edit") ?></a>
+ | <?php echo Horde::url($this->_urls['edit'])->link(array('id' => 'image_edit_link')) . _("Edit") ?></a>
<?php endif; ?>
<?php if ($this->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)): ?>
| <?php echo $this->_urls['delete']->link(array('id' => 'image_delete_link')) . _("Delete") ?></a>
for (i = 0; i < files.length; i++) {
var postTag = xml.createNode(1, 'post', '');
- postTag.setAttribute('href', '<?php echo Horde::applicationUrl('xppublish.php?1=1', true) ?>&gallery=' + folder.gallery.value);
+ postTag.setAttribute('href', '<?php echo Horde::url('xppublish.php?1=1', true) ?>&gallery=' + folder.gallery.value);
postTag.setAttribute('name', 'imagefile');
var dataTag = xml.createNode(1, 'formdata', '');
var uploadTag = xml.createNode(1, 'uploadinfo', '');
var htmluiTag = xml.createNode(1, 'htmlui', '');
- htmluiTag.text = '<?php echo Horde::applicationUrl('view.php?view=Gallery', true) ?>&gallery=' + folder.gallery.value;
+ htmluiTag.text = '<?php echo Horde::url('view.php?view=Gallery', true) ?>&gallery=' + folder.gallery.value;
uploadTag.appendChild(htmluiTag);
xml.documentElement.appendChild(uploadTag);
<div style="margin:5px">
-<form id="folder" name="folder" method="post" action="<?php echo Horde::applicationUrl('xppublish.php', true) ?>">
+<form id="folder" name="folder" method="post" action="<?php echo Horde::url('xppublish.php', true) ?>">
<input type="hidden" name="cmd" value="select" />
<?php Horde_Util::pformInput() ?>
$registry->getApp() . '-' . $conf['server']['name'],
$registry->get('name'),
Horde_String::convertCharset(sprintf(_("Publish your photos to %s on %s."), $registry->get('name'), $conf['server']['name']), $registry->getCharset(), $registry->getCharset(true)),
- Horde::applicationUrl('xppublish.php', true, -1)->add('cmd', 'publish'),
+ Horde::url('xppublish.php', true, -1)->add('cmd', 'publish'),
Horde::url(Horde_Themes::img('favicon.ico'), true, -1));
exit;
}
$galleryId = Horde_Util::getFormData('gallery');
if ($cmd == 'list') {
$PUBLISH_ONNEXT = 'folder.submit();';
- $PUBLISH_ONBACK = 'window.location.href="' . Horde::applicationUrl('xppublish.php?cmd=publish', true) . '";';
+ $PUBLISH_ONBACK = 'window.location.href="' . Horde::url('xppublish.php?cmd=publish', true) . '";';
$PUBLISH_BUTTONS = 'true,true,true';
require ANSEL_TEMPLATES . '/xppublish/list.inc';
}
if ($error) {
echo '<span class="form-error">' . $error . '</span><br />';
echo _("Press the \"Back\" button and try again.");
- $PUBLISH_ONBACK = 'window.location.href="' . Horde::applicationUrl('xppublish.php?cmd=list', true) . '";';
+ $PUBLISH_ONBACK = 'window.location.href="' . Horde::url('xppublish.php?cmd=list', true) . '";';
$PUBLISH_BUTTONS = 'true,false,true';
} else {
echo '<form id="folder">';
}
$PUBLISH_CMD = 'folder.gallery_name.focus(); folder.gallery_name.select();';
$PUBLISH_ONNEXT = 'folder.submit();';
- $PUBLISH_ONBACK = 'window.location.href="' . Horde::applicationUrl('xppublish.php?cmd=list', true) . '";';
+ $PUBLISH_ONBACK = 'window.location.href="' . Horde::url('xppublish.php?cmd=list', true) . '";';
$PUBLISH_BUTTONS = 'true,true,true';
require ANSEL_TEMPLATES . '/xppublish/new.inc';
require ANSEL_TEMPLATES . '/xppublish/javascript.inc';
$po->save($pofile);
if (Horde_Util::getFormData('url') == 'view') {
- Horde::applicationUrl('view.php')->add('module' => $app)->redirect();
+ Horde::url('view.php')->add('module' => $app)->redirect();
}
}
}
$menu = new Horde_Menu();
- $menu->addArray(array('url' => Horde::applicationUrl('index.php'),
+ $menu->addArray(array('url' => Horde::url('index.php'),
'text' => _("_General"),
'icon' => 'list.png'));
if (Babel::hasPermission('view')) {
- $menu->addArray(array('url' => Horde::applicationUrl('view.php'),
+ $menu->addArray(array('url' => Horde::url('view.php'),
'text' => _("_View"),
'icon' => 'view.png'));
}
if (Babel::hasPermission('stats')) {
- $menu->addArray(array('url' => Horde::applicationUrl('stats.php'),
+ $menu->addArray(array('url' => Horde::url('stats.php'),
'text' => _("_Stats"),
'icon' => 'extract.png'));
}
if (Babel::hasPermission('extract')) {
- $menu->addArray(array('url' => Horde::applicationUrl('extract.php'),
+ $menu->addArray(array('url' => Horde::url('extract.php'),
'text' => _("_Extract"),
'icon' => 'extract.png'));
}
if (Babel::hasPermission('make')) {
- $menu->addArray(array('url' => Horde::applicationUrl('make.php'),
+ $menu->addArray(array('url' => Horde::url('make.php'),
'text' => _("_Make"),
'icon' => 'make.png'));
}
if (Babel::hasPermission('upload')) {
- $menu->addArray(array('url' => Horde::applicationUrl('upload.php'),
+ $menu->addArray(array('url' => Horde::url('upload.php'),
'text' => _("_Upload"),
'icon' => 'upload.png'));
}
echo "\n<tr class=\"item" . ($i++ % 2) . "\">";
}
echo "\n\t<td>" . Horde_Nls::$config['languages'][$key] . "</td>";
- echo "\n\t<td>" . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('view.php'), array('display_language' => $key, 'module' => $_app))) . $key . '</a>' . "</td>";
+ echo "\n\t<td>" . Horde::link(Horde_Util::addParameter(Horde::url('view.php'), array('display_language' => $key, 'module' => $_app))) . $key . '</a>' . "</td>";
echo "\n\t<td>" . Translate_Display::create_bargraph($value[2], $value[0]) . "</td>";
echo "\n\t<td>" . $value[2] . "</td>";
echo "\n\t<td>" . $value [3] . "</td>";
$cmds['view'] = array(
'desc' => _("View"),
'text' => _("View all translations."),
- 'url' => Horde::applicationUrl('view.php')
+ 'url' => Horde::url('view.php')
);
$cmds['download'] = array(
'desc' => _("Download"),
'text' => _("Download all current PO files."),
- 'url' => Horde::applicationUrl('download.php')
+ 'url' => Horde::url('download.php')
);
$cmds['upload'] = array(
'desc' => _("Upload"),
'text' => _("Upload new PO files."),
- 'url' => Horde::applicationUrl('upload.php')
+ 'url' => Horde::url('upload.php')
);
$cmds['stats'] = array(
'desc' => _("Statistics"),
'text' => _("Get statistics about translations."),
- 'url' => Horde::applicationUrl('stats.php')
+ 'url' => Horde::url('stats.php')
);
$cmds['extract'] = array(
'desc' => _("Extract"),
'text' => _("Generate and merge PO files."),
- 'url' => Horde::applicationUrl('extract.php')
+ 'url' => Horde::url('extract.php')
);
$cmds['make'] = array(
'desc' => _("Make"),
'text' => _("Build binary MO files from the specified PO files."),
- 'url' => Horde::applicationUrl('make.php')
+ 'url' => Horde::url('make.php')
);
$cmds['commit'] = array(
'desc' => _("Commit"),
'text' => _("Commit translations to the SVN server."),
- 'url' => Horde::applicationUrl('commit.php')
+ 'url' => Horde::url('commit.php')
);
$cmds['reset'] = array(
'desc' => _("Reset"),
'text' => _("The reset procedure will delete all PO files from the server for all modules and restore from SVN server."),
- 'url' => Horde::applicationUrl('reset.php')
+ 'url' => Horde::url('reset.php')
);
system($cmd);
// Redirect to page URL
- Horde::applicationUrl('upload.php')->redirect();
+ Horde::url('upload.php')->redirect();
}
}
}
if (Babel::hasPermission('view', 'tabs', Horde_Perms::EDIT)) {
$hmenu_desc = _("Edit Header");
- $url = Horde::applicationUrl('edit.php');
+ $url = Horde::url('edit.php');
$url = Horde_Util::addParameter($url, array('module' => $app,
'url' => 'view'));
Translate_Display::info();
$filter_html = '';
- $filter_html .= '<form action="' . Horde::applicationUrl('view.php') . '" method="post" name="edit" id="edit">';
+ $filter_html .= '<form action="' . Horde::url('view.php') . '" method="post" name="edit" id="edit">';
$filter_html .= '<span class="smallheader">';
$filter_html .= Horde::img('edit.png') . ' ';
$filter_html .= '<b>' . _("Filter: ") . '</b>';
} else {
$hmenu_desc = _("All");
}
- $url = Horde::applicationUrl('view.php');
+ $url = Horde::url('view.php');
$url = Horde_Util::addParameter($url, array('module' => $app));
$filter_html .= Horde::link($url, _("Edit Mode"), 'menuitem', null). ' ' . $hmenu_desc . '</a> ';
$filter_html .= '| ';
} else {
$hmenu_desc = _("Translated");
}
- $url = Horde::applicationUrl('view.php');
+ $url = Horde::url('view.php');
$url = Horde_Util::addParameter($url, array('module' => $app, 'filter' => 'translated'));
$filter_html .= Horde::link($url, $hmenu_desc, 'menuitem', null). ' ' . $hmenu_desc . '</a> ';
$filter_html .= '| ';
} else {
$hmenu_desc = _("Fuzzy");
}
- $url = Horde::applicationUrl('view.php');
+ $url = Horde::url('view.php');
$url = Horde_Util::addParameter($url, array('module' => $app, 'filter' => 'fuzzy'));
$filter_html .= Horde::link($url, $hmenu_desc, 'menuitem', null). ' ' . $hmenu_desc . '</a> ';
$filter_html .= '| ';
} else {
$hmenu_desc = _("Untranslated");
}
- $url = Horde::applicationUrl('view.php');
+ $url = Horde::url('view.php');
$url = Horde_Util::addParameter($url, array('module' => $app, 'filter' => 'untranslated'));
$filter_html .= Horde::link($url, $hmenu_desc, 'menuitem', null). ' ' . $hmenu_desc . '</a> ';
$filter_html .= '] ';
// Lock the current item for 5 minutes
$locks->setLock($GLOBALS['registry']->getAuth(), md5($encstr), $lockscope, 300);
- echo '<form action="' . Horde::applicationUrl('view.php') . "#" . md5($encstr) . '" method="post" name="edit" id="edit">';
+ echo '<form action="' . Horde::url('view.php') . "#" . md5($encstr) . '" method="post" name="edit" id="edit">';
echo '<input type="hidden" name="module" value="' . $app . '">';
echo '<input type="hidden" name="page" value="' . $page . '">';
echo '<input type="hidden" name="filter" value="' . $filter . '">';
$sline = $m[2];
if (Babel::hasPermission('viewsource', 'tabs', Horde_Perms::EDIT)) {
- $surl = Horde::applicationUrl('viewsource.php');
+ $surl = Horde::url('viewsource.php');
$surl = Horde_Util::addParameter($surl, array('module' => $app,
'file' => $sfile,
'line' => $sline));
} else {
if (Babel::hasPermission('view', 'tabs', Horde_Perms::EDIT)) {
if (!$editmode || $cstring != $encstr) {
- $surl = Horde::applicationUrl('view.php');
+ $surl = Horde::url('view.php');
$surl = Horde_Util::addParameter($surl, array('module' => $app, 'cstring' => $encstr, 'editmode' => 1, 'page' => $page, 'filter' => $filter, 'search' => $search));
$surl .= "#" . md5($encstr);
<table width="100%" class="item box">
<tr><td>
<?php
- $viewurl = Horde::applicationUrl('view.php');
+ $viewurl = Horde::url('view.php');
$viewurl = Horde_Util::addParameter($viewurl, array('editmode' => $editmode,
'module' => $app,
'filter' => $filter,
require_once BEATNIK_BASE . '/lib/Forms/Autogenerate.php';
-$viewurl = Horde::applicationUrl('viewzone.php');
+$viewurl = Horde::url('viewzone.php');
$vars = Horde_Variables::getDefaultVariables();
$form = new Autogenerate($vars);
$result = Beatnik::autogenerate($vars);
} catch (Exception $e) {
$notification->push($e->getMessage(), 'horde.error');
- Horde::applicationUrl('listzones.php')->redirect();
+ Horde::url('listzones.php')->redirect();
}
} else {
$notification->push(_("Autogeneration not performed"), 'horde.warning');
require BEATNIK_BASE . '/templates/common-header.inc';
require BEATNIK_BASE . '/templates/menu.inc';
-$form->renderActive(null, null, Horde::applicationUrl('autogenerate.php'), 'post');
+$form->renderActive(null, null, Horde::url('autogenerate.php'), 'post');
require $registry->get('templates', 'horde') . '/common-footer.inc';
$domains = array();
if (Horde_Util::getGet('domain') == 'current') {
- $url = Horde::applicationUrl('viewzone.php');
+ $url = Horde::url('viewzone.php');
$domains[] = $_SESSION['beatnik']['curdomain'];
} elseif (Horde_Util::getGet('domain') == 'all') {
- $url = Horde::applicationUrl('listzones.php');
+ $url = Horde::url('listzones.php');
foreach (Beatnik::needCommit() as $domain) {
$domains[] = $beatnik->driver->getDomain($domain);
}
$result = $beatnik->driver->deleteRecord($info);
} catch (Exception $e) {
$notification->push($e->getMessage(), 'horde.error');
- Horde::applicationUrl('viewzone.php')->add($info)->redirect();
+ Horde::url('viewzone.php')->add($info)->redirect();
}
$notification->push(_("Record deleted"), 'horde.success');
if ($info['rectype'] == 'soa') {
- Horde::applicationUrl('listzones.php')->redirect();
+ Horde::url('listzones.php')->redirect();
} else {
- Horde::applicationUrl('viewzone.php')->redirect();
+ Horde::url('viewzone.php')->redirect();
}
} else {
$notification->push(_("Record not deleted"), 'horde.warning');
- Horde::applicationUrl('viewzone.php')->add($info)->redirect();
+ Horde::url('viewzone.php')->add($info)->redirect();
}
} elseif (!$form->isSubmitted() && $record) {
foreach ($record as $field => $value) {
require BEATNIK_BASE . '/templates/common-header.inc';
require BEATNIK_BASE . '/templates/menu.inc';
-$form->renderActive(null, null, Horde::applicationUrl('delete.php'), 'post');
+$form->renderActive(null, null, Horde::url('delete.php'), 'post');
require $registry->get('templates', 'horde') . '/common-footer.inc';
require_once BEATNIK_BASE . '/lib/Forms/EditRecord.php';
$vars = Horde_Variables::getDefaultVariables();
-$url = Horde::applicationUrl('editrec.php');
+$url = Horde::url('editrec.php');
list($type, $record) = $beatnik->driver->getRecord(Horde_Util::getFormData('id'));
$form = new EditRecord($vars);
$edit = $vars->get('id');
if ($info['rectype'] == 'soa' && !$edit) {
// if added a soa redirect to the autogeneration page
- $url = Horde::applicationUrl('autogenerate.php')->add(array('rectype' => 'soa', 'curdomain' => $info['zonename']));
+ $url = Horde::url('autogenerate.php')->add(array('rectype' => 'soa', 'curdomain' => $info['zonename']));
} else {
- $url = Horde::applicationUrl('viewzone.php');
+ $url = Horde::url('viewzone.php');
}
$url->redirect();
$beatnikImgDir = Horde_Themes::img();
$menu = new Horde_Menu();
- $menu->add(Horde::applicationUrl('listzones.php'), _('List Domains'), 'website.png', $hordeImgDir);
+ $menu->add(Horde::url('listzones.php'), _('List Domains'), 'website.png', $hordeImgDir);
if (!empty($_SESSION['beatnik']['curdomain'])) {
- $menu->add(Horde_Util::addParameter(Horde::applicationUrl('editrec.php'), 'curdomain', $_SESSION['beatnik']['curdomain']['zonename']), ($editing) ? _("Edit Record") : _("Add Record"), 'edit.png', $hordeImgDir);
+ $menu->add(Horde_Util::addParameter(Horde::url('editrec.php'), 'curdomain', $_SESSION['beatnik']['curdomain']['zonename']), ($editing) ? _("Edit Record") : _("Add Record"), 'edit.png', $hordeImgDir);
} else {
- $menu->add(Horde::applicationUrl('editrec.php?rectype=soa'), _("Add Zone"), 'edit.png', $hordeImgDir);
+ $menu->add(Horde::url('editrec.php?rectype=soa'), _("Add Zone"), 'edit.png', $hordeImgDir);
}
$url = Horde_Util::addParameter(Horde::selfUrl(true), array('expertmode' => 'toggle'));
$menu->add($url, _('Expert Mode'), 'hide_panel.png', $hordeImgDir, '', null, ($_SESSION['beatnik']['expertmode']) ? 'current' : '');
if (count(Beatnik::needCommit())) {
- $url = Horde_Util::addParameter(Horde::applicationUrl('commit.php'), array('domain' => 'all'));
+ $url = Horde_Util::addParameter(Horde::url('commit.php'), array('domain' => 'all'));
$menu->add($url, _('Commit All'), 'commit-all.png', $beatnikImgDir);
}
$zonedata = $this->getRecords($_SESSION['beatnik']['curdomain']['zonename']);
} catch (Exception $e) {
$notification->push($e, 'horde.error');
- Horde::applicationUrl('listzones.php')->redirect);
+ Horde::url('listzones.php')->redirect);
}
if (isset($zonedata[$rectype])) {
require BEATNIK_TEMPLATES . '/listzones/header.inc';
foreach ($domains as $domain) {
- $autourl = Horde_Util::addParameter(Horde::applicationUrl('autogenerate.php'), array('rectype' => 'soa', 'curdomain' => $domain['zonename']));
- $deleteurl = Horde_Util::addParameter(Horde::applicationUrl('delete.php'), array('rectype' => 'soa', 'curdomain' => $domain['zonename']));
- $viewurl = Horde_Util::addParameter(Horde::applicationUrl('viewzone.php'), 'curdomain', $domain['zonename']);
- $editurl = Horde_Util::addParameter(Horde::applicationUrl('editrec.php'), array('curdomain' => $domain['zonename'], 'id' => $domain['id'], 'rectype' => 'soa'));
+ $autourl = Horde_Util::addParameter(Horde::url('autogenerate.php'), array('rectype' => 'soa', 'curdomain' => $domain['zonename']));
+ $deleteurl = Horde_Util::addParameter(Horde::url('delete.php'), array('rectype' => 'soa', 'curdomain' => $domain['zonename']));
+ $viewurl = Horde_Util::addParameter(Horde::url('viewzone.php'), 'curdomain', $domain['zonename']);
+ $editurl = Horde_Util::addParameter(Horde::url('editrec.php'), array('curdomain' => $domain['zonename'], 'id' => $domain['id'], 'rectype' => 'soa'));
require BEATNIK_TEMPLATES . '/listzones/row.inc';
}
require BEATNIK_TEMPLATES . '/listzones/footer.inc';
?>
</span>
<span style="float:right">
- <form action="<?php echo Horde::applicationUrl('viewzone.php') ?>" method="get" name="menu">
+ <form action="<?php echo Horde::url('viewzone.php') ?>" method="get" name="menu">
<?php Horde_Util::pformInput(); ?>
<label for="domain" accesskey="<?php echo $accesskey ?>">
<select id="domainSelector" name="curdomain"
*/
if (Beatnik::needCommit($_SESSION['beatnik']['curdomain']['zonename'])) {
- $commit = Horde_Util::addParameter(Horde::applicationUrl('commit.php'), array('domain' => 'current'));
+ $commit = Horde_Util::addParameter(Horde::url('commit.php'), array('domain' => 'current'));
echo Horde::link($commit, _('Commit Changes'), 'button') . _('Commit Changes') . '</a><br /><br />';
}
?>
$zonedata = $beatnik->driver->getRecords($_SESSION['beatnik']['curdomain']['zonename']);
} catch (Exception $e) {
$notification->push($e, 'horde.error');
- Horde::applicationUrl('listzones.php')->redirect();
+ Horde::url('listzones.php')->redirect();
}
$title = $_SESSION['beatnik']['curdomain']['zonename'];
}
$img_dir = Horde_Themes::img(null, 'horde');
-$delete = Horde_Util::addParameter(Horde::applicationUrl('delete.php'), 'curdomain', $_SESSION['beatnik']['curdomain']['zonename']);
-$edit = Horde_Util::addParameter(Horde::applicationUrl('editrec.php'), 'curdomain', $_SESSION['beatnik']['curdomain']['zonename']);
+$delete = Horde_Util::addParameter(Horde::url('delete.php'), 'curdomain', $_SESSION['beatnik']['curdomain']['zonename']);
+$edit = Horde_Util::addParameter(Horde::url('editrec.php'), 'curdomain', $_SESSION['beatnik']['curdomain']['zonename']);
$rectypes = Beatnik::getRecTypes();
require BEATNIK_TEMPLATES . '/view/header.inc';
Horde::addScriptFile('annotate.js', 'chora');
$js_vars = array(
- 'ANNOTATE_URL' => (string)Horde::applicationUrl('annotate.php', true)->add(array('actionID' => 'log', 'f' => $where, 'rev' => '')),
+ 'ANNOTATE_URL' => (string)Horde::url('annotate.php', true)->add(array('actionID' => 'log', 'f' => $where, 'rev' => '')),
'loading_text' => _("Loading...")
);
$arglist['f'] = $uri;
}
- return Horde::applicationUrl($script)->add($arglist)->setAnchor($anchor);
+ return Horde::url($script)->add($arglist)->setAnchor($anchor);
}
print_r($addform->getInfo());
}
-$url = Horde::applicationUrl('addclient.php');
+$url = Horde::url('addclient.php');
$title = _("Add New Client");
require CRUMB_TEMPLATES . '/common-header.inc';
echo "Success!";
}
-$url = Horde::applicationUrl(basename(__FILE__));
+$url = Horde::url(basename(__FILE__));
$title = $searchform->getTitle();
require CRUMB_TEMPLATES . '/common-header.inc';
global $conf, $registry, $browser, $print_link;
$menu = new Horde_Menu(Horde_Menu::MASK_ALL);
- $menu->add(Horde::applicationUrl('listclients.php'), _("List Clients"), 'user.png', Horde_Themes::img(null, 'horde'));
- $menu->add(Horde::applicationUrl('addclient.php'), _("Add Client"), 'user.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde::url('listclients.php'), _("List Clients"), 'user.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde::url('addclient.php'), _("Add Client"), 'user.png', Horde_Themes::img(null, 'horde'));
return $menu;
}
$html = '<div id="page">';
$js = '<script type="text/javascript">' . "\n";
$js .= 'var confirm_remove = "' . _("Are sure to remove this block?") . '";' . "\n";
- $js .= 'var edit_url = "' . Horde::applicationUrl('dragdrop/params.php') . '";' . "\n";
- $js .= 'var load_url = "' . Horde::applicationUrl('dragdrop/block.php') . '";' . "\n";
- $js .= 'var list_url = "' . Horde::applicationUrl('dragdrop/select.php') . '";' . "\n";
- $js .= 'var save_url = "' . Horde::applicationUrl('dragdrop/save.php') . '";' . "\n";
+ $js .= 'var edit_url = "' . Horde::url('dragdrop/params.php') . '";' . "\n";
+ $js .= 'var load_url = "' . Horde::url('dragdrop/block.php') . '";' . "\n";
+ $js .= 'var list_url = "' . Horde::url('dragdrop/select.php') . '";' . "\n";
+ $js .= 'var save_url = "' . Horde::url('dragdrop/save.php') . '";' . "\n";
$js_init = '<script type="text/javascript">'
. ' function init() {'
/* Redirect to the account list if no action has been requested. */
$actionID = $vars->get('actionID');
if (is_null($actionID)) {
- Horde::applicationUrl('accounts.php', true)->redirect();
+ Horde::url('accounts.php', true)->redirect();
}
/* Get ledger. */
$share = &$GLOBALS['fima_shares']->getShare($ledger);
if (is_a($share, 'PEAR_Error')) {
$notification->push(sprintf(_("Access denied on account: %s"), $share->getMessage()), 'horde.error');
- Horde::applicationUrl('accounts.php', true)->redirect();
+ Horde::url('accounts.php', true)->redirect();
}
$ledger_name = $share->get('name');
}
/* Return to the accounts. */
- Horde::applicationUrl('accounts.php', true)->redirect();
+ Horde::url('accounts.php', true)->redirect();
case 'save_account':
if ($vars->get('submitbutton') == _("Delete this account")) {
/* Redirect to the delete form. */
$account_id = $vars->get('account_id');
- header('Location: ' . Horde_Util::addParameter(Horde::applicationUrl('account.php', true), array('account' => $account_id, 'actionID' => 'delete_account'), null, false));
+ header('Location: ' . Horde_Util::addParameter(Horde::url('account.php', true), array('account' => $account_id, 'actionID' => 'delete_account'), null, false));
exit;
}
$form->getInfo($vars, $info);
if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
$notification->push(sprintf(_("Access denied saving account to %s."), $share->get('name')), 'horde.error');
- Horde::applicationUrl('accounts.php', true)->redirect();
+ Horde::url('accounts.php', true)->redirect();
}
$storage = &Fima_Driver::singleton($ledger);
$notification->push(sprintf(_("Saved %s."), trim($info['number_new'] . ' ' . $info['name'])), 'horde.success');
/* Return to the accounts. */
if ($vars->get('submitbutton') == _("Save and New")) {
- header('Location: ' . Horde_Util::addParameter(Horde::applicationUrl('account.php', true), array('account' => $vars->get('parent_id'), 'actionID' => 'add_account'), null, false));
+ header('Location: ' . Horde_Util::addParameter(Horde::url('account.php', true), array('account' => $vars->get('parent_id'), 'actionID' => 'add_account'), null, false));
exit;
}
- Horde::applicationUrl('accounts.php', true)->redirect();
+ Horde::url('accounts.php', true)->redirect();
}
break;
}
/* Return to the accounts. */
- Horde::applicationUrl('accounts.php', true)->redirect();
+ Horde::url('accounts.php', true)->redirect();
case 'purge_account':
if ($vars->get('submitbutton') == _("Edit this account")) {
/* Redirect to the edit form. */
$account_id = $vars->get('account_id');
- header('Location: ' . Horde_Util::addParameter(Horde::applicationUrl('account.php', true), array('account' => $account_id, 'actionID' => 'modify_account'), null, false));
+ header('Location: ' . Horde_Util::addParameter(Horde::url('account.php', true), array('account' => $account_id, 'actionID' => 'modify_account'), null, false));
exit;
}
$form->getInfo($vars, $info);
if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
$notification->push(sprintf(_("Access denied deleting account from %s."), $share->get('name')), 'horde.error');
- Horde::applicationUrl('accounts.php', true)->redirect();
+ Horde::url('accounts.php', true)->redirect();
}
$storage = &Fima_Driver::singleton($ledger);
} else {
$notification->push(sprintf(_("Deleted %s."), trim($info['number_new'] . ' ' . $info['name'])), 'horde.success');
/* Return to the accounts. */
- Horde::applicationUrl('accounts.php', true)->redirect();
+ Horde::url('accounts.php', true)->redirect();
}
break;
default:
- Horde::applicationUrl('accounts.php', true)->redirect();
+ Horde::url('accounts.php', true)->redirect();
}
$title = $form->getTitle();
}
/* Prepare account folder structure */
-$account_url = Horde::applicationUrl('account.php');;
-$view_url = Horde_Util::addParameter(Horde::applicationUrl('postings.php'), 'actionID', 'search_postings');
+$account_url = Horde::url('account.php');;
+$view_url = Horde_Util::addParameter(Horde::url('postings.php'), 'actionID', 'search_postings');
$accounts = array();
$accounts['root'] = array('account_id' => 'root', 'owner' => $ledger, 'number' => '', 'type' => 'root', 'name' => $share->get('name'), 'desc' => '', 'icon' => 'accounts.png', 'closed' => false, 'expanded' => true, 'parent_id' => null);
/* Print. */
$print_view = (bool)Horde_Util::getFormData('print');
if (!$print_view) {
- $print_link = Horde::applicationUrl(Horde_Util::addParameter('accounts.php', array('print' => 1)));
+ $print_link = Horde::url(Horde_Util::addParameter('accounts.php', array('print' => 1)));
}
Horde::addScriptFile('tables.js', 'horde');
// Exit if this isn't an authenticated user or if the user can't
// create new task lists (default share is locked).
if (!$GLOBALS['registry']->getAuth() || $prefs->isLocked('active_ledger')) {
- Horde::applicationUrl('postings.php', true)->redirect();
+ Horde::url('postings.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$notification->push(sprintf(_("The ledger \"%s\" has been created."), $vars->get('name')), 'horde.success');
}
- Horde::applicationUrl('ledgers/', true)->redirect();
+ Horde::url('ledgers/', true)->redirect();
}
$title = $form->getTitle();
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- Horde::applicationUrl('postings.php', true)->redirect();
+ Horde::url('postings.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$ledger_id = $vars->get('l');
if ($ledger_id == $GLOBALS['registry']->getAuth()) {
$notification->push(_("This ledger cannot be deleted."), 'horde.warning');
- Horde::applicationUrl('ledgers/', true)->redirect();
+ Horde::url('ledgers/', true)->redirect();
}
$ledger = $fima_shares->getShare($ledger_id);
if (is_a($ledger, 'PEAR_Error')) {
$notification->push($ledger, 'horde.error');
- Horde::applicationUrl('ledgers/', true)->redirect();
+ Horde::url('ledgers/', true)->redirect();
}
if ($ledger->get('owner') != $GLOBALS['registry']->getAuth()) {
$notification->push(_("You are not allowed to delete this ledger."), 'horde.error');
- Horde::applicationUrl('ledgers/', true)->redirect();
+ Horde::url('ledgers/', true)->redirect();
}
$form = new Fima_DeleteLedgerForm($vars, $ledger);
$notification->push(sprintf(_("The ledger \"%s\" has been deleted."), $ledger->get('name')), 'horde.success');
}
- Horde::applicationUrl('ledgers/', true)->redirect();
+ Horde::url('ledgers/', true)->redirect();
}
$title = $form->getTitle();
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- Horde::applicationUrl('postings.php', true)->redirect();
+ Horde::url('postings.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$ledger = $fima_shares->getShare($vars->get('l'));
if (is_a($ledger, 'PEAR_Error')) {
$notification->push($ledger, 'horde.error');
- Horde::applicationUrl('ledgers/', true)->redirect();
+ Horde::url('ledgers/', true)->redirect();
}
if ($ledger->get('owner') != $GLOBALS['registry']->getAuth()) {
$notification->push(_("You are not allowed to change this ledger."), 'horde.error');
- Horde::applicationUrl('ledgers/', true)->redirect();
+ Horde::url('ledgers/', true)->redirect();
}
$form = new Fima_EditLedgerForm($vars, $ledger);
}
}
- Horde::applicationUrl('ledgers/', true)->redirect();
+ Horde::url('ledgers/', true)->redirect();
}
$vars->set('name', $ledger->get('name'));
exit;
}
-$edit_url_base = Horde::applicationUrl('ledgers/edit.php');
+$edit_url_base = Horde::url('ledgers/edit.php');
$perms_url_base = Horde::url($registry->get('webroot', 'horde') . '/services/shares/edit.php?app=fima', true);
-$delete_url_base = Horde::applicationUrl('ledgers/delete.php');
+$delete_url_base = Horde::url('ledgers/delete.php');
// Get the shares owned by the current user, and figure out what we will
// display the share name as to the user.
$label = !empty($this->_params['block_title'])
? $this->_params['block_title']
: $registry->get('name');
- return Horde::link(Horde::applicationUrl($registry->getInitialPage(), true))
+ return Horde::link(Horde::url($registry->getInitialPage(), true))
. htmlspecialchars($label) . '</a>';
}
function _buildTree(&$tree, $indent = 0, $parent = null)
{
$menus = array(
- array('add', _("Add Postings"), 'add.png', Horde_Util::addParameter(Horde::applicationUrl('postings.php'), 'actionID', 'add_postings')),
- array('search', _("Search"), 'search.png', Horde::applicationUrl('search.php')),
- array('accounts', _("Accounts"), 'accounts.png', Horde::applicationUrl('accounts.php')),
- array('reports', _("Reports"), 'report.png', Horde::applicationUrl('report.php'))
+ array('add', _("Add Postings"), 'add.png', Horde_Util::addParameter(Horde::url('postings.php'), 'actionID', 'add_postings')),
+ array('search', _("Search"), 'search.png', Horde::url('search.php')),
+ array('accounts', _("Accounts"), 'accounts.png', Horde::url('accounts.php')),
+ array('reports', _("Reports"), 'report.png', Horde::url('report.php'))
);
foreach ($menus as $menu) {
$hordeimg = Horde_Themes::img(null, 'horde');
$menu = new Horde_Menu(Horde_Menu::MASK_ALL);
- $menu->add(Horde::applicationUrl('postings.php'), _("_List Postings"), 'list.png', null, null, null, (basename($_SERVER['PHP_SELF']) == 'index.php' && basename(dirname($_SERVER['PHP_SELF'])) != 'ledgers') ? 'current' : ($actionID === null ? null : '__noselection'));
- $menu->add(Horde_Util::addParameter(Horde::applicationUrl('postings.php'), 'actionID', 'add_postings'), _("Add _Postings"), 'add.png', null, null, null, $actionID == 'add_postings' ? 'current' : '__noselection');
- $menu->add(Horde::applicationUrl('search.php'), _("Search"), 'search.png', $hordeimg);
- $menu->add(Horde::applicationUrl('accounts.php'), _("_Accounts"), 'accounts.png');
+ $menu->add(Horde::url('postings.php'), _("_List Postings"), 'list.png', null, null, null, (basename($_SERVER['PHP_SELF']) == 'index.php' && basename(dirname($_SERVER['PHP_SELF'])) != 'ledgers') ? 'current' : ($actionID === null ? null : '__noselection'));
+ $menu->add(Horde_Util::addParameter(Horde::url('postings.php'), 'actionID', 'add_postings'), _("Add _Postings"), 'add.png', null, null, null, $actionID == 'add_postings' ? 'current' : '__noselection');
+ $menu->add(Horde::url('search.php'), _("Search"), 'search.png', $hordeimg);
+ $menu->add(Horde::url('accounts.php'), _("_Accounts"), 'accounts.png');
if ($GLOBALS['registry']->getAuth()) {
- $menu->add(Horde::applicationUrl('ledgers/index.php'), _("_My Ledgers"), 'accounts.png');
+ $menu->add(Horde::url('ledgers/index.php'), _("_My Ledgers"), 'accounts.png');
}
/* Reports. */
- $menu->add(Horde::applicationUrl('report.php'), _("_Reports"), 'report.png');
+ $menu->add(Horde::url('report.php'), _("_Reports"), 'report.png');
/* Import/Export. */
- $menu->add(Horde::applicationUrl('data.php'), _("_Import/Export"), 'data.png', $hordeimg);
+ $menu->add(Horde::url('data.php'), _("_Import/Export"), 'data.png', $hordeimg);
/* Print. */
if (isset($print_link)) {
/* Create page array. */
$pageOb = array();
-$pageOb['url'] = Horde::applicationUrl('postings.php');
+$pageOb['url'] = Horde::url('postings.php');
if (($pageOb['page'] = Horde_Util::getFormData('page')) === null) {
$pageOb['page'] = $prefs->getValue('startpage');
}
$share = &$GLOBALS['fima_shares']->getShare($ledger);
if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
$notification->push(sprintf(_("Access denied saving postings to %s."), $share->get('name')), 'horde.error');
- Horde::applicationUrl('postings.php', true)->redirect();
+ Horde::url('postings.php', true)->redirect();
}
if ($postingset !== null) {
$pageOb['mode'] = 'edit';
$notification->push(sprintf(_("%d postings not saved."), count($postings)), 'horde.error');
} else {
/* Return to the posting list. */
- Horde::applicationUrl('postings.php', true)->redirect();
+ Horde::url('postings.php', true)->redirect();
}
} else {
/* Return to the posting list. */
- Horde::applicationUrl('postings.php', true)->redirect();
+ Horde::url('postings.php', true)->redirect();
}
break;
$share = &$GLOBALS['fima_shares']->getShare($ledger);
if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
$notification->push(sprintf(_("Access denied deleting postings from %s."), $share->get('name')), 'horde.error');
- Horde::applicationUrl('postings.php', true)->redirect();
+ Horde::url('postings.php', true)->redirect();
}
if ($postingset !== null) {
$storage = &Fima_Driver::singleton($ledger);
}
/* Return to the posting list. */
- Horde::applicationUrl('postings.php', true)->redirect();
+ Horde::url('postings.php', true)->redirect();
case 'update_postings':
/* Get the form values. */
$share = &$GLOBALS['fima_shares']->getShare($ledger);
if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
$notification->push(sprintf(_("Access denied shifting postings in %s."), $share->get('name')), 'horde.error');
- Horde::applicationUrl('postings.php', true)->redirect();
+ Horde::url('postings.php', true)->redirect();
}
if ($postingset !== null) {
$posting_type = Horde_Util::getFormData('type');
}
/* Return to the posting list. */
- Horde::applicationUrl('postings.php', true)->redirect();
+ Horde::url('postings.php', true)->redirect();
case 'copymove_postings':
$share = &$GLOBALS['fima_shares']->getShare($ledger);
if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
$notification->push(sprintf(_("Access denied transfering postings in %s."), $share->get('name')), 'horde.error');
- Horde::applicationUrl('postings.php', true)->redirect();
+ Horde::url('postings.php', true)->redirect();
}
if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE) && (!Horde_Util::getFormData('keep') || Horde_Util::getFormData('delete'))) {
$notification->push(sprintf(_("Access denied transfering postings in %s."), $share->get('name')), 'horde.error');
- Horde::applicationUrl('postings.php', true)->redirect();
+ Horde::url('postings.php', true)->redirect();
}
$type_from = Horde_Util::getFormData('type_from');
$period_from = Horde_Util::getFormData('period_from');
}
/* Return to the posting list. */
- Horde::applicationUrl('postings.php', true)->redirect();
+ Horde::url('postings.php', true)->redirect();
default:
break;
/* Print. */
$print_view = (bool)Horde_Util::getFormData('print');
if (!$print_view && $pageOb['mode'] == 'list') {
- $print_link = Horde_Util::addParameter(Horde::applicationUrl('postings.php'), array('print' => 1));
+ $print_link = Horde_Util::addParameter(Horde::url('postings.php'), array('print' => 1));
}
/* Filters. */
$params['title'] = $_reports[$params['report_id']];
/* Build report url. */
- $params['url'] = Horde_Util::addParameter(Horde::applicationUrl('report.php'), 'actionID', 'display_report');
+ $params['url'] = Horde_Util::addParameter(Horde::url('report.php'), 'actionID', 'display_report');
/* Add params from options. */
$params['graphsize'] = $prefs->getValue('report_graphsize');
$accountExtra = '';
if (!$print_view) {
if ($perm_delete && $accountId == 'root') { $accountExtra .= ' '.Horde::link('#', _("Delete all"), '', '', "Submit('delete_all'); return false;") . Horde::img('delete-small.png', _("Delete")) . '</a>'; }
- if ($perm_edit && isset($account['edit_link'])) { $accountExtra .= ' '.Horde::link(Horde::applicationUrl($account['edit_link']), sprintf(_("Edit %s"), $accountLabel)) . Horde::img('edit-small.png', _("Edit")) . '</a>'; }
- if ($perm_delete && isset($account['delete_link'])) { $accountExtra .= ' '.Horde::link(Horde::applicationUrl($account['delete_link']), sprintf(_("Delete %s"), $accountLabel)) . Horde::img('delete-small.png', _("Delete")) . '</a>'; }
- if ($perm_edit && isset($account['add_link'])) { $accountExtra .= ' '.Horde::link(Horde::applicationUrl($account['add_link']), _("Create a New Account")) . Horde::img('new-small.png', '+') . '</a>'; }
- if ( isset($account['view_link'])) { $accountExtra .= ' '.Horde::link(Horde::applicationUrl($account['view_link']), sprintf(_("View %s"), $accountLabel)) . Horde::img('search-small.png', _("Search")) . '</a>'; }
+ if ($perm_edit && isset($account['edit_link'])) { $accountExtra .= ' '.Horde::link(Horde::url($account['edit_link']), sprintf(_("Edit %s"), $accountLabel)) . Horde::img('edit-small.png', _("Edit")) . '</a>'; }
+ if ($perm_delete && isset($account['delete_link'])) { $accountExtra .= ' '.Horde::link(Horde::url($account['delete_link']), sprintf(_("Delete %s"), $accountLabel)) . Horde::img('delete-small.png', _("Delete")) . '</a>'; }
+ if ($perm_edit && isset($account['add_link'])) { $accountExtra .= ' '.Horde::link(Horde::url($account['add_link']), _("Create a New Account")) . Horde::img('new-small.png', '+') . '</a>'; }
+ if ( isset($account['view_link'])) { $accountExtra .= ' '.Horde::link(Horde::url($account['view_link']), sprintf(_("View %s"), $accountLabel)) . Horde::img('search-small.png', _("Search")) . '</a>'; }
}
$tree->addNode($accountId, $account['parent_id'], $accountLabel, 0, $print_view ? true : $account['expanded'], $params, $accountExtra);
}
-<form method="post" name="export" action="<?php echo Horde::downloadUrl(_("postings.csv"), null, Horde::applicationUrl('data.php')) ?>">
+<form method="post" name="export" action="<?php echo Horde::downloadUrl(_("postings.csv"), null, Horde::url('data.php')) ?>">
<?php echo Horde_Util::formInput() ?>
<input type="hidden" name="actionID" value="export" />
<?php if ($pageOb['mode'] == 'list'): ?>
<?php echo Horde::link($pageOb['url'], _("Refresh List")) . Horde::img('reload.png', _("Refresh List")) ?> </a>
<?php if (!isset($_SESSION['fima_search'])): ?>
- <?php echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'search_type', $prefs->getValue('active_postingtype')), _("Search Postings")) . Horde::img('search.png', _("Search")) ?></a>
+ <?php echo Horde::link(Horde_Util::addParameter(Horde::url('search.php'), 'search_type', $prefs->getValue('active_postingtype')), _("Search Postings")) . Horde::img('search.png', _("Search")) ?></a>
<?php else: ?>
- <?php echo Horde::link(Horde::applicationUrl('search.php'), _("Edit Search Query")) . Horde::img('edit.png', _("Edit Search Query")) ?></a>
+ <?php echo Horde::link(Horde::url('search.php'), _("Edit Search Query")) . Horde::img('edit.png', _("Edit Search Query")) ?></a>
<?php echo Horde::link(Horde_Util::addParameter($pageOb['url'], 'actionID', 'clear_search'), _("Clear Search Query")) . Horde::img('delete.png', _("Clear Search Query")) ?></a>
<?php endif; ?>
<?php endif; ?>
<div class="rightFloat">
<?php if ($pageOb['page_count'] > 1): ?>
- <form method="get" name="pagenav" action="<?php echo Horde::applicationUrl('postings.php') ?>">
+ <form method="get" name="pagenav" action="<?php echo Horde::url('postings.php') ?>">
<?php Horde_Util::pformInput() ?>
<?php echo $pageOb['pages_first'] . ' ' . $pageOb['pages_prev'] ?>
<input type="text" name="page" value="<?php echo htmlspecialchars($pageOb['page']) ?>" size="<?php echo Horde_String::length($pageOb['page_count']) ?>" />
<div class="header">
<?php echo htmlspecialchars($title) ?>
<?php if (isset($_SESSION['fima_search'])): ?>
-<?php echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'actionID', 'clear_search'), _("Clear Search Query")) . Horde::img('delete.png', _("Clear Search Query")) ?></a>
+<?php echo Horde::link(Horde_Util::addParameter(Horde::url('search.php'), 'actionID', 'clear_search'), _("Clear Search Query")) . Horde::img('delete.png', _("Clear Search Query")) ?></a>
<?php endif; ?>
</div>
$vars = Horde_Variables::getDefaultVariables();
$tabs = new Horde_Core_Ui_Tabs('what', $vars);
-$tabs->addTab(_("Login"), Horde::applicationUrl('login.php'), 'login');
+$tabs->addTab(_("Login"), Horde::url('login.php'), 'login');
if ($conf['signup']['allow'] === true && $auth->hasCapability('add')) {
- $tabs->addTab(_("Don't have an account? Sign up."), Horde::applicationUrl('account/signup.php'), 'signup');
+ $tabs->addTab(_("Don't have an account? Sign up."), Horde::url('account/signup.php'), 'signup');
}
if ($auth->hasCapability('resetpassword')) {
- $tabs->addTab(_("Forgot your password?"), Horde::applicationUrl('account/resetpassword.php'), 'resetpassword');
+ $tabs->addTab(_("Forgot your password?"), Horde::url('account/resetpassword.php'), 'resetpassword');
}
-$tabs->addTab(_("Forgot your username?"), Horde::applicationUrl('account/username.php'), 'username');
+$tabs->addTab(_("Forgot your username?"), Horde::url('account/username.php'), 'username');
require_once $GLOBALS['registry']->get('fileroot', 'folks') . '/lib/Folks.php';
$code = Folks::encodeString($userID, 'activate' . hash('md5', $extra['password']));
- $link = Horde_Util::addParameter(Horde::applicationUrl('account/approve.php', true, -1),
+ $link = Horde_Util::addParameter(Horde::url('account/approve.php', true, -1),
array('user' => $userID, 'code' => $code),
null, false);
$notification->push($result);
} else {
$notification->push(_("Activity successfully deleted"), 'horde.success');
- Horde::applicationUrl('edit/activity.php')->redirect();
+ Horde::url('edit/activity.php')->redirect();
}
}
$notification->push($result);
} else {
$notification->push(_("Activity successfully posted"), 'horde.success');
- Horde::applicationUrl('edit/activity.php')->redirect();
+ Horde::url('edit/activity.php')->redirect();
}
}
Folks::getUrlFor('list', 'list')->redirect();
}
-$delete_url = Horde::applicationUrl('edit/activity.php');
+$delete_url = Horde::url('edit/activity.php');
$delete_img = Horde::img('delete.png');
Horde::addScriptFile('tables.js', 'horde');
} else {
$folks_driver->logActivity(_("Updated his/her profile picture."));
}
- Horde::applicationUrl('edit/edit.php')->redirect();
+ Horde::url('edit/edit.php')->redirect();
}
break;
// Check FB installation
if (!$conf['facebook']['enabled']) {
$notification->push(sprintf(_("Could not find authorization for %s to interact with your Facebook account."), $GLOBALS['registry']->get('name', 'horde')));
- Horde::applicationUrl('user.php')->redirect();
+ Horde::url('user.php')->redirect();
}
// Load horde central block
$block = $registry->call('horde/blockContent', array('horde', 'fb_summary'));
} catch (Horde_Exception $e) {
$notification->push($e);
- Horde::applicationUrl('user.php')->redirect();
+ Horde::url('user.php')->redirect();
}
require FOLKS_TEMPLATES . '/common-header.inc';
$notification->push($result);
} else {
$notification->push(sprintf(_("User \"%s\" was removed from your friend list."), $user), 'horde.success');
- Horde::applicationUrl('edit/friends/index.php')->redirect();
+ Horde::url('edit/friends/index.php')->redirect();
}
} else {
$result = $friends->addFriend($user);
$body = sprintf(_("User %s added you to his firends list on %s. \nTo approve, go to: %s \nTo reject, go to: %s \nTo see to his profile, go to: %s \n"),
$GLOBALS['registry']->getAuth(),
$registry->get('name', 'horde'),
- Horde_Util::addParameter(Horde::applicationUrl('edit/friends/approve.php', true, -1), 'user', $GLOBALS['registry']->getAuth()),
- Horde_Util::addParameter(Horde::applicationUrl('edit/friends/reject.php', true, -1), 'user', $GLOBALS['registry']->getAuth()),
+ Horde_Util::addParameter(Horde::url('edit/friends/approve.php', true, -1), 'user', $GLOBALS['registry']->getAuth()),
+ Horde_Util::addParameter(Horde::url('edit/friends/reject.php', true, -1), 'user', $GLOBALS['registry']->getAuth()),
Folks::getUrlFor('user', $GLOBALS['registry']->getAuth(), true, -1));
$result = $friends->sendNotification($user, $title, $body);
if ($result instanceof PEAR_Error) {
} else {
$notification->push(sprintf(_("A confirmation was send to \"%s\"."), $user), 'horde.warning');
}
- Horde::applicationUrl('edit/friends/index.php')->redirect();
+ Horde::url('edit/friends/index.php')->redirect();
} else {
$notification->push(sprintf(_("User \"%s\" was added as your friend."), $user), 'horde.success');
- Horde::applicationUrl('edit/friends/index.php')->redirect();
+ Horde::url('edit/friends/index.php')->redirect();
}
}
}
$user = Horde_Util::getGet('user');
if (empty($user)) {
$notification->push(_("You must supply a username."));
- Horde::applicationUrl('edit/friends/index.php')->redirect();
+ Horde::url('edit/friends/index.php')->redirect();
}
$friends = Folks_Friends::singleton();
if ($result instanceof PEAR_Error) {
$notification->push($result);
$notification->push($result->getDebugInfo());
- Horde::applicationUrl('edit/friends/index.php')->redirect();
+ Horde::url('edit/friends/index.php')->redirect();
}
$notification->push(sprintf(_("User \"%s\" was confirmed as a friend."), $user), 'horde.success');
$link = '<a href="' . Folks::getUrlFor('user', $user) . '">' . $user . '</a>';
$folks_driver->logActivity(sprintf(_("Added user %s as a friend."), $link));
-Horde::applicationUrl('edit/friends/index.php')->redirect();
+Horde::url('edit/friends/index.php')->redirect();
$notification->push($result);
} else {
$notification->push(sprintf(_("User \"%s\" was removed from your blacklist."), $user), 'horde.success');
- Horde::applicationUrl('edit/friends/blacklist.php')->redirect();
+ Horde::url('edit/friends/blacklist.php')->redirect();
}
} else {
$result = $friends->addBlacklisted($user);
$notification->push($result);
} else {
$notification->push(sprintf(_("User \"%s\" was added to your blacklist."), $user), 'horde.success');
- Horde::applicationUrl('edit/friends/blacklist.php')->redirect();
+ Horde::url('edit/friends/blacklist.php')->redirect();
}
}
}
// Prepare actions
$actions = array(
- array('url' => Horde::applicationUrl('edit/friends/blacklist.php'),
+ array('url' => Horde::url('edit/friends/blacklist.php'),
'img' => Horde::img('delete.png'),
'id' => 'user',
'name' => _("Remove")),
- array('url' => Horde::applicationUrl('user.php'),
+ array('url' => Horde::url('user.php'),
'img' => Horde::img('user.png'),
'id' => 'user',
'name' => _("View profile")));
// Prepare actions
$actions = array(
- array('url' => Horde::applicationUrl('user.php'),
+ array('url' => Horde::url('user.php'),
'img' => Horde::img('user.png'),
'id' => 'user',
'name' => _("View profile")),
- array('url' => Horde::applicationUrl('edit/friends/approve.php'),
+ array('url' => Horde::url('edit/friends/approve.php'),
'img' => Horde::img('tick.png'),
'id' => 'user',
'name' => _("Approve")),
- array('url' => Horde::applicationUrl('edit/friends/reject.php'),
+ array('url' => Horde::url('edit/friends/reject.php'),
'img' => Horde::img('cross.png'),
'id' => 'user',
'name' => _("Reject")));
// Prepare actions
$actions = array(
- array('url' => Horde::applicationUrl('edit/friends/add.php'),
+ array('url' => Horde::url('edit/friends/add.php'),
'img' => Horde::img('delete.png'),
'id' => 'user',
'name' => _("Remove")),
- array('url' => Horde::applicationUrl('user.php'),
+ array('url' => Horde::url('user.php'),
'img' => Horde::img('user.png'),
'id' => 'user',
'name' => _("View profile")));
// Prepare actions
$actions = array(
- array('url' => Horde::applicationUrl('user.php'),
+ array('url' => Horde::url('user.php'),
'img' => Horde::img('user.png'),
'id' => 'user',
'name' => _("View profile")));
$notification->push(sprintf(_("Group \"%s\" has been deleted."), $groups[$g]), 'horde.success');
}
- Horde::applicationUrl('edit/groups.php')->redirect();
+ Horde::url('edit/groups.php')->redirect();
break;
if (Horde_Util::getFormData('submitbutton') == _("Cancel")) {
$notification->push(sprintf(_("Group \"%s\" has not been renamed."), $groups[$g]), 'horde.warning');
- Horde::applicationUrl('edit/groups.php')->redirect();
+ Horde::url('edit/groups.php')->redirect();
} elseif (Horde_Util::getFormData('submitbutton') == _("Rename")) {
$new_name = Horde_Util::getFormData('new_name');
$result = $friends->renameGroup($g, $new_name);
$notification->push($result);
} else {
$notification->push(sprintf(_("Group \"%s\" has been renamed to \"%s\"."), $groups[$g], $new_name), 'horde.success');
- Horde::applicationUrl('edit/groups.php')->redirect();
+ Horde::url('edit/groups.php')->redirect();
}
}
$name = $translated[$info['translated_name']];
}
$notification->push(sprintf(_("Group \"%s\" was success added."), $name), 'horde.success');
- Horde::applicationUrl('edit/groups.php')->redirect();
+ Horde::url('edit/groups.php')->redirect();
}
}
break;
}
-$remove_url = Horde_Util::addParameter(Horde::applicationUrl('edit/friends/groups.php'), 'action', 'delete');
+$remove_url = Horde_Util::addParameter(Horde::url('edit/friends/groups.php'), 'action', 'delete');
$remove_img = Horde::img('delete.png');
-$edit_url = Horde_Util::addParameter(Horde::applicationUrl('edit/friends/groups.php'), 'action', 'edit');
+$edit_url = Horde_Util::addParameter(Horde::url('edit/friends/groups.php'), 'action', 'edit');
$edit_img = Horde::img('edit.png');
-$perms_url = Horde::applicationUrl('perms.php');
+$perms_url = Horde::url('perms.php');
$perms_img = Horde::img('perms.png');
-$members_url = Horde::applicationUrl('edit/friends/friends.php');
+$members_url = Horde::url('edit/friends/friends.php');
$members_img = Horde::img('group.png');
require FOLKS_TEMPLATES . '/common-header.inc';
// Prepare actions
$actions = array(
- array('url' => Horde::applicationUrl('edit/friends/add.php'),
+ array('url' => Horde::url('edit/friends/add.php'),
'img' => Horde::img('delete.png');
'id' => 'user',
'name' => _("Remove")),
- array('url' => Horde::applicationUrl('user.php'),
+ array('url' => Horde::url('user.php'),
'img' => Horde::img('user.png');
'id' => 'user',
'name' => _("View profile")));
$body = Horde::loadConfiguration('invite.php', 'body', 'folks');
$body = sprintf($body, $registry->get('name', 'horde'),
Folks::getUrlFor('user', $GLOBALS['registry']->getAuth(), true),
- Horde::applicationUrl('account/signup.php', true),
+ Horde::url('account/signup.php', true),
$GLOBALS['registry']->getAuth());
} catch (Horde_Exception $e) {
$body = $body->getMessage();
// Prepare actions
$actions = array(
- array('url' => Horde::applicationUrl('edit/friends/add.php'),
+ array('url' => Horde::url('edit/friends/add.php'),
'img' => Horde::img('delete.png');
'id' => 'user',
'name' => _("Add")),
- array('url' => Horde::applicationUrl('user.php'),
+ array('url' => Horde::url('user.php'),
'img' => Horde::img('user.png');
'id' => 'user',
'name' => _("View profile")));
// Prepare actions
$actions = array(
- array('url' => Horde::applicationUrl('user.php'),
+ array('url' => Horde::url('user.php'),
'img' => Horde::img('user.png'),
'id' => 'user',
'name' => _("View profile")));
$user = Horde_Util::getGet('user');
if (empty($user)) {
$notification->push(_("You must supply a username."));
- Horde::applicationUrl('edit/friends/index.php')->redirect();
+ Horde::url('edit/friends/index.php')->redirect();
}
$friends = Folks_Friends::singleton(null, array('user' => $user));
$result = $friends->removeFriend($GLOBALS['registry']->getAuth());
if ($result instanceof PEAR_Error) {
$notification->push($result);
- Horde::applicationUrl('edit/friends/index.php')->redirect();
+ Horde::url('edit/friends/index.php')->redirect();
}
$notification->push(sprintf(_("User \"%s\" was rejected as a friend."), $user), 'horde.success');
$friends->sendNotification($user, $title, $body);
-Horde::applicationUrl('edit/friends/index.php')->redirect();
+Horde::url('edit/friends/index.php')->redirect();
$notification->push($result);
} else {
$notification->push(_("Your data were successfully updated."), 'horde.success');
- Horde::applicationUrl('edit/privacy.php')->redirect();
+ Horde::url('edit/privacy.php')->redirect();
}
}
$vars = Horde_Variables::getDefaultVariables();
$tabs = new Horde_Core_Ui_Tabs('what', $vars);
-$tabs->addTab(_("Edit my profile"), Horde::applicationUrl('edit/edit.php'), 'edit');
-$tabs->addTab(_("Privacy"), Horde::applicationUrl('edit/privacy.php'), 'privacy');
-$tabs->addTab(_("Blacklist"), Horde::applicationUrl('edit/friends/blacklist.php'), 'blacklist');
-$tabs->addTab(_("Friends"), Horde::applicationUrl('edit/friends/index.php'), 'friends');
-$tabs->addTab(_("Groups"), Horde::applicationUrl('edit/friends/groups.php'), 'groups');
-$tabs->addTab(_("Activity"), Horde::applicationUrl('edit/activity.php'), 'activity');
-$tabs->addTab(_("Password"), Horde::applicationUrl('edit/password.php'), 'password');
+$tabs->addTab(_("Edit my profile"), Horde::url('edit/edit.php'), 'edit');
+$tabs->addTab(_("Privacy"), Horde::url('edit/privacy.php'), 'privacy');
+$tabs->addTab(_("Blacklist"), Horde::url('edit/friends/blacklist.php'), 'blacklist');
+$tabs->addTab(_("Friends"), Horde::url('edit/friends/index.php'), 'friends');
+$tabs->addTab(_("Groups"), Horde::url('edit/friends/groups.php'), 'groups');
+$tabs->addTab(_("Activity"), Horde::url('edit/activity.php'), 'activity');
+$tabs->addTab(_("Password"), Horde::url('edit/password.php'), 'password');
if ($conf['comments']['allow'] != 'never'
&& $registry->hasMethod('forums/doComments')) {
- $tabs->addTab(_("Comments"), Horde::applicationUrl('edit/comments.php'), 'comments');
+ $tabs->addTab(_("Comments"), Horde::url('edit/comments.php'), 'comments');
}
if ($conf['facebook']['enabled']) {
- $tabs->addTab(_("Facebook"), Horde::applicationUrl('edit/facebook.php'), 'facebook');
+ $tabs->addTab(_("Facebook"), Horde::url('edit/facebook.php'), 'facebook');
}
$notification->push($result);
} else {
$notification->push(_("Activity successfully posted"), 'horde.success');
- Horde::applicationUrl('friends.php')->redirect();
+ Horde::url('friends.php')->redirect();
}
}
// Prepare actions
$actions = array(
- array('url' => Horde::applicationUrl('user.php'),
+ array('url' => Horde::url('user.php'),
'id' => 'user',
'name' => _("View profile")));
if ($GLOBALS['registry']->hasInterface('letter')) {
// Prepare actions
$actions = array(
- array('url' => Horde::applicationUrl('edit/friends/add.php'),
+ array('url' => Horde::url('edit/friends/add.php'),
'id' => 'user',
'name' => _("Add friend")),
- array('url' => Horde::applicationUrl('user.php'),
+ array('url' => Horde::url('user.php'),
'id' => 'user',
'name' => _("View profile")));
if ($GLOBALS['registry']->hasInterface('letter')) {
// Prepare actions
$actions = array(
- array('url' => Horde::applicationUrl('user.php'),
+ array('url' => Horde::url('user.php'),
'id' => 'user',
'name' => _("View profile")));
if ($GLOBALS['registry']->hasInterface('letter')) {
// Prepare actions
$actions = array(
- array('url' => Horde::applicationUrl('user.php'),
+ array('url' => Horde::url('user.php'),
'id' => 'user',
'name' => _("View profile")));
if ($GLOBALS['registry']->hasInterface('letter')) {
// Prepare actions
$actions = array(
- array('url' => Horde::applicationUrl('user.php'),
+ array('url' => Horde::url('user.php'),
'id' => 'user',
'name' => _("View profile")));
if ($GLOBALS['registry']->hasInterface('letter')) {
static public function getImageUrl($user, $view = 'small', $full = false)
{
if (empty($GLOBALS['conf']['images']['direct'])) {
- return Horde_Util::addParameter(Horde::applicationUrl('view.php', $full),
+ return Horde_Util::addParameter(Horde::url('view.php', $full),
array('view' => $view,
'id' => $user),
null, false);
switch ($controller) {
case 'list':
if (empty($GLOBALS['conf']['urls']['pretty'])) {
- return Horde::applicationUrl($data . '.php', $full, $append_session);
+ return Horde::url($data . '.php', $full, $append_session);
} else {
- return Horde::applicationUrl('list/' . $data, $full, $append_session);
+ return Horde::url('list/' . $data, $full, $append_session);
}
case 'feed':
if (empty($GLOBALS['conf']['urls']['pretty'])) {
- return Horde::applicationUrl('rss/' . $data . '.php', $full, $append_session);
+ return Horde::url('rss/' . $data . '.php', $full, $append_session);
} else {
- return Horde::applicationUrl('feed/' . $data, $full, $append_session);
+ return Horde::url('feed/' . $data, $full, $append_session);
}
case 'user':
if (empty($GLOBALS['conf']['urls']['pretty'])) {
- return Horde_Util::addParameter(Horde::applicationUrl('user.php', $full, $append_session), 'user', $data);
+ return Horde_Util::addParameter(Horde::url('user.php', $full, $append_session), 'user', $data);
} else {
- return Horde::applicationUrl('user/' . $data, $full, $append_session);
+ return Horde::url('user/' . $data, $full, $append_session);
}
}
}
$menu = new Horde_Menu(Horde_Menu::MASK_ALL);
$menu->add(self::getUrlFor('user', $GLOBALS['registry']->getAuth()), _("My profile"), 'myaccount.png', $img);
$menu->add(self::getUrlFor('list', 'friends'), _("Friends"), 'group.png', $img);
- $menu->add(Horde::applicationUrl('edit/edit.php'), _("Edit profile"), 'edit.png', $img);
- $menu->add(Horde::applicationUrl('services.php'), _("Services"), 'horde.png', $img);
- $menu->add(Horde::applicationUrl('search.php'), _("Search"), 'search.png', $img);
+ $menu->add(Horde::url('edit/edit.php'), _("Edit profile"), 'edit.png', $img);
+ $menu->add(Horde::url('services.php'), _("Services"), 'horde.png', $img);
+ $menu->add(Horde::url('search.php'), _("Search"), 'search.png', $img);
$menu->add(self::getUrlFor('list', 'online'), _("List"), 'group.png', $img);
return $menu;
$title = _("Friends activities");
$link = Folks::getUrlFor('list', 'online', true);
-$rss_link = Horde::applicationUrl('rss/friends.php', true);
+$rss_link = Horde::url('rss/friends.php', true);
require FOLKS_TEMPLATES . '/feed/activities.php';
$title = _("Online friends");
$link = Folks::getUrlFor('list', 'online', true);
-$rss_link = Horde::applicationUrl('rss/friends.php', true);
+$rss_link = Horde::url('rss/friends.php', true);
require FOLKS_TEMPLATES . '/feed/feed.php';
$title = _("People you might know");
$link = Folks::getUrlFor('list', 'online', true);
-$rss_link = Horde::applicationUrl('rss/friends.php', true);
+$rss_link = Horde::url('rss/friends.php', true);
require FOLKS_TEMPLATES . '/feed/feed.php';
$title = _("Online users");
$link = Folks::getUrlFor('list', 'online', true);
-$rss_link = Horde::applicationUrl('rss/online.php', true);
+$rss_link = Horde::url('rss/online.php', true);
require FOLKS_TEMPLATES . '/feed/feed.php';
$notification->push($result);
} else {
$notification->push(_("Search criteria saved successfuly"), 'horde.success');
- Horde::applicationUrl('search.php')->redirect();
+ Horde::url('search.php')->redirect();
}
} elseif ((Horde_Util::getGet('delete') == 1) && Horde_Util::getGet('query')) {
$notification->push($result);
} else {
$notification->push(_("Search criteria deleted."), 'horde.success');
- Horde::applicationUrl('search.php')->redirect();
+ Horde::url('search.php')->redirect();
}
}
}
// mail content
-$edit_url = Horde::applicationUrl('edit/edit.php', true);
+$edit_url = Horde::url('edit/edit.php', true);
$title = _("Email problem");
$body = _("Dear %s, we tried to send you an email, but if turns out that the mail is usable any more. Maybe you run over quota. If your mail is discontinued, please update your profile with the email you are using now at %s.");
'perpage' => $perpage));
$pager->preserve($criteria);
- $list_url = Horde::applicationUrl('search.php');
+ $list_url = Horde::url('search.php');
} else {
$count = 0;
$groups = array();
}
-echo '<tr><td><a href="' . Horde::applicationUrl('edit/friends/add.php') . '">' . _("Add") . '</a>';
-echo '<tr><td><a href="' . Horde::applicationUrl('edit/friends/invite.php') . '">' . _("Invite") . '</a>';
-echo '<tr><td><a href="' . Horde::applicationUrl('edit/friends/index.php') . '">' . _("All") . '</a>';
+echo '<tr><td><a href="' . Horde::url('edit/friends/add.php') . '">' . _("Add") . '</a>';
+echo '<tr><td><a href="' . Horde::url('edit/friends/invite.php') . '">' . _("Invite") . '</a>';
+echo '<tr><td><a href="' . Horde::url('edit/friends/index.php') . '">' . _("All") . '</a>';
foreach ($groups as $group_id => $group_name) {
- echo '<tr><td><a href="' . Horde_Util::addParameter(Horde::applicationUrl('edit/friends/friends.php'), $group_id) . '">' . $group_name . '</a>';
+ echo '<tr><td><a href="' . Horde_Util::addParameter(Horde::url('edit/friends/friends.php'), $group_id) . '">' . $group_name . '</a>';
}
-echo '<tr><td><a href="' . Horde::applicationUrl('edit/friends/know.php') . '">' . _("Might know") . '</a>';
-echo '<tr><td><a href="' . Horde::applicationUrl('edit/friends/for.php') . '">' . _("Wainting for") . '</a>';
-echo '<tr><td><a href="' . Horde::applicationUrl('edit/friends/from.php') . '">' . _("Wainting from") . '</a>';
-echo '<tr><td><a href="' . Horde::applicationUrl('edit/friends/of.php') . '">' . _("I am friend of") . '</a>';
-echo '<tr><td><a href="' . Horde::applicationUrl('edit/friends/blacklist.php') . '">' . _("Blacklist") . '</a>';
+echo '<tr><td><a href="' . Horde::url('edit/friends/know.php') . '">' . _("Might know") . '</a>';
+echo '<tr><td><a href="' . Horde::url('edit/friends/for.php') . '">' . _("Wainting for") . '</a>';
+echo '<tr><td><a href="' . Horde::url('edit/friends/from.php') . '">' . _("Wainting from") . '</a>';
+echo '<tr><td><a href="' . Horde::url('edit/friends/of.php') . '">' . _("I am friend of") . '</a>';
+echo '<tr><td><a href="' . Horde::url('edit/friends/blacklist.php') . '">' . _("Blacklist") . '</a>';
?>
</table>
<td>
<h1 class="header">
-<span style="float: right"><a href="<?php echo Horde::applicationUrl('edit/friends/index.php') ?>"><?php echo _("Edit friends") ?></a></span>
+<span style="float: right"><a href="<?php echo Horde::url('edit/friends/index.php') ?>"><?php echo _("Edit friends") ?></a></span>
<?php echo _("Friends activities") ?></h1>
<?php
$list = $firendActivities;
<?php
// Prepare actions
$actions = array(
- array('url' => Horde::applicationUrl('edit/friends/add.php'),
+ array('url' => Horde::url('edit/friends/add.php'),
'id' => 'user',
'name' => _("Add friend")),
- array('url' => Horde::applicationUrl('user.php'),
+ array('url' => Horde::url('user.php'),
'id' => 'user',
'name' => _("View profile")));
if ($registry->hasInterface('letter')) {
<?php
// Prepare actions
$actions = array(
- array('url' => Horde::applicationUrl('user.php'),
+ array('url' => Horde::url('user.php'),
'id' => 'user',
'name' => _("View profile")));
if ($registry->hasInterface('letter')) {
<br />
<h1 class="header">
-<span style="float: right"><a href="<?php echo Horde::applicationUrl('edit/activity.php') ?>"><?php echo _("Edit activities") ?></a></span>
+<span style="float: right"><a href="<?php echo Horde::url('edit/activity.php') ?>"><?php echo _("Edit activities") ?></a></span>
<?php echo _("Your activities") ?>
</h1>
<?php
<?php if (!empty($criteria)): ?>
<br />
-<a href="javascript:void(0)" class="bottom" onclick="saveSearch('<?php echo Horde::applicationUrl('save_search.php') ?>')"><?php echo _("Save search criteria"); ?></a>
+<a href="javascript:void(0)" class="bottom" onclick="saveSearch('<?php echo Horde::url('save_search.php') ?>')"><?php echo _("Save search criteria"); ?></a>
<?php
endif;
if (!empty($queries)):
<?php
foreach ($queries as $query) {
$delete_img = Horde::img('delete.png', _("Delete"));
- echo '<tr><td>' . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'query', $query), '', 'bottom') . $query . '</a></td>';
- echo '<td>' . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('save_search.php'), array('query' => $query, 'delete' => 1))) . $delete_img . '</a></td></tr>';
+ echo '<tr><td>' . Horde::link(Horde_Util::addParameter(Horde::url('search.php'), 'query', $query), '', 'bottom') . $query . '</a></td>';
+ echo '<td>' . Horde::link(Horde_Util::addParameter(Horde::url('save_search.php'), array('query' => $query, 'delete' => 1))) . $delete_img . '</a></td></tr>';
}
?>
</table>
<a href="javascript: document.getElementById('message_body').focus()" title="<?php echo _("Add a comment") ?>">
<img src="<?php echo Horde_Themes::img('agora.png', 'agora') ?>"> <?php echo _("Add a comment") ?></a>
-<a href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('edit/friends/add.php'), 'user', $user); ?>" title="<?php echo sprintf(_("Add %s as a friend?"), $user) ?>" onclick="return confirm('<?php echo sprintf(_("Add %s as a friend?"), $user) ?>')">
+<a href="<?php echo Horde_Util::addParameter(Horde::url('edit/friends/add.php'), 'user', $user); ?>" title="<?php echo sprintf(_("Add %s as a friend?"), $user) ?>" onclick="return confirm('<?php echo sprintf(_("Add %s as a friend?"), $user) ?>')">
<img src="<?php echo Horde_Themes::img('user.png') ?>"> <?php echo _("Friend") ?></a>
-<a href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('edit/friends/blacklist.php'), 'user', $user); ?>" title="<?php echo sprintf(_("Add %s to you blacklist?"), $user) ?>" onclick="return confirm('<?php echo sprintf(_("Add %s to you blacklist?"), $user) ?>')">
+<a href="<?php echo Horde_Util::addParameter(Horde::url('edit/friends/blacklist.php'), 'user', $user); ?>" title="<?php echo sprintf(_("Add %s to you blacklist?"), $user) ?>" onclick="return confirm('<?php echo sprintf(_("Add %s to you blacklist?"), $user) ?>')">
<img src="<?php echo Horde_Themes::img('locked.png') ?>"> <?php echo _("Blacklist") ?></a>
-<a href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('report.php'), 'user', $user); ?>" title="<?php echo _("Report user") ?>">
+<a href="<?php echo Horde_Util::addParameter(Horde::url('report.php'), 'user', $user); ?>" title="<?php echo _("Report user") ?>">
<img src="<?php echo Horde_Themes::img('problem.png') ?>"> <?php echo _("Report") ?></a>
<a href="<?php echo Folks::getUrlFor('list', 'list') ?>" title="<?php echo _("User list") ?>">
<tr>
<td class="header" colspan="2">
<span style="float: right">
-<a href="<?php echo Horde::applicationUrl('edit/friends/index.php') ?>" title="<?php echo _("Edit my firends") ?>"><img src="<?php Horde_Themes::img('plus.png') ?>" /></a>
-<a href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('edit/friends/index.php'), 'user', $user) ?>" title="<?php echo sprintf(_("Add %s as a friend?"), $user) ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
+<a href="<?php echo Horde::url('edit/friends/index.php') ?>" title="<?php echo _("Edit my firends") ?>"><img src="<?php Horde_Themes::img('plus.png') ?>" /></a>
+<a href="<?php echo Horde_Util::addParameter(Horde::url('edit/friends/index.php'), 'user', $user) ?>" title="<?php echo sprintf(_("Add %s as a friend?"), $user) ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
</span>
<?php echo _("Friends") ?> (<?php echo count($friends) ?>)
</td>
$notification->push($result);
} else {
$notification->push(_("Activity successfully posted"), 'horde.success');
- Horde::applicationUrl('user.php')->redirect();
+ Horde::url('user.php')->redirect();
}
}
}
* If a full URL is requested, all parameter separators get converted to
* "&", otherwise to "&".
*
- * @param string $uri The URI to be modified.
+ * @param mixed $uri The URI to be modified (either a string
+ * or any object with a __toString()
+ * function).
* @param boolean $full Generate a full (http://server/path/)
* URL.
* @param integer $append_session 0 = only if needed, 1 = always, -1 =
$full = true;
}
- if ($full) {
- global $conf, $registry, $browser;
+ $url = '';
+ $webroot = $GLOBALS['registry']->get('webroot');
+ /* Skip if we already have a full URL. */
+ if ($full && !preg_match('|^([\w+-]{1,20})://|', $webroot)) {
/* Store connection parameters in local variables. */
- $server_name = $conf['server']['name'];
- $server_port = $conf['server']['port'];
+ $server_name = $GLOBALS['conf']['server']['name'];
+ $server_port = $GLOBALS['conf']['server']['port'];
$protocol = 'http';
- if ($conf['use_ssl'] == 1) {
+ switch ($GLOBALS['conf']['use_ssl']) {
+ case 1:
$protocol = 'https';
- } elseif ($conf['use_ssl'] == 2 &&
- $browser->usingSSLConnection()) {
- $protocol = 'https';
- } elseif ($conf['use_ssl'] == 3) {
+ break;
+
+ case 2:
+ if ($GLOBALS['browser']->usingSSLConnection()) {
+ $protocol = 'https';
+ }
+ break;
+
+ case 3:
$server_port = '';
if ($force_ssl) {
$protocol = 'https';
}
+ break;
}
/* If using non-standard ports, add the port to the URL. */
$server_name .= ':' . $server_port;
}
- /* Store the webroot in a local variable. */
- $webroot = $registry->get('webroot');
-
/* Don't prepend to webroot if it's already absolute. */
- $url = preg_match('|^([\w+-]{1,20})://|', $webroot)
- ? ''
- : $protocol . '://' . $server_name;
-
- if (substr($uri, 0, 1) != '/') {
- /* Simple case for http:// absolute webroots. */
- if (preg_match('|^([\w+-]{1,20})://|', $uri)) {
- $url = $uri;
- } elseif (substr($webroot, -1) == '/') {
- $url .= $webroot . $uri;
- } else {
- $url .= $webroot . '/' . $uri;
- }
- } else {
- $url .= $uri;
- }
- } else {
- $url = $uri;
-
- if (!empty($_SERVER['HTTP_HOST'])) {
- // Don't generate absolute URLs if we don't have to.
- if (preg_match('|^([\w+-]{1,20}://' . preg_quote($_SERVER['HTTP_HOST'], '|') . ')/|', $url, $matches)) {
- $url = substr($url, strlen($matches[1]));
- }
- }
+ $url = $protocol . '://' . $server_name;
+ } elseif (!$full &&
+ !empty($_SERVER['HTTP_HOST']) &&
+ preg_match('|^([\w+-]{1,20}://' . preg_quote($_SERVER['HTTP_HOST'], '|') . ')/|', $uri, $matches)) {
+ // Don't generate absolute URLs if we don't have to.
+ $uri = substr($uri, strlen($matches[1]));
}
+ $url .= (substr($uri, 0, 1) == '/')
+ ? $uri
+ : '/' . ltrim($webroot, '/') . '/' . $uri;
+
$ob = new Horde_Url($url, $full);
if (empty($GLOBALS['conf']['session']['use_only_cookies']) &&
$ob->add(session_name(), session_id());
}
- if (($append_session >= 0) && Horde_Util::getFormData('ajaxui')) {
+ if (($append_session >= 0) &&
+ Horde_Util::getFormData('ajaxui')) {
$ob->add('ajaxui', 1);
}
}
/**
- * Returns a session-id-ified version of $uri, using the current
- * application's webroot setting.
- *
- * @param string $uri The URI to be modified.
- * @param boolean $full Generate a full (http://server/path/)
- * URL.
- * @param integer $append_session 0 = only if needed, 1 = always, -1 =
- * never.
- *
- * @return Horde_Url The url with the session id appended.
- */
- static public function applicationUrl($uri, $full = false,
- $append_session = 0)
- {
- if (substr($uri, 0, 1) != '/') {
- $webroot = $GLOBALS['registry']->get('webroot');
- if (substr($webroot, -1) != '/') {
- $webroot .= '/';
- }
- $uri = $webroot . $uri;
- }
-
- return self::url($uri, $full, $append_session);
- }
-
- /**
* Returns an external link passed through the dereferrer to strip session
* IDs from the referrer.
*
$nodes = $this->_perms->getTree();
$perms_node = array('icon' => Horde_Themes::img('perms.png'));
- $add = Horde::applicationUrl('admin/perms/addchild.php');
+ $add = Horde::url('admin/perms/addchild.php');
$add_img = Horde::img('add_perm.png', _("Add Permission"));
- $edit = Horde::applicationUrl('admin/perms/edit.php');
- $delete = Horde::applicationUrl('admin/perms/delete.php');
+ $edit = Horde::url('admin/perms/edit.php');
+ $delete = Horde::url('admin/perms/delete.php');
$edit_img = Horde::img('edit.png', _("Edit Permission"));
$delete_img = Horde::img('delete.png', _("Delete Permission"));
$blank_img = Horde::img('blank.gif', '', array('width' => 16, 'height' => 16));
if (isset($this->prefs[$pref]['img'])) {
$t->set('img', Horde::img($this->prefs[$pref]['img'], $this->prefs[$pref]['desc'], array('class' => 'prefsLinkImg')));
}
- $t->set('url', isset($this->prefs[$pref]['url']) ? Horde::applicationUrl($this->prefs[$pref]['url']) : $this->prefs[$pref]['xurl']);
+ $t->set('url', isset($this->prefs[$pref]['url']) ? Horde::url($this->prefs[$pref]['url']) : $this->prefs[$pref]['xurl']);
if (isset($this->prefs[$pref]['target'])) {
$t->set('target', htmlspecialchars($this->prefs[$pref]['target']));
}
<api>beta</api>
</stability>
<license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
- <notes>* Remove Horde::nocacheUrl.
+ <notes>* Remove Horde::nocacheUrl() and Horde::url() (Ticket #9160).
* Absorb horde/Ui package.
* Absorb horde/Ajax package.
* Import application auth driver from horde/Auth.
$vFb->setAttribute('DTSTART', $startstamp);
$vFb->setAttribute('DTEND', $endstamp);
// URL is not required, so out it goes...
- //$vFb->setAttribute('URL', Horde::applicationUrl('fb.php?u=' . $share->get('owner'), true, -1));
+ //$vFb->setAttribute('URL', Horde::url('fb.php?u=' . $share->get('owner'), true, -1));
/* Add all the busy periods. */
foreach ($events as $event) {
$n = $i['name']; // shortcut
if ($i['list']) {
$s .= "<th class=\"<?php echo (\$sortby == ZOMBIE_SORT_$n) ? 'selected' : 'item' ?>\" width=\"2%\">
- <?php if (\$sortby == ZOMBIE_SORT_$n) echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter(\$sortbyurl, 'sortby', ZOMBIE_SORT_$n)), _(\"Change sort direction\"), 'widget') . Horde::img(\$sortdir ? 'za.gif' : 'az.gif', _(\"Change sort direction\"), null, \$registry->get('graphics', 'horde')) ?></a>
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter('list.php', 'sortby', ZOMBIE_SORT_$n)), _(\"Sort by User Name\"), 'widget', '', '', _(\"" . $i['desc'] . "\")) ?></a> </th>\n";
+ <?php if (\$sortby == ZOMBIE_SORT_$n) echo Horde::link(Horde::url(Horde_Util::addParameter(\$sortbyurl, 'sortby', ZOMBIE_SORT_$n)), _(\"Change sort direction\"), 'widget') . Horde::img(\$sortdir ? 'za.gif' : 'az.gif', _(\"Change sort direction\"), null, \$registry->get('graphics', 'horde')) ?></a>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter('list.php', 'sortby', ZOMBIE_SORT_$n)), _(\"Sort by User Name\"), 'widget', '', '', _(\"" . $i['desc'] . "\")) ?></a> </th>\n";
}
}
$template->set('currdir', Gollem::getDisplayPath($dir));
$template->set('dir', $dir);
$template->set('entry', $entry, true);
-$template->set('manager_url', Horde::applicationUrl('manager.php'));
+$template->set('manager_url', Horde::url('manager.php'));
echo $template->fetch(GOLLEM_TEMPLATES . '/clipboard/clipboard.html');
require $registry->get('templates', 'horde') . '/common-footer.inc';
}
$url = Horde_Util::addParameter(
- Horde::applicationUrl('view.php'),
+ Horde::url('view.php'),
array('actionID' => 'view_file',
'type' => substr($file, strrpos($file, '.') + 1),
'file' => $file,
public function selectlistLink($link_text, $link_style, $formid,
$icon = false, $selectid = '')
{
- $link = Horde::link('#', $link_text, $link_style, '_blank', Horde::popupJs(Horde::applicationUrl('selectlist.php'), array('params' => array('formid' => $formid, 'cacheid' => $selectid), 'height' => 500, 'width' => 300, 'urlencode' => true)) . 'return false;');
+ $link = Horde::link('#', $link_text, $link_style, '_blank', Horde::popupJs(Horde::url('selectlist.php'), array('params' => array('formid' => $formid, 'cacheid' => $selectid), 'height' => 500, 'width' => 300, 'urlencode' => true)) . 'return false;');
if ($icon) {
$link_text = Horde::img('gollem.png', $link_text);
}
// TODO
return;
- $login_url = Horde::applicationUrl('login.php');
+ $login_url = Horde::url('login.php');
foreach ($GLOBALS['gollem_backends'] as $key => $val) {
if (Gollem::checkPermissions('backend', Horde_Perms::SHOW, $key)) {
}
}
- return Horde::applicationUrl($url, true);
+ return Horde::url($url, true);
}
/**
static public function getMenu()
{
$menu = new Horde_Menu();
- $menu->add(Horde_Util::addParameter(Horde::applicationUrl('manager.php'), 'dir', Gollem::getHome()), _("_My Home"), 'folder_home.png');
+ $menu->add(Horde_Util::addParameter(Horde::url('manager.php'), 'dir', Gollem::getHome()), _("_My Home"), 'folder_home.png');
if (!empty($_SESSION['gollem'])) {
$backend_key = $_SESSION['gollem']['backend_key'];
if ($GLOBALS['registry']->isAdmin()) {
- $menu->add(Horde_Util::addParameter(Horde::applicationUrl('permissions.php'), 'backend', $backend_key), _("_Permissions"), 'perms.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde_Util::addParameter(Horde::url('permissions.php'), 'backend', $backend_key), _("_Permissions"), 'perms.png', Horde_Themes::img(null, 'horde'));
}
if ($_SESSION['gollem']['backends'][$backend_key]['quota_val'] != -1) {
if ($GLOBALS['browser']->hasFeature('javascript')) {
- $quota_url = 'javascript:' . Horde::popupJs(Horde::applicationUrl('quota.php'), array('params' => array('backend' => $backend_key), 'height' => 300, 'width' => 300, 'urlencode' => true));
+ $quota_url = 'javascript:' . Horde::popupJs(Horde::url('quota.php'), array('params' => array('backend' => $backend_key), 'height' => 300, 'width' => 300, 'urlencode' => true));
} else {
- $quota_url = Horde_Util::addParameter(Horde::applicationUrl('quota.php'), 'backend', $backend_key);
+ $quota_url = Horde_Util::addParameter(Horde::url('quota.php'), 'backend', $backend_key);
}
$menu->add($quota_url, _("Check Quota"), 'info_icon.png', Horde_Themes::img(null, 'horde'));
}
{
$data = '';
// TODO - set mimepart contents
- //$url = Horde_Util::addParameter(Horde::applicationUrl('view.php'), array('actionID' => 'download_file', 'file' => $this->mime_part->getName(), 'dir' => Horde_Util::getFormData('dir'), 'driver' => Horde_Util::getFormData('driver')));
+ //$url = Horde_Util::addParameter(Horde::url('view.php'), array('actionID' => 'download_file', 'file' => $this->mime_part->getName(), 'dir' => Horde_Util::getFormData('dir'), 'driver' => Horde_Util::getFormData('driver')));
return parent::_render();
}
$_SESSION['gollem']['filter'] = $filter;
/* Commonly used URLs. */
-$view_url = Horde::applicationUrl('view.php');
-$edit_url = Horde::applicationUrl('edit.php');
-$manager_url = Horde::applicationUrl('manager.php');
+$view_url = Horde::url('view.php');
+$edit_url = Horde::url('edit.php');
+$manager_url = Horde::url('manager.php');
$refresh_params = array('page' => $page);
if ($filter) {
empty($_SESSION['gollem']['clipboard'])) {
$template->set('clipboard', null);
} else {
- $template->set('clipboard', Horde::link(Horde_Util::addParameter(Horde::applicationUrl('clipboard.php'), 'dir', $currdir), _("View Clipboard")) . Horde::img('clipboard.png', _("View Clipboard")) . '</a>');
+ $template->set('clipboard', Horde::link(Horde_Util::addParameter(Horde::url('clipboard.php'), 'dir', $currdir), _("View Clipboard")) . Horde::img('clipboard.png', _("View Clipboard")) . '</a>');
}
if ($edit_perms) {
$result = $perms->addPermission($permission, $app);
if ($result instanceof PEAR_Error) {
$notification->push(sprintf(_("Unable to create backend permission: %s"), $result->getMessage()), 'horde.error');
- Horde::applicationUrl('redirect.php', true)->redirect();
+ Horde::url('redirect.php', true)->redirect();
}
$perm_id = $perms->getPermissionId($permission);
$notification->push(sprintf(_("Created empty permissions for \"%s\". You must explicitly grant access to this backend now."), $key), 'horde.warning');
$symlink_img = Horde::img('folder_symlink.png', _("symlink"));
/* Commonly used URLs. */
-$self_url = Horde::applicationUrl('selectlist.php');
+$self_url = Horde::url('selectlist.php');
/* Now actually display everything, after we've notified the user of
any errors. */
$t->set('formid', htmlspecialchars($formid));
$t->set('navlink', Gollem::directoryNavLink($currdir, Horde_Util::addParameter($self_url, array('cacheid' => $cacheid, 'formid' => $formid))));
if ($GLOBALS['conf']['backend']['backend_list'] == 'shown') {
- $t->set('changeserver', Horde::link(htmlspecialchars(Horde_Auth::addLogoutParameters(Horde_Util::addParameter(Horde::applicationUrl('login.php'), array('url' => Horde_Util::addParameter(Horde::url('selectlist.php'), array('formid' => $formid)))), Horde_Auth::REASON_LOGOUT)), _("Change Server")) . Horde::img('logout.png', _("Change Server")) . '</a>', true);
+ $t->set('changeserver', Horde::link(htmlspecialchars(Horde_Auth::addLogoutParameters(Horde_Util::addParameter(Horde::url('login.php'), array('url' => Horde_Util::addParameter(Horde::url('selectlist.php'), array('formid' => $formid)))), Horde_Auth::REASON_LOGOUT)), _("Change Server")) . Horde::img('logout.png', _("Change Server")) . '</a>', true);
} else {
$t->set('changeserver', '', true);
}
-<form name="edit_form" action="<?php echo Horde::applicationUrl('edit.php') ?>" method="post">
+<form name="edit_form" action="<?php echo Horde::url('edit.php') ?>" method="post">
<?php echo Horde_Util::formInput() ?>
<input type="hidden" name="actionID" value="save_file" />
<input type="hidden" name="driver" value="<?php echo $driver ?>" />
$type = Horde_Util::getFormData('type');
if ($driver != $GLOBALS['gollem_be']['driver']) {
- Horde::applicationUrl('login.php')
+ Horde::url('login.php')
->add(array('backend_key' => $driver,
'change_backend' => 1,
'url' => Horde::selfURL(true)))
foreach ($deliverables as $deliverable) {
$params = array();
- $params['url'] = Horde::applicationUrl('deliverables.php');
+ $params['url'] = Horde::url('deliverables.php');
$params['url'] = Horde_Util::addParameter($params['url'], array('deliverable_id' => $deliverable['id'], 'client_id' => $vars->get('client_id')));
$params['title'] = sprintf(_("Edit %s"), $deliverable['name']);
- $newdeliv = ' ' . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('deliverables.php'), array('new' => 1, 'parent' => $deliverable['id'], 'client_id' => $vars->get('client_id'))), _("New Sub-deliverable")) . Horde::img('newdeliverable.png', _("New Sub-deliverable")) . '</a>';
+ $newdeliv = ' ' . Horde::link(Horde_Util::addParameter(Horde::url('deliverables.php'), array('new' => 1, 'parent' => $deliverable['id'], 'client_id' => $vars->get('client_id'))), _("New Sub-deliverable")) . Horde::img('newdeliverable.png', _("New Sub-deliverable")) . '</a>';
- $deldeliv = ' ' . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('deliverables.php'), array('formname' => 'deletedeliverable', 'delete' => $deliverable['id'], 'client_id' => $vars->get('client_id'))), _("Delete This Deliverable")) . Horde::img('delete.png', _("Delete This Deliverable"), '') . '</a>';
+ $deldeliv = ' ' . Horde::link(Horde_Util::addParameter(Horde::url('deliverables.php'), array('formname' => 'deletedeliverable', 'delete' => $deliverable['id'], 'client_id' => $vars->get('client_id'))), _("Delete This Deliverable")) . Horde::img('delete.png', _("Delete This Deliverable"), '') . '</a>';
/* Calculate the node's depth. */
$depth = 0;
if ($do_redirect) {
$url = $vars->get('url');
if (empty($url)) {
- $url = Horde::applicationUrl('time.php');
+ $url = Horde::url('time.php');
}
header('Location: ' . $url);
exit;
$id = $vars->get('id');
if (!Hermes::canEditTimeslice($id)) {
$notification->push(_("Access denied; user cannot modify this timeslice."), 'horde.error');
- Horde::applicationUrl('time.php')->redirect();
+ Horde::url('time.php')->redirect();
}
$myhours = $hermes->driver->getHours(array('id' => $id));
if (is_array($myhours)) {
'submitted' => true));
if (is_a($hours, 'PEAR_Error')) {
$notification->push($hours->getMessage(), 'horde.error');
- Horde::applicationUrl('time.php')->redirect();
+ Horde::url('time.php')->redirect();
}
if (empty($hours)) {
$notification->push(_("There is no submitted billable hours."), 'horde.warning');
- Horde::applicationUrl('time.php')->redirect();
+ Horde::url('time.php')->redirect();
}
if (!$registry->hasMethod('invoices/save')) {
$notification->push(_("Invoicing system is not installed."), 'horde.warning');
- Horde::applicationUrl('time.php')->redirect();
+ Horde::url('time.php')->redirect();
}
$headers = array(
}
}
- Horde::applicationUrl('time.php')->redirect();
+ Horde::url('time.php')->redirect();
}
require HERMES_TEMPLATES . '/common-header.inc';
require HERMES_TEMPLATES . '/menu.inc';
$renderer = new Horde_Form_Renderer(array('varrenderer_driver' => 'tableset_html'));
-$form->renderActive($renderer, null, Horde::applicationUrl('invoicing.php'), 'post');
+$form->renderActive($renderer, null, Horde::url('invoicing.php'), 'post');
require $registry->get('templates', 'horde') . '/common-footer.inc';
// Set up edit/delete icons.
if (Hermes::canEditTimeslice($vals['id'])) {
- $edit_link = Horde::applicationUrl('entry.php', true);
+ $edit_link = Horde::url('entry.php', true);
$edit_link = Horde_Util::addParameter($edit_link, 'id', $vals['id']);
$edit_link = Horde_Util::addParameter($edit_link, 'url', Horde::selfUrl(true, true, true));
false,
array(
'icon' => 'hermes.png',
- 'url' => Horde::applicationUrl('entry.php')
+ 'url' => Horde::url('entry.php')
)
);
false,
array(
'icon' => 'search.png',
- 'url' => Horde::applicationUrl('search.php')
+ 'url' => Horde::url('search.php')
)
);
break;
case 'stopwatch':
Horde::addScriptFile('popup.js', 'horde');
- $entry = Horde::applicationUrl('entry.php');
+ $entry = Horde::url('entry.php');
$tree->addNode(
$parent . '__start',
false,
array(
'icon' => 'timer-start.png',
- 'onclick' => "popup('" . Horde::applicationUrl('start.php') . "', 400, 100); return false;",
+ 'onclick' => "popup('" . Horde::url('start.php') . "', 400, 100); return false;",
'url' => '#'
)
);
if ($vars->exists('id')) {
parent::TimeForm($vars, _("Update Time"));
- $delete_link = Horde::link(Horde_Util::addParameter(Horde::applicationUrl('time.php'), 'delete', $vars->get('id')), _("Delete Entry")) . _("Delete");
+ $delete_link = Horde::link(Horde_Util::addParameter(Horde::url('time.php'), 'delete', $vars->get('id')), _("Delete Entry")) . _("Delete");
$this->setExtra('<span class="smallheader">' . $delete_link . '</a></span>');
} else {
parent::TimeForm($vars, _("New Time"));
$perms = $GLOBALS['injector']->getInstance('Horde_Perms');
$menu = new Horde_Menu();
- $menu->add(Horde::applicationUrl('time.php'), _("My _Time"), 'hermes.png', null, null, null, basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
- $menu->add(Horde::applicationUrl('entry.php'), _("_New Time"), 'hermes.png', null, null, null, Horde_Util::getFormData('id') ? '__noselection' : null);
- $menu->add(Horde::applicationUrl('search.php'), _("_Search"), Horde_Themes::img('search.png'));
+ $menu->add(Horde::url('time.php'), _("My _Time"), 'hermes.png', null, null, null, basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
+ $menu->add(Horde::url('entry.php'), _("_New Time"), 'hermes.png', null, null, null, Horde_Util::getFormData('id') ? '__noselection' : null);
+ $menu->add(Horde::url('search.php'), _("_Search"), Horde_Themes::img('search.png'));
if ($conf['time']['deliverables'] && $registry->isAdmin('hermes:deliverables')) {
- $menu->add(Horde::applicationUrl('deliverables.php'), _("_Deliverables"), 'hermes.png');
+ $menu->add(Horde::url('deliverables.php'), _("_Deliverables"), 'hermes.png');
}
if ($conf['invoices']['driver'] && $registry->isAdmin('hermes:invoicing')) {
- $menu->add(Horde::applicationUrl('invoicing.php'), _("_Invoicing"), 'invoices.png');
+ $menu->add(Horde::url('invoicing.php'), _("_Invoicing"), 'invoices.png');
}
/* Print. */
/* Administration. */
if ($registry->isAdmin()) {
- $menu->add(Horde::applicationUrl('admin.php'), _("_Admin"), 'hermes.png');
+ $menu->add(Horde::url('admin.php'), _("_Admin"), 'hermes.png');
}
if ($returnType == 'object') {
$template = new Horde_Template();
$template->setOption('gettext', true);
- $template->set('postUrl', Horde::applicationUrl('time.php', false, -1));
+ $template->set('postUrl', Horde::url('time.php', false, -1));
$template->set('sessionId', Horde_Util::formInput());
$template->set('table', $table->render());
<tr><td class="header"><?php
printf(_("%s Deliverables"), $clientname);
- $newurl = Horde::applicationUrl('deliverables.php');
+ $newurl = Horde::url('deliverables.php');
$newurl = Horde_Util::addParameter($newurl, array('new' => 1, 'client_id' => $vars->get('client_id')));
?> <a href="<?php echo $newurl ?>"><?php
$template = new Horde_Template();
$template->setOption('gettext', true);
-$template->set('postUrl', Horde::applicationUrl('time.php', false, -1));
+$template->set('postUrl', Horde::url('time.php', false, -1));
$template->set('sessionId', Horde_Util::formInput());
$template->set('table', $table->render());
if ($print_view) {
require $registry->get('templates', 'horde') . '/javascript/print.js';
} else {
- $print_link = Horde_Util::addParameter(Horde::applicationUrl('time.php'), 'print', 'true');
+ $print_link = Horde_Util::addParameter(Horde::url('time.php'), 'print', 'true');
require HERMES_TEMPLATES . '/menu.inc';
}
/* Set up some node params. */
$spacer = ' ';
$group_node = array('icon' => strval(Horde_Themes::img('group.png')));
-$add = Horde::applicationUrl('admin/groups.php?actionID=addchild');
+$add = Horde::url('admin/groups.php?actionID=addchild');
$add_img = Horde::img('add_group.png');
-$edit = Horde::applicationUrl('admin/groups.php?actionID=edit');
-$delete = Horde::applicationUrl('admin/groups.php?actionID=delete');
+$edit = Horde::url('admin/groups.php?actionID=edit');
+$delete = Horde::url('admin/groups.php?actionID=delete');
$edit_img = Horde::img('edit.png', _("Edit Group"));
$delete_img = Horde::img('delete.png', _("Delete Group"));
$permission = $perms->getPermissionById($perm_id);
} catch (Exception $e) {
$notification->push(_("Invalid parent permission."), 'horde.error');
- Horde::applicationUrl('admin/perms/index.php', true)->redirect();
+ Horde::url('admin/perms/index.php', true)->redirect();
}
/* Set up form. */
$result = $perms->addPermission($child);
}
$notification->push(sprintf(_("\"%s\" was added to the permissions system."), $perms->getTitle($child->getName())), 'horde.success');
- Horde::applicationUrl('admin/perms/edit.php', true)->add('perm_id', $child->getId())->redirect();
+ Horde::url('admin/perms/edit.php', true)->add('perm_id', $child->getId())->redirect();
} catch (Exception $e) {
Horde::logMessage($e, 'ERR');
$notification->push(sprintf(_("\"%s\" was not created: %s."), $perms->getTitle($child->getName()), $e->getMessage()), 'horde.error');
} catch (Exception $e) {
/* If the permission fetched is an error return to permissions list. */
$notification->push(_("Attempt to delete a non-existent permission."), 'horde.error');
- Horde::applicationUrl('admin/perms/index.php', true)->redirect();
+ Horde::url('admin/perms/index.php', true)->redirect();
}
/* Set up form. */
try {
$result = $perms->removePermission($permission, true);
$notification->push(sprintf(_("Successfully deleted \"%s\"."), $perms->getTitle($permission->getName())), 'horde.success');
- Horde::applicationUrl('admin/perms/index.php', true)->redirect();
+ Horde::url('admin/perms/index.php', true)->redirect();
} catch (Exception $e) {
$notification->push(sprintf(_("Unable to delete \"%s\": %s."), $perms->getTitle($permission->getName()), $result->getMessage()), 'horde.error');
}
} elseif ($confirmed === false) {
$notification->push(sprintf(_("Permission \"%s\" not deleted."), $perms->getTitle($permission->getName())), 'horde.success');
- Horde::applicationUrl('admin/perms/index.php', true)->redirect();
+ Horde::url('admin/perms/index.php', true)->redirect();
}
$title = _("Permissions Administration");
if ($redirect) {
$notification->push(_("Attempt to edit a non-existent permission."), 'horde.error');
- Horde::applicationUrl('admin/perms/index.php', true)->redirect();
+ Horde::url('admin/perms/index.php', true)->redirect();
}
$ui = new Horde_Core_Perms_Ui($perms);
$permission->updatePermissions($info);
$permission->save();
$notification->push(sprintf(_("Updated \"%s\"."), $perms->getTitle($permission->getName())), 'horde.success');
- Horde::applicationUrl('admin/perms/edit.php', true)
+ Horde::url('admin/perms/edit.php', true)
->add('perm_id', $permission->getId())
->redirect();
}
if (empty($app) || !in_array($app, $registry->listAllApps())) {
$notification->push(_("Invalid application."), 'horde.error');
- Horde::applicationUrl('admin/setup/index.php', true)->redirect();
+ Horde::url('admin/setup/index.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
fclose($fp);
$notification->push(sprintf(_("Successfully wrote %s"), Horde_Util::realPath($path . '/conf.php')), 'horde.success');
$registry->clearCache();
- Horde::applicationUrl('admin/setup/index.php', true)->redirect();
+ Horde::url('admin/setup/index.php', true)->redirect();
} else {
/* Cannot write. */
$notification->push(sprintf(_("Could not save the configuration file %s. You can either use one of the options to save the code back on %s or copy manually the code below to %s."), Horde_Util::realPath($path . '/conf.php'), Horde::link(Horde::url('index.php') . '#update', _("Setup")) . _("Setup") . '</a>', Horde_Util::realPath($path . '/conf.php')), 'horde.warning', array('content.raw'));
/* Create the link for the diff popup only if stored in session. */
$diff_link = '';
if (!empty($_SESSION['_config'][$app])) {
- $url = Horde::applicationUrl('admin/setup/diff.php', true);
+ $url = Horde::url('admin/setup/diff.php', true);
$url = Horde_Util::addParameter($url, 'app', $app, false);
$diff_link = Horde::link('#', '', '', '', Horde::popupJs($url, array('height' => 480, 'width' => 640, 'urlencode' => true)) . 'return false;') . _("show differences") . '</a>';
}
/* Only bother to do anything if there is any config. */
if (!empty($_SESSION['_config'])) {
/* Set up the toggle button for inline/unified. */
- $url = Horde::applicationUrl('admin/setup/diff.php');
+ $url = Horde::url('admin/setup/diff.php');
$url = Horde_Util::addParameter($url, 'render', ($render_type == 'inline') ? 'unified' : 'inline');
if ($app = Horde_Util::getFormData('app')) {
$warning = Horde::img('alerts/warning.png');
$error = Horde::img('alerts/error.png');
-$conf_url = Horde::applicationUrl('admin/setup/config.php');
+$conf_url = Horde::url('admin/setup/config.php');
$a = $registry->listAllApps();
$apps = array();
$i = -1;
$actions = array();
$ftpform = '';
if (!empty($_SESSION['_config'])) {
- $url = Horde::applicationUrl('admin/setup/diff.php');
+ $url = Horde::url('admin/setup/diff.php');
$action = _("Show differences between currently saved and the newly generated configuration.");
$actions[] = array('icon' => Horde::img('search.png', '', 'align="middle"'),
'link' => Horde::link('#', '', '', '', Horde::popupJs($url, array('height' => 480, 'width' => 640, 'urlencode' => true)) . 'return false;') . $action . '</a>');
/* Action to download the configuration upgrade PHP script. */
- $url = Horde::applicationUrl('admin/setup/scripts.php')->add(array('setup' => 'conf', 'type' => 'php'));
+ $url = Horde::url('admin/setup/scripts.php')->add(array('setup' => 'conf', 'type' => 'php'));
$action = _("Download generated configuration as PHP script.");
$actions[] = array('icon' => Horde::img('download.png', '', 'align="middle"'),
'link' => Horde::link($url) . $action . '</a>');
$upload = _uploadFTP($info);
if ($upload) {
$notification->push(_("Uploaded all application setup files to the server."), 'horde.success');
- Horde::applicationUrl('admin/setup/index.php', true)->redirect();
+ Horde::url('admin/setup/index.php', true)->redirect();
}
}
/* Render the form. */
if (file_exists(Horde::getTempDir() . '/horde_setup_upgrade.php')) {
/* Action to remove the configuration upgrade PHP script. */
- $url = Horde::applicationUrl('admin/setup/scripts.php')->add('clean', 'tmp');
+ $url = Horde::url('admin/setup/scripts.php')->add('clean', 'tmp');
$action = _("Remove saved script from server's temporary directory.");
$actions[] = array('icon' => Horde::img('delete.png', '', 'align="middle"'),
'link' => Horde::link($url) . $action . '</a>');
$template = $injector->createInstance('Horde_Template');
$template->setOption('gettext', true);
$template->set('versions', !empty($versions), true);
-$template->set('version_action', Horde::applicationUrl('admin/setup/index.php'));
+$template->set('version_action', Horde::url('admin/setup/index.php'));
$template->set('version_input', Horde_Util::formInput());
$template->set('apps', $apps);
$template->set('actions', $actions, true);
$notification->push(sprintf(_("Could not delete setup upgrade script \"%s\"."), Horde_Util::realPath($path)), 'horde.error');
}
$registry->clearCache();
- Horde::applicationUrl('admin/setup/index.php', true)->redirect();
+ Horde::url('admin/setup/index.php', true)->redirect();
}
$data = '';
$notification->push(sprintf(_("Could not save setup upgrade script to: \"%s\"."), $path), 'horde.error');
}
-Horde::applicationUrl('admin/setup/index.php', true)->redirect();
+Horde::url('admin/setup/index.php', true)->redirect();
// "\n\n" .
// $this->_signup_queued_walkdata($extraFields, $data) .
// "\n" .
-// sprintf(_("You can approve this signup at %s"), Horde::applicationUrl('admin/user.php', true, -1));
+// sprintf(_("You can approve this signup at %s"), Horde::url('admin/user.php', true, -1));
//
// $GLOBALS['injector']->getInstance('Horde_Mail')->send($_SERVER['SERVER_ADMIN'], $headers, $msg);
// }
/* Always redirect to login page if there is no incoming URL and nobody
* is authenticated. */
if (!$registry->getAuth()) {
- $main_page = Horde::applicationUrl('login.php', true);
+ $main_page = Horde::url('login.php', true);
} else {
/* Search for a user-specified initial application. */
$initial_app = $prefs->getValue('initial_application');
* loops. */
if (!empty($registry->applications['horde']['initial_page']) &&
!in_array($registry->applications['horde']['initial_page'], array('index.php', 'login.php'))) {
- $main_page = Horde::applicationUrl($registry->applications['horde']['initial_page'], true);
+ $main_page = Horde::url($registry->applications['horde']['initial_page'], true);
} else {
/* Finally, fallback to the portal page. */
$main_page = $browser->isMobile()
- ? Horde::applicationUrl('services/portal/mobile.php', true)
- : Horde::applicationUrl('services/portal/', true);
+ ? Horde::url('services/portal/mobile.php', true)
+ : Horde::url('services/portal/', true);
}
}
}
$notification->push(_("Your password has expired."), 'horde.message');
if ($auth->hasCapability('update')) {
- $change_url = Horde::applicationUrl('services/changepassword.php');
+ $change_url = Horde::url('services/changepassword.php');
if (isset($horde_login_url)) {
$change_url->add('return_to', $horde_login_url);
}
if ($url = Horde_Util::getFormData('url')) {
$url = new Horde_Url($url);
} else {
- $url = Horde::applicationUrl('login.php');
+ $url = Horde::url('login.php');
}
$url->redirect();
$notification->push(_("Password changed successfully."), 'horde.success');
- $index_url = Horde::applicationUrl('index.php', true);
+ $index_url = Horde::url('index.php', true);
if (!empty($info['return_to'])) {
$index_url->add('url', $info['return_to']);
}
/* Redirect to the url or login page if none given. */
$url = Horde_Util::getFormData('url');
$url = empty($url)
- ? Horde::applicationUrl('index.php', true)
+ ? Horde::url('index.php', true)
: $url;
$url->redirect();
// Get refresh interval.
if (($r_time = $prefs->getValue('summary_refresh_time'))
&& !$browser->hasFeature('xmlhttpreq')) {
- Horde::metaRefresh($r_time, Horde::applicationUrl('services/portal/'));
+ Horde::metaRefresh($r_time, Horde::url('services/portal/'));
}
// Load layout from preferences.
// Render layout.
$view = new Horde_Block_Layout_View(
$layout_pref,
- Horde::applicationUrl('services/portal/edit.php'),
- Horde::applicationUrl('services/portal/index.php', true));
+ Horde::url('services/portal/edit.php'),
+ Horde::url('services/portal/index.php', true));
$layout_html = $view->toHtml();
$horde_css_stylesheets = array();
echo '<div id="menuBottom">';
echo htmlspecialchars($injector->getInstance('Horde_Prefs_Identity')->getIdentity()->getName());
if (!$prefs->isLocked('portal_layout')) {
- echo ' | <a href="' . Horde::applicationUrl('services/portal/edit.php') . '">' . _("Add Content") . '</a>';
+ echo ' | <a href="' . Horde::url('services/portal/edit.php') . '">' . _("Add Content") . '</a>';
}
echo '</div><br class="clear" />';
$notification->notify(array('listeners' => 'status'));
?>
<tr>
<?php if ($remove): ?>
- <td width="1%"><?php echo Horde::link(Horde::applicationUrl('admin/user.php?form=remove_f&user_name=' . $user), _("Delete")) . Horde::img('delete.png', _("Delete")) ?></a></td>
+ <td width="1%"><?php echo Horde::link(Horde::url('admin/user.php?form=remove_f&user_name=' . $user), _("Delete")) . Horde::img('delete.png', _("Delete")) ?></a></td>
<?php endif; ?>
- <td width="1%"><?php echo Horde::link(Horde::applicationUrl('admin/user.php?form=update_f&user_name=' . $user), _("Update")) . Horde::img('edit.png', _("Update")) ?></a></td>
- <td width="1%"><?php echo Horde::link(Horde::applicationUrl('admin/user.php?form=clear_f&user_name=' . $user), _("Clear user data")) . Horde::img('reload.png', _("Clear user data")) ?></a></td>
+ <td width="1%"><?php echo Horde::link(Horde::url('admin/user.php?form=update_f&user_name=' . $user), _("Update")) . Horde::img('edit.png', _("Update")) ?></a></td>
+ <td width="1%"><?php echo Horde::link(Horde::url('admin/user.php?form=clear_f&user_name=' . $user), _("Clear user data")) . Horde::img('reload.png', _("Clear user data")) ?></a></td>
<td class="leftAlign"><?php echo $user ?></td>
</tr>
<?php endforeach; ?>
<script type="text/javascript">
function doSearch(tagName)
{
- ajaxurl = '<?php echo Horde::applicationUrl('services/portal/cloud_search.php', true)?>';
+ ajaxurl = '<?php echo Horde::url('services/portal/cloud_search.php', true)?>';
params = 'tag=' + tagName;
$('cloudloadingimg').show();
-<form method="post" name="dateform" action="<?php echo Horde::applicationUrl('data.php') ?>">
+<form method="post" name="dateform" action="<?php echo Horde::url('data.php') ?>">
<input type="hidden" name="actionID" value="<?php echo (int)$next_step ?>" />
<input type="hidden" name="import_format" value="<?php echo htmlspecialchars(Horde_Util::getFormData('import_format')) ?>" />
<input type="hidden" name="import_step" value="<?php echo (int)$import_step ?>" />
$menu = new Horde_Menu();
if (($GLOBALS['registry']->getApp() == 'horde') &&
!in_array($GLOBALS['registry']->get('status', 'horde'), array('notoolbar', 'hidden', 'inactive'))) {
- $menu->add(Horde::applicationUrl('services/portal/'), _("_Home"), 'horde.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde::url('services/portal/'), _("_Home"), 'horde.png', Horde_Themes::img(null, 'horde'));
}
}
?>
<script type="text/javascript">
setTimeout(function() {
new Ajax.PeriodicalUpdater('block_<?php echo (int)$row_num ?>_<?php echo (int)$col_num ?>',
- '<?php echo Horde::applicationUrl('services/portal/index.php') ?>',
+ '<?php echo Horde::url('services/portal/index.php') ?>',
{ parameters: { httpclient: 1, row: <?php echo (int)$row_num ?>, col: <?php echo (int)$col_num ?> },
method: 'get',
evalScripts: true,
$folder_list = $hylax->storage->listFaxes($folder);
/* Set up URLs which will be used in the list. */
-$view_url = Horde::applicationUrl('view.php');
+$view_url = Horde::url('view.php');
$view_img = Horde::img('view.gif', _("View"), 'align="middle"');
$download_url = Horde_Util::addParameter($view_url, 'action', 'download');
$download_img = Horde::img('download.gif', _("Download"));
-$edit_url = Horde::applicationUrl('edit.php');
+$edit_url = Horde::url('edit.php');
$edit_label = ($folder == 'pending') ? _("Edit") : _("Resend");
$edit_img = Horde::img('edit.gif', $edit_label);
-$del_url = Horde::applicationUrl('delete.php');
+$del_url = Horde::url('delete.php');
$del_img = Horde::img('delete-small.gif', _("Delete"));
$params = array('folder' => $folder, 'path' => $path);
$warn_img = Horde::img('alerts/warning.gif', _("Warning"));
-$send_url = Horde::applicationUrl('send.php');
+$send_url = Horde::url('send.php');
-$print_url = Horde::applicationUrl('print.php');
+$print_url = Horde::url('print.php');
$print_img = Horde::img('print.gif', _("Print"));
/* Loop through list and set up items. */
$actions = array();
foreach ($base_folders as $key => $value) {
if ($folder != $key) {
- $url = Horde_Util::addParameter(Horde::applicationUrl('folder.php'), 'folder', $key);
+ $url = Horde_Util::addParameter(Horde::url('folder.php'), 'folder', $key);
$actions[] = Horde::link($url) . $value . '</a>';
} else {
$actions[] = $value;
$url = Horde_Util::addParameter('img.php', $params);
$img = Horde::img($url, sprintf(_("View page %s"), $i+1), '', $GLOBALS['registry']->get('webroot'));
- $full_url = Horde::applicationUrl(Horde_Util::addParameter('img.php', array('fax_id' => $fax_id, 'page' => $i)));
+ $full_url = Horde::url(Horde_Util::addParameter('img.php', array('fax_id' => $fax_id, 'page' => $i)));
$pages[] = Horde::link('', sprintf(_("View page %s"), $i+1), '', '', "popup('$full_url', $popup_w, $popup_h); return false;") . $img . '</a>';
}
$menu = new Horde_Menu();
- $menu->addArray(array('url' => Horde::applicationUrl('summary.php'),
+ $menu->addArray(array('url' => Horde::url('summary.php'),
'text' => _("Summary"),
'icon' => 'fax.png',
'icon_path' => Horde_Themes::img()));
- $menu->addArray(array('url' => Horde::applicationUrl('folder.php'),
+ $menu->addArray(array('url' => Horde::url('folder.php'),
'text' => _("Folders"),
'icon' => 'folder.png',
'icon_path' => Horde_Themes::img()));
- $menu->addArray(array('url' => Horde::applicationUrl('compose.php'),
+ $menu->addArray(array('url' => Horde::url('compose.php'),
'text' => _("Compose"),
'icon' => 'compose.png',
'icon_path' => Horde_Themes::img()));
}
/* Redirect back. */
-Horde::applicationUrl($url, true)->redirect();
+Horde::url($url, true)->redirect();
$fax = $hylax->storage->getFax($fax_id);
if (is_a($fax, 'PEAR_Error')) {
$notification->push(sprintf(_("Could not open fax ID \"%s\". %s"), $fax_id, $fax->getMessage()), 'horde.error');
- Horde::applicationUrl($url, true)->redirect();
+ Horde::url($url, true)->redirect();
} elseif (!empty($fax['fax_number'])) {
$notification->push(sprintf(_("Fax ID \"%s\" already has a fax number set."), $fax_id), 'horde.error');
- Horde::applicationUrl($url, true)->redirect();
+ Horde::url($url, true)->redirect();
}
$title = _("Send Fax");
} else {
$notification->push(sprintf(_("Fax ID \"%s\" submitted successfully."), $info['fax_id']), 'horde.success');
}
- Horde::applicationUrl($url, true)->redirect();
+ Horde::url($url, true)->redirect();
}
/* Get the preview pages. */
if (is_a($fax, 'PEAR_Error')) {
$notification->push(sprintf(_("Could not open fax ID \"%s\". %s"), $fax_id, $fax->getMessage()), 'horde.error');
if (empty($url)) {
- $url = Horde::applicationUrl('folder.php', true);
+ $url = Horde::url('folder.php', true);
} else {
$url = new Horde_Url($url);
}
$t->set('cacheid', htmlspecialchars($imp_compose->getCacheId()));
$t->set('menu', $injector->getInstance('IMP_Ui_Mimp')->getMenu('compose'));
$t->set('to', htmlspecialchars($header['to']));
-$t->set('url', Horde::applicationUrl('compose-mimp.php'));
+$t->set('url', Horde::url('compose-mimp.php'));
if ($vars->a == 'rc') {
$t->set('redirect', true);
/* Set up the base template now. */
$t = $injector->createInstance('Horde_Template');
$t->setOption('gettext', true);
-$t->set('post_action', Horde::applicationUrl('compose.php')->unique());
+$t->set('post_action', Horde::url('compose.php')->unique());
$t->set('allow_compose', !$compose_disable);
$blank_url = new Horde_Url('#');
if ($registry->hasMethod('contacts/search')) {
$t->set('abook', $blank_url->copy()->link(array(
'class' => 'widget',
- 'onclick.raw' => 'window.open("' . Horde::applicationUrl('contacts.php')->add(array('formname' => 'redirect', 'to_only' => 1)) . '", "contacts", "toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100"); return false;',
+ 'onclick.raw' => 'window.open("' . Horde::url('contacts.php')->add(array('formname' => 'redirect', 'to_only' => 1)) . '", "contacts", "toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100"); return false;',
'title' => _("Address Book")
)) . Horde::img('addressbook_browse.png') . '<br />' . _("Address Book") . '</a>');
}
$compose_options[] = array(
'url' => $blank_url->copy()->link(array(
'class' => 'widget',
- 'onclick.raw' => 'window.open("' . Horde::applicationUrl('contacts.php') . '","contacts","toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100"); return false;'
+ 'onclick.raw' => 'window.open("' . Horde::url('contacts.php') . '","contacts","toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100"); return false;'
)),
'img' => Horde::img('addressbook_browse.png'),
'label' => $show_text ? _("Address Book") : ''
);
if ($type != 'application/octet-stream') {
- $preview_url = Horde::applicationUrl('view.php')->add(array(
+ $preview_url = Horde::url('view.php')->add(array(
'actionID' => 'compose_attach_preview',
'composeCache' => $composeCacheID,
'id' => $atc_num
'xurl' => 'javascript:if(typeof navigator.registerProtocolHandler==\'undefined\')alert(\''
. addslashes(_("Your browser does not support this feature."))
. '\');else navigator.registerProtocolHandler(\'mailto\',\''
- . Horde::applicationUrl('compose.php', true)->setRaw(true)->add(array('actionID' => 'mailto_link', 'to' => ''))
+ . Horde::url('compose.php', true)->setRaw(true)->add(array('actionID' => 'mailto_link', 'to' => ''))
. '%s\',\'' . $GLOBALS['registry']->get('name') . '\');',
'desc' => sprintf(_("Click here to open all mailto: links in %s."), $GLOBALS['registry']->get('name'))
);
$template = $injector->createInstance('Horde_Template');
$template->setOption('gettext', true);
-$template->set('action', Horde::applicationUrl('contacts.php')->unique());
+$template->set('action', Horde::url('contacts.php')->unique());
$template->set('formname', $vars->formname);
$template->set('formInput', Horde_Util::formInput());
$template->set('search', htmlspecialchars($vars->search));
/* Redirect back to the mailbox if folder use is not allowed. */
if (empty($conf['user']['allow_folders'])) {
$notification->push(_("Folder use is not enabled."), 'horde.error');
- Horde::applicationUrl('mailbox-mimp.php', true)->redirect();
+ Horde::url('mailbox-mimp.php', true)->redirect();
}
/* Decide whether or not to show all the unsubscribed folders */
'render_type' => 'Simplehtml'
));
-$selfurl = Horde::applicationUrl('folders-mimp.php');
+$selfurl = Horde::url('folders-mimp.php');
$menu = array(array(_("Refresh"), $selfurl));
if ($subscribe) {
$menu[] = array(
/* Redirect back to the mailbox if folder use is not allowed. */
if (!$conf['user']['allow_folders']) {
$notification->push(_("Folder use is not enabled."), 'horde.error');
- Horde::applicationUrl('mailbox.php', true)->redirect();
+ Horde::url('mailbox.php', true)->redirect();
}
/* Decide whether or not to show all the unsubscribed folders */
$title = _("Folder Navigator");
IMP::prepareMenu();
-Horde::metaRefresh($refresh_time, Horde::applicationUrl('folders.php', true));
+Horde::metaRefresh($refresh_time, Horde::url('folders.php', true));
require IMP_TEMPLATES . '/common-header.inc';
IMP::menu();
IMP::status();
false,
array(
'icon' => Horde_Themes::img('search.png'),
- 'url' => Horde::applicationUrl('search.php')
+ 'url' => Horde::url('search.php')
)
);
return;
}
- $name_url = Horde::applicationUrl('mailbox.php');
+ $name_url = Horde::url('mailbox.php');
/* Initialize the IMP_Tree object. */
$imaptree = $injector->getInstance('IMP_Imap_Tree');
default:
$page = 'mailbox.php';
if ($url) {
- return Horde::applicationUrl($page, true)->add('mailbox', $init_url);
+ return Horde::url($page, true)->add('mailbox', $init_url);
}
IMP::setCurrentMailboxInfo($init_url);
break;
}
return $url
- ? Horde::applicationUrl($page, true)
+ ? Horde::url($page, true)
: IMP_BASE . '/' . $page;
}
}
$auth = $GLOBALS['registry']->getAuth();
- $baseurl = Horde::applicationUrl('attachment.php', true)->setRaw(true);
+ $baseurl = Horde::url('attachment.php', true)->setRaw(true);
try {
$GLOBALS['injector']->getInstance('Horde_Vfs')->getVfs();
if (($mask & self::SUMMARY_IMAGE_SAVE) &&
$GLOBALS['registry']->hasMethod('images/selectGalleries') &&
($mime_part->getPrimaryType() == 'image')) {
- $part['img_save'] = Horde::link('#', _("Save Image in Gallery"), 'saveImgAtc', null, Horde::popupJs(Horde::applicationUrl('saveimage.php'), array('params' => array('mbox' => $this->_mailbox, 'uid' => $this->_uid, 'id' => $id), 'height' => 200, 'width' => 450, 'urlencode' => true)) . 'return false;') . '</a>';
+ $part['img_save'] = Horde::link('#', _("Save Image in Gallery"), 'saveImgAtc', null, Horde::popupJs(Horde::url('saveimage.php'), array('params' => array('mbox' => $this->_mailbox, 'uid' => $this->_uid, 'id' => $id), 'height' => 200, 'width' => 450, 'urlencode' => true)) . 'return false;') . '</a>';
}
/* Add print link? */
$params = $this->_urlViewParams($mime_part, $actionID, isset($options['params']) ? $options['params'] : array());
return empty($options['dload'])
- ? Horde::applicationUrl('view.php', true)->add($params)
+ ? Horde::url('view.php', true)->add($params)
: Horde::downloadUrl($mime_part->getName(true), $params);
}
$options['jstext'] = sprintf(_("View %s"), $mime_part->getDescription(true));
}
- $url = Horde::popupJs(Horde::applicationUrl('view.php'), array('menu' => true, 'onload' => empty($options['onload']) ? '' : $options['onload'], 'params' => $this->_urlViewParams($mime_part, $actionID, isset($options['params']) ? $options['params'] : array()), 'urlencode' => true));
+ $url = Horde::popupJs(Horde::url('view.php'), array('menu' => true, 'onload' => empty($options['onload']) ? '' : $options['onload'], 'params' => $this->_urlViewParams($mime_part, $actionID, isset($options['params']) ? $options['params'] : array()), 'urlencode' => true));
return empty($options['widget'])
? Horde::link('#', $options['jstext'], empty($options['css']) ? null : $options['css'], null, $url) . $text . '</a>'
'uid' => $uid,
'mime_id' => $id
);
- return Horde::popupJs(Horde::applicationUrl('pgp.php'), array('params' => $params, 'height' => 200, 'width' => 450));
+ return Horde::popupJs(Horde::url('pgp.php'), array('params' => $params, 'height' => 200, 'width' => 450));
}
/**
$t = $GLOBALS['injector']->createInstance('Horde_Template');
$t->setOption('gettext', true);
- $t->set('selfurl', Horde::applicationUrl('pgp.php'));
+ $t->set('selfurl', Horde::url('pgp.php'));
$t->set('broken_mp_form', $GLOBALS['browser']->hasQuirk('broken_multipart_form'));
$t->set('reload', htmlspecialchars($reload));
$t->set('target', $target);
'uid' => $uid,
'mime_id' => $id
);
- return Horde::popupJs(Horde::applicationUrl('smime.php'), array('params' => $params, 'height' => 200, 'width' => 450));
+ return Horde::popupJs(Horde::url('smime.php'), array('params' => $params, 'height' => 200, 'width' => 450));
}
/**
$t = $GLOBALS['injector']->createInstance('Horde_Template');
$t->setOption('gettext', true);
- $t->set('selfurl', Horde::applicationUrl('smime.php'));
+ $t->set('selfurl', Horde::url('smime.php'));
$t->set('broken_mp_form', $GLOBALS['browser']->hasQuirk('broken_multipart_form'));
$t->set('reload', htmlspecialchars($reload));
$t->set('target', $target);
if ($simplejs || ($view == 'dimp')) {
$args['popup'] = 1;
- $url = Horde::applicationUrl(($view == 'dimp') ? 'compose-dimp.php' : 'compose.php')->setRaw(true)->add($args);
+ $url = Horde::url(($view == 'dimp') ? 'compose-dimp.php' : 'compose.php')->setRaw(true)->add($args);
$url->toStringCallback = array(__CLASS__, 'composeLinkSimpleCallback');
} elseif (($view != 'mimp') &&
$GLOBALS['prefs']->getValue('compose_popup') &&
$GLOBALS['browser']->hasFeature('javascript')) {
- $url = Horde::applicationUrl('compose.php')->add($args);
+ $url = Horde::url('compose.php')->add($args);
$url->toStringCallback = array(__CLASS__, 'composeLinkJsCallback');
} else {
- $url = Horde::applicationUrl(($view == 'mimp') ? 'compose-mimp.php' : 'compose.php')->add($args);
+ $url = Horde::url(($view == 'mimp') ? 'compose-mimp.php' : 'compose.php')->add($args);
}
return $url;
{
global $conf, $prefs, $registry;
- $menu_search_url = Horde::applicationUrl('search.php');
- $menu_mailbox_url = Horde::applicationUrl('mailbox.php');
+ $menu_search_url = Horde::url('search.php');
+ $menu_mailbox_url = Horde::url('mailbox.php');
$spam_folder = self::folderPref($prefs->getValue('spam_folder'), true);
}
if ($conf['user']['allow_folders']) {
- $menu->add(Horde::applicationUrl('folders.php')->unique(), _("_Folders"), 'folders/folder.png');
+ $menu->add(Horde::url('folders.php')->unique(), _("_Folders"), 'folders/folder.png');
}
if ($_SESSION['imp']['protocol'] != 'pop') {
}
if ($prefs->getValue('filter_menuitem')) {
- $menu->add(Horde::applicationUrl('filterprefs.php'), _("Fi_lters"), 'filters.png');
+ $menu->add(Horde::url('filterprefs.php'), _("Fi_lters"), 'filters.png');
}
return $menu;
{
$url = ($page instanceof Horde_Url)
? clone $page
- : Horde::applicationUrl($page);
+ : Horde::url($page);
return $url->add(self::getIMPMboxParameters($mailbox, $uid, $tmailbox))->setRaw(!$encode);
}
}
$mailbox_url = (IMP::getViewMode() == 'mimp')
- ? Horde::applicationUrl('mailbox-mimp.php')
- : Horde::applicationUrl('mailbox.php');
+ ? Horde::url('mailbox-mimp.php')
+ : Horde::url('mailbox.php');
foreach ($this as $val) {
$after = '';
if (!Horde::isConnectionSecure()) {
$t->set('notsecure', true);
} else {
- $pgp_url = Horde::applicationUrl('pgp.php');
+ $pgp_url = Horde::url('pgp.php');
$t->set('has_key', $GLOBALS['prefs']->getValue('pgp_public_key') && $GLOBALS['prefs']->getValue('pgp_private_key'));
if ($t->get('has_key')) {
$pubkey_list = array();
}
- $pgp_url = Horde::applicationUrl('pgp.php');
+ $pgp_url = Horde::url('pgp.php');
$t = $GLOBALS['injector']->createInstance('Horde_Template');
$t->setOption('gettext', true);
if (!Horde::isConnectionSecure()) {
$t->set('notsecure', true);
} else {
- $smime_url = Horde::applicationUrl('smime.php');
+ $smime_url = Horde::url('smime.php');
$t->set('has_key', $GLOBALS['prefs']->getValue('smime_public_key') && $GLOBALS['prefs']->getValue('smime_private_key'));
if ($t->get('has_key')) {
$pubkey_list = array();
}
- $smime_url = Horde::applicationUrl('smime.php');
+ $smime_url = Horde::url('smime.php');
$t = $GLOBALS['injector']->createInstance('Horde_Template');
$t->setOption('gettext', true);
*/
public function editUrl($id = null)
{
- return Horde::applicationUrl('search.php')->add(array('edit_query' => $this->createSearchID($this->_strip($id))));
+ return Horde::url('search.php')->add(array('edit_query' => $this->createSearchID($this->_strip($id))));
}
/**
*/
public function deleteUrl($id = null)
{
- return Horde::applicationUrl('folders.php')->add(array(
+ return Horde::url('folders.php')->add(array(
'actionID' => 'delete_search_query',
'folders_token' => Horde::getRequestToken('imp.folders'),
'queryid' => $this->createSearchID($this->_strip($id))
$html = $onclick = '';
$newmsgs = array();
- if ($mode == 'imp') {
- $mbox_url = Horde::applicationUrl('mailbox.php');
- } else {
- $mbox_url = Horde::applicationUrl('') . '#folder';
- }
+ $mbox_url = ($mode == 'imp')
+ ? Horde::url('mailbox.php')
+ : Horde::url('')->setAnchor('folder');
foreach ($poll as $folder) {
if (isset($status[$folder]) &&
public function mailboxReturnUrl($url = null)
{
if (!$url) {
- $url = Horde::applicationUrl('mailbox.php');
+ $url = Horde::url('mailbox.php');
}
foreach (array('start', 'page', 'mailbox', 'thismailbox') as $key) {
public function popupSuccess()
{
$menu = new Horde_Menu(Horde_Menu::MASK_NONE);
- $menu->add(Horde::applicationUrl('compose.php'), _("New Message"), 'compose.png');
+ $menu->add(Horde::url('compose.php'), _("New Message"), 'compose.png');
$menu->add(new Horde_Url(''), _("Close this window"), 'close.png', null, null, 'window.close();');
require IMP_TEMPLATES . '/common-header.inc';
$success_template = $GLOBALS['injector']->createInstance('Horde_Template');
}
if (!in_array($page, array('compose', 'search')) && IMP::canCompose()) {
- $items[] = array(_("New Message"), Horde::applicationUrl('compose-mimp.php')->unique());
+ $items[] = array(_("New Message"), Horde::url('compose-mimp.php')->unique());
}
if (!in_array($page, array('folders', 'search'))) {
- $items[] = array(_("Folders"), Horde::applicationUrl('folders-mimp.php'));
+ $items[] = array(_("Folders"), Horde::url('folders-mimp.php'));
}
$items[] = array(_("Log out"), Horde::getServiceLink('logout', 'imp'));
try {
$redirect = Horde::callHook('mbox_redirect', array(IMP::$mailbox), 'imp');
if (!empty($redirect)) {
- Horde::applicationUrl($redirect, true)->redirect();
+ Horde::url($redirect, true)->redirect();
}
} catch (Horde_Exception_HookNotSet $e) {}
/* There is a chance that this page is loaded directly via message.php. If so,
* don't re-include config files, and the following variables will already be
* set: $actionID, $start. */
-$mailbox_url = Horde::applicationUrl('mailbox.php');
+$mailbox_url = Horde::url('mailbox.php');
$mailbox_imp_url = IMP::generateIMPUrl('mailbox.php', IMP::$mailbox)->add('newmail', 1);
if (!Horde_Util::nonInputVar('from_message_page')) {
$actionID = $vars->actionID;
if ($prefs->getValue('compose_popup')) {
Horde::addInlineScript(array(
- Horde::popupJs(Horde::applicationUrl('compose.php'), array('novoid' => true, 'params' => array_merge(array('popup' => 1), $options)))
+ Horde::popupJs(Horde::url('compose.php'), array('novoid' => true, 'params' => array_merge(array('popup' => 1), $options)))
), 'dom');
} else {
- Horde::applicationUrl('compose.php', true)->add($options)->redirect();
+ Horde::url('compose.php', true)->add($options)->redirect();
}
}
break;
}
if (!is_null($rss_box)) {
- $rss_url = Horde::applicationUrl('rss.php') . $rss_box;
+ $rss_url = Horde::url('rss.php') . $rss_box;
}
/* If user wants the mailbox to be refreshed, set time here. */
$hdr_template->set('search_img', Horde::img('search.png', _("Search")));
if (!$search_mbox) {
- $hdr_template->set('search_url', Horde::applicationUrl('search-basic.php')->add('search_mailbox', IMP::$mailbox));
+ $hdr_template->set('search_url', Horde::url('search-basic.php')->add('search_mailbox', IMP::$mailbox));
if (!$readonly) {
$hdr_template->set('empty', $mailbox_imp_url->copy()->add(array(
'actionID' => 'empty_mailbox',
} elseif ($search_mbox && !isset($query_text)) {
/* Mini search results. */
$search_mailbox = reset($imp_search->getSearchFolders());
- $hdr_template->set('search_url', Horde::applicationUrl('search-basic.php')->add('search_mailbox', $search_mailbox));
+ $hdr_template->set('search_url', Horde::url('search-basic.php')->add('search_mailbox', $search_mailbox));
$hdr_template->set('searchclose', IMP::generateIMPUrl('mailbox.php', $search_mailbox));
} elseif (!$vfolder) {
$edit_search = _("Edit Search Query");
/* Generate the link to ourselves. */
$msgindex = $imp_mailbox->getMessageIndex();
-$message_url = Horde::applicationUrl('message.php');
+$message_url = Horde::url('message.php');
$message_token = Horde::getRequestToken('imp.message');
$self_link = IMP::generateIMPUrl('message.php', IMP::$mailbox, $uid, $mailbox_name)->add(array('start' => $msgindex, 'message_token' => $message_token));
$h_page_label = htmlspecialchars($page_label);
$header_label = $h_page_label;
if ($search_mbox) {
- $header_label .= ' [' . Horde::link(Horde::applicationUrl('mailbox.php')->add('mailbox', $mailbox_name)) . IMP::displayFolder($mailbox_name) . '</a>]';
+ $header_label .= ' [' . Horde::link(Horde::url('mailbox.php')->add('mailbox', $mailbox_name)) . IMP::displayFolder($mailbox_name) . '</a>]';
}
/* Prepare the navbar top template. */
'title' => $imp_ui->getSubject($ob['envelope']['subject']),
'pubDate' => date('r', strtotime($ob['envelope']['date'])),
'description' => isset($ob['preview']) ? $ob['preview'] : '',
- 'url' => Horde::applicationURL(IMP::generateIMPUrl('message.php', $mailbox, $ob['uid'], $mailbox), true, -1),
+ 'url' => Horde::url(IMP::generateIMPUrl('message.php', $mailbox, $ob['uid'], $mailbox), true, -1),
'fromAddr' => $from_addr['fullfrom'],
'toAddr' => Horde_Mime_Address::addrArray2String(isset($ob['envelope']['to']) ? $ob['envelope']['to'] : array(), array('charset' => $registry->getCharset()))
));
$t->set('desc', htmlspecialchars($description));
$t->set('title', htmlspecialchars($registry->get('name') . ' - ' . IMP::getLabel($mailbox)));
$t->set('items', $items, true);
-$t->set('url', htmlspecialchars(Horde::applicationURL(IMP::generateIMPUrl('message.php', $mailbox), true, -1)));
-$t->set('rss_url', htmlspecialchars(Horde::applicationUrl('rss.php', true, -1)));
+$t->set('url', htmlspecialchars(Horde::url(IMP::generateIMPUrl('message.php', $mailbox), true, -1)));
+$t->set('rss_url', htmlspecialchars(Horde::url('rss.php', true, -1)));
$browser->downloadHeaders('mailbox.rss', 'text/xml', true);
echo $t->fetch(IMP_TEMPLATES . '/rss/mailbox.rss');
/* Build the template. */
$t = $injector->createInstance('Horde_Template');
$t->setOption('gettext', true);
-$t->set('action', Horde::applicationUrl('saveimage.php'));
+$t->set('action', Horde::url('saveimage.php'));
$t->set('id', htmlspecialchars($vars->id));
$t->set('uid', htmlspecialchars($vars->uid));
$t->set('mbox', htmlspecialchars($vars->mbox));
$id = $imp_ui_search->processBasicSearch($vars->search_mailbox, $vars->search_criteria, $vars->search_criteria_text, $vars->search_criteria_not, $vars->search_flags);
/* Redirect to the mailbox screen. */
- Horde::applicationUrl('mailbox.php', true)->add('mailbox', $imp_search->createSearchID($id))->redirect();
+ Horde::url('mailbox.php', true)->add('mailbox', $imp_search->createSearchID($id))->redirect();
}
$f_fields = $s_fields = array();
$t = $injector->createInstance('Horde_Template');
$t->setOption('gettext', true);
-$t->set('action', Horde::applicationUrl('search-basic.php'));
+$t->set('action', Horde::url('search-basic.php'));
$t->set('mbox', htmlspecialchars($vars->search_mailbox));
$t->set('search_title', sprintf(_("Search %s"), htmlspecialchars(IMP::displayFolder($vars->search_mailbox))));
$t->set('s_fields', $s_fields);
IMP::status();
if ($browser->hasFeature('javascript')) {
- $t->set('advsearch', Horde::link(Horde::applicationUrl('search.php')->add(array('search_mailbox' => $vars->search_mailbox))));
+ $t->set('advsearch', Horde::link(Horde::url('search.php')->add(array('search_mailbox' => $vars->search_mailbox))));
}
echo $t->fetch(IMP_TEMPLATES . '/imp/search/search-basic.html');
exit;
}
- Horde::applicationUrl('mailbox.php', true)->add('mailbox', $id)->redirect();
+ Horde::url('mailbox.php', true)->add('mailbox', $id)->redirect();
}
/* Generate master folder list. */
/* Prepare the search template. */
$t = $injector->createInstance('Horde_Template');
$t->setOption('gettext', true);
-$t->set('action', Horde::applicationUrl('search.php'));
+$t->set('action', Horde::url('search.php'));
$t->set('virtualfolder', $_SESSION['imp']['protocol'] != 'pop');
/* Determine if we are editing a current search folder. */
if ($imp_search->isVFolder($vars->edit_query)) {
if (!$imp_search->isEditableVFolder($vars->edit_query)) {
$notification->push(_("Special Virtual Folders cannot be edited."), 'horde.error');
- Horde::applicationUrl('mailbox.php', true)->redirect();
+ Horde::url('mailbox.php', true)->redirect();
}
$t->set('edit_query_vfolder', htmlspecialchars($vars->edit_query));
}
<?php if ($mailbox_url = Horde_Util::nonInputVar('mailbox_url')): ?>
<link href="<?php echo $mailbox_url ?>" rel="Up" />
<?php elseif (!Horde_Util::nonInputVar('login_page')): ?>
-<link href="<?php echo Horde::applicationUrl('mailbox.php')->add('mailbox', 'INBOX') ?>" rel="Top" />
+<link href="<?php echo Horde::url('mailbox.php')->add('mailbox', 'INBOX') ?>" rel="Top" />
<?php endif; ?>
<?php if ($first_url = Horde_Util::nonInputVar('first_url')): ?>
<link href="<?php echo $first_url ?>" rel="First" />
<link rel="alternate" type="application/rss+xml" href="<?php echo $rss_url ?>" />
<?php endif; ?>
<?php if (!Horde_Util::nonInputVar('login_page')): ?>
-<link href="<?php echo Horde::applicationUrl('search.php') ?>" rel="search" />
+<link href="<?php echo Horde::url('search.php') ?>" rel="search" />
<?php endif ?>
</head>
$code['conf'] = array_filter(array(
// URL variables
'URI_AJAX' => Horde::getServiceLink('ajax', 'imp')->url,
- 'URI_COMPOSE' => (string) Horde::applicationUrl('compose-dimp.php')->setRaw(true)->add('ajaxui', 1),
- 'URI_DIMP' => (string) Horde::applicationUrl('index-dimp.php'),
- 'URI_MESSAGE' => (string) Horde::applicationUrl('message-dimp.php')->setRaw(true)->add('ajaxui', 1),
- 'URI_PREFS' => (string) Horde::getServiceLink('prefsapi', 'imp'),
- 'URI_PREFS_IMP' => (string) Horde::getServiceLink('options', 'imp')->setRaw(true)->add('ajaxui', 1),
- 'URI_SEARCH' => (string) Horde::applicationUrl('search.php'),
- 'URI_VIEW' => (string) Horde::applicationUrl('view.php'),
+ 'URI_COMPOSE' => strval(Horde::url('compose-dimp.php')->setRaw(true)->add('ajaxui', 1)),
+ 'URI_DIMP' => strval(Horde::url('index-dimp.php')),
+ 'URI_MESSAGE' => strval(Horde::url('message-dimp.php')->setRaw(true)->add('ajaxui', 1)),
+ 'URI_PREFS' => strval(Horde::getServiceLink('prefsapi', 'imp')),
+ 'URI_PREFS_IMP' => strval(Horde::getServiceLink('options', 'imp')->setRaw(true)->add('ajaxui', 1)),
+ 'URI_SEARCH' => strval(Horde::url('search.php')),
+ 'URI_VIEW' => strval(Horde::url('view.php')),
'IDX_SEP' => IMP_Dimp::IDX_SEP,
'SESSION_ID' => defined('SID') ? SID : '',
);
if ($GLOBALS['registry']->hasMethod('contacts/search')) {
- $code['conf_compose']['URI_ABOOK'] = (string) Horde::applicationUrl('contacts.php');
+ $code['conf_compose']['URI_ABOOK'] = strval(Horde::url('contacts.php'));
}
if ($GLOBALS['prefs']->getValue('set_priority')) {
/* Redirect if blacklist is not available. */
if (!in_array(Ingo_Storage::ACTION_BLACKLIST, $_SESSION['ingo']['script_categories'])) {
$notification->push(_("Blacklist is not supported in the current filtering driver."), 'horde.error');
- Horde::applicationUrl('filters.php', true)->redirect();
+ Horde::url('filters.php', true)->redirect();
}
/* Get the backend. */
case 'rule_enable':
if (!$edit_allowed) {
$notification->push(_("You do not have permission to edit filter rules."), 'horde.error');
- Horde::applicationUrl('filters.php', true)->redirect();
+ Horde::url('filters.php', true)->redirect();
}
switch ($vars->actionID) {
case 'rule_delete':
if (!$delete_allowed) {
$notification->push(_("You do not have permission to delete filter rules."), 'horde.error');
- Horde::applicationUrl('filters.php', true)->redirect();
+ Horde::url('filters.php', true)->redirect();
}
$tmp = $filters->getFilter($vars->rulenumber);
case 'settings_save':
if (!$edit_allowed) {
$notification->push(_("You do not have permission to edit filter rules."), 'horde.error');
- Horde::applicationUrl('filters.php', true)->redirect();
+ Horde::url('filters.php', true)->redirect();
}
$prefs->setValue('show_filter_msg', $vars->show_filter_msg);
$prefs->setValue('filter_seen', $vars->filter_seen);
case 'apply_filters':
if (!$edit_allowed) {
$notification->push(_("You do not have permission to edit filter rules."), 'horde.error');
- Horde::applicationUrl('filters.php', true)->redirect();
+ Horde::url('filters.php', true)->redirect();
}
$ingo_script->apply();
break;
require INGO_TEMPLATES . '/filters/header.inc';
/* Common URLs. */
-$filters_url = Horde::applicationUrl('filters.php');
-$rule_url = Horde::applicationUrl('rule.php');
+$filters_url = Horde::url('filters.php');
+$rule_url = Horde::url('rule.php');
if (count($filter_list) == 0) {
require INGO_TEMPLATES . '/filters/filter-none.inc';
switch ($filter['action']) {
case Ingo_Storage::ACTION_BLACKLIST:
- $editurl = Horde::applicationUrl('blacklist.php');
+ $editurl = Horde::url('blacklist.php');
$entry['filterimg'] = Horde::img('blacklist.png');
$name = _("Blacklist");
break;
case Ingo_Storage::ACTION_WHITELIST:
- $editurl = Horde::applicationUrl('whitelist.php');
+ $editurl = Horde::url('whitelist.php');
$entry['filterimg'] = Horde::img('whitelist.png');
$name = _("Whitelist");
break;
case Ingo_Storage::ACTION_VACATION:
- $editurl = Horde::applicationUrl('vacation.php');
+ $editurl = Horde::url('vacation.php');
$entry['filterimg'] = Horde::img('vacation.png');
$name = _("Vacation");
break;
case Ingo_Storage::ACTION_FORWARD:
- $editurl = Horde::applicationUrl('forward.php');
+ $editurl = Horde::url('forward.php');
$entry['filterimg'] = Horde::img('forward.png');
$name = _("Forward");
break;
case Ingo_Storage::ACTION_SPAM:
- $editurl = Horde::applicationUrl('spam.php');
+ $editurl = Horde::url('spam.php');
$entry['filterimg'] = Horde::img('spam.png');
$name = _("Spam Filter");
break;
/* Redirect if forward is not available. */
if (!in_array(Ingo_Storage::ACTION_FORWARD, $_SESSION['ingo']['script_categories'])) {
$notification->push(_("Forward is not supported in the current filtering driver."), 'horde.error');
- Horde::applicationUrl('filters.php', true)->redirect();
+ Horde::url('filters.php', true)->redirect();
}
/* Get the forward object and rule. */
/* Load libraries. */
$vars = Horde_Variables::getDefaultVariables();
if ($vars->submitbutton == _("Return to Rules List")) {
- Horde::applicationUrl('filters.php', true)->redirect();
+ Horde::url('filters.php', true)->redirect();
}
/* Build form. */
$html .= $html_pre .
Horde::img('vacation.png', _("Vacation")) .
'</td><td>' .
- Horde::applicationUrl('vacation.php')->link(array('title' => _("Edit"))) .
+ Horde::url('vacation.php')->link(array('title' => _("Edit"))) .
_("Vacation") . '</a> ' . $active . $html_post;
}
break;
if (in_array(Ingo_Storage::ACTION_FORWARD, $_SESSION['ingo']['script_categories'])) {
$html .= $html_pre .
Horde::img('forward.png', _("Forward")) . '</td><td>' .
- Horde::applicationUrl('forward.php')->link(array('title' => _("Edit"))) .
+ Horde::url('forward.php')->link(array('title' => _("Edit"))) .
_("Forward") . '</a> ' . $active;
$data = unserialize($GLOBALS['prefs']->getValue('forward'));
if (!empty($data['a'])) {
$html .= $html_pre .
Horde::img('whitelist.png', _("Whitelist")) .
'</td><td>' .
- Horde::applicationUrl('whitelist.php')->link(array('title' => _("Edit"))) .
+ Horde::url('whitelist.php')->link(array('title' => _("Edit"))) .
_("Whitelist") . '</a> ' . $active . $html_post;
}
break;
$html .= $html_pre .
Horde::img('blacklist.png', _("Blacklist")) .
'</td><td>' .
- Horde::applicationUrl('blacklist.php')->link(array('title' => _("Edit"))) .
+ Horde::url('blacklist.php')->link(array('title' => _("Edit"))) .
_("Blacklist") . '</a> ' . $active . $html_post;
}
break;
$html .= $html_pre .
Horde::img('spam.png', _("Spam Filter")) .
'</td><td>' .
- Horde::applicationUrl('spam.php')->link(array('title' => _("Edit"))) .
+ Horde::url('spam.php')->link(array('title' => _("Edit"))) .
_("Spam Filter") . '</a> ' . $active . $html_post;
}
break;
{
$menu = new Horde_Menu();
try {
- $menu->add(Horde::applicationUrl('filters.php'), _("Filter _Rules"), 'ingo.png', null, null, null, basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
+ $menu->add(Horde::url('filters.php'), _("Filter _Rules"), 'ingo.png', null, null, null, basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
$menu->add(Horde::url($GLOBALS['injector']->getInstance('Horde_Registry')->link('mail/showWhitelist')), _("_Whitelist"), 'whitelist.png');
$menu->add(Horde::url($GLOBALS['injector']->getInstance('Horde_Registry')->link('mail/showBlacklist')), _("_Blacklist"), 'blacklist.png');
} catch (Horde_Exception $e) {
Horde::logMessage($e->getMessage(), 'ERR');
}
if (in_array(Ingo_Storage::ACTION_VACATION, $_SESSION['ingo']['script_categories'])) {
- $menu->add(Horde::applicationUrl('vacation.php'), _("_Vacation"), 'vacation.png');
+ $menu->add(Horde::url('vacation.php'), _("_Vacation"), 'vacation.png');
}
if (in_array(Ingo_Storage::ACTION_FORWARD, $_SESSION['ingo']['script_categories'])) {
- $menu->add(Horde::applicationUrl('forward.php'), _("_Forward"), 'forward.png');
+ $menu->add(Horde::url('forward.php'), _("_Forward"), 'forward.png');
}
if (in_array(Ingo_Storage::ACTION_SPAM, $_SESSION['ingo']['script_categories'])) {
- $menu->add(Horde::applicationUrl('spam.php'), _("S_pam"), 'spam.png');
+ $menu->add(Horde::url('spam.php'), _("S_pam"), 'spam.png');
}
if ($_SESSION['ingo']['script_generate'] &&
(!$GLOBALS['prefs']->isLocked('auto_update') ||
!$GLOBALS['prefs']->getValue('auto_update'))) {
- $menu->add(Horde::applicationUrl('script.php'), _("_Script"), 'script.png');
+ $menu->add(Horde::url('script.php'), _("_Script"), 'script.png');
}
if (!empty($GLOBALS['ingo_shares']) && empty($GLOBALS['conf']['share']['no_sharing'])) {
$menu->add('#', _("_Permissions"), 'perms.png', Horde_Themes::img(null, 'horde'), '', Horde::popupJs(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/shares/edit.php', true), array('params' => array('app' => 'ingo', 'share' => $_SESSION['ingo']['backend']['id'] . ':' . $GLOBALS['registry']->getAuth()), 'urlencode' => true)) . 'return false;');
$message = @htmlspecialchars(_("You are not allowed to create or edit custom rules."), ENT_COMPAT, $GLOBALS['registry']->getCharset());
}
$notification->push($message, 'horde.error', array('content.raw'));
- Horde::applicationUrl('filters.php', true)->redirect();
+ Horde::url('filters.php', true)->redirect();
}
/* Load the Ingo_Script:: driver. */
$availActions = $ingo_script->availableActions();
if (empty($availActions)) {
$notification->push(_("Individual rules are not supported in the current filtering driver."), 'horde.error');
- Horde::applicationUrl('filters.php', true)->redirect();
+ Horde::url('filters.php', true)->redirect();
}
/* This provides the $ingo_fields array. */
case 'rule_delete':
if (!Ingo::hasSharePermission(Horde_Perms::EDIT)) {
$notification->push(_("You do not have permission to edit filter rules."), 'horde.error');
- header('Location: ' . Horde::applicationUrl('filters.php', true));
+ header('Location: ' . Horde::url('filters.php', true));
exit;
}
if (!isset($vars->edit)) {
if ($perms->hasAppPermission('max_rules') !== true &&
$perms->hasAppPermission('max_rules') <= count($filters->getFilterList())) {
- header('Location: ' . Horde::applicationUrl('filters.php', true));
+ header('Location: ' . Horde::url('filters.php', true));
exit;
}
$filters->addRule($rule);
Ingo::updateScript();
}
- header('Location: ' . Horde::applicationUrl('filters.php'));
+ header('Location: ' . Horde::url('filters.php'));
exit;
}
if ($vars->actionID == 'rule_delete') {
if (!Ingo::hasSharePermission(Horde_Perms::DELETE)) {
$notification->push(_("You do not have permission to delete filter rules."), 'horde.error');
- header('Location: ' . Horde::applicationUrl('filters.php', true));
+ header('Location: ' . Horde::url('filters.php', true));
exit;
}
if (isset($vars->conditionnumber)) {
default:
if (!Ingo::hasSharePermission(Horde_Perms::EDIT)) {
$notification->push(_("You do not have permission to edit filter rules."), 'horde.error');
- header('Location: ' . Horde::applicationUrl('filters.php', true));
+ header('Location: ' . Horde::url('filters.php', true));
exit;
}
if (!isset($vars->edit)) {
$message = @htmlspecialchars(sprintf(_("You are not allowed to create more than %d rules."), $perms->hasAppPermission('max_rules')), ENT_COMPAT, $GLOBALS['registry']->getCharset());
}
$notification->push($message, 'horde.error', array('content.raw'));
- header('Location: ' . Horde::applicationUrl('filters.php', true));
+ header('Location: ' . Horde::url('filters.php', true));
exit;
}
$rule = $filters->getDefaultRule();
if (!$rule) {
$notification->push(_("Filter not found."), 'horde.error');
- header('Location: ' . Horde::applicationUrl('filters.php', true));
+ header('Location: ' . Horde::url('filters.php', true));
exit;
}
/* Redirect if script updating is not available. */
if (!$_SESSION['ingo']['script_generate']) {
- Horde::applicationUrl('filters.php', true)->redirect();
+ Horde::url('filters.php', true)->redirect();
}
$script = '';
if (!in_array(Ingo_Storage::ACTION_SPAM, $_SESSION['ingo']['script_categories'])) {
$notification->push(_("Simple spam filtering is not supported in the current filtering driver."), 'horde.error');
- Horde::applicationUrl('filters.php', true)->redirect();
+ Horde::url('filters.php', true)->redirect();
}
/* Get the spam object and rule. */
$vars = Horde_Variables::getDefaultVariables();
if ($vars->submitbutton == _("Return to Rules List")) {
- Horde::applicationUrl('filters.php', true)->redirect();
+ Horde::url('filters.php', true)->redirect();
}
/* Build form. */
-<form method="post" name="filters" action="<?php echo Horde::applicationUrl('blacklist.php') ?>">
+<form method="post" name="filters" action="<?php echo Horde::url('blacklist.php') ?>">
<?php Horde_Util::pformInput() ?>
<input type="hidden" name="actionID" value="rule_update" />
<input type="hidden" name="new_folder_name" value="" />
<tr>
<td class="control" colspan="2">
<input class="button" type="submit" value=" <?php echo _("Save") ?> " />
- <input class="button" type="button" onclick="document.location.href='<?php echo Horde::applicationUrl('filters.php', true) ?>'" value="<?php echo _("Return to Rules List") ?>" />
+ <input class="button" type="button" onclick="document.location.href='<?php echo Horde::url('filters.php', true) ?>'" value="<?php echo _("Return to Rules List") ?>" />
</td>
</tr>
</table>
-<form method="post" name="filters" action="<?php echo Horde::applicationUrl('filters.php') ?>">
+<form method="post" name="filters" action="<?php echo Horde::url('filters.php') ?>">
<?php Horde_Util::pformInput() ?>
<input type="hidden" name="actionID" value="" />
<div class="header">
<tr>
<td class="control" colspan="2">
<input class="button" type="button" onclick="document.rule.actionID.value='rule_save';document.rule.submit(); return true;" value=" <?php echo _("Save") ?> " />
- <input class="button" type="button" onclick="document.location.href='<?php echo Horde::applicationUrl('filters.php', true) ?>'" value="<?php echo _("Return to Filters List") ?>" />
+ <input class="button" type="button" onclick="document.location.href='<?php echo Horde::url('filters.php', true) ?>'" value="<?php echo _("Return to Filters List") ?>" />
</td>
</tr>
</table>
-<form method="post" name="rule" action="<?php echo Horde::applicationUrl('rule.php') ?>">
+<form method="post" name="rule" action="<?php echo Horde::url('rule.php') ?>">
<?php Horde_Util::pformInput() ?>
<input type="hidden" name="actionID" value="rule_update" />
<input type="hidden" name="conditionnumber" value="-1" />
<tr>
<?php if ($actionID != 'show_active'): ?>
<td>
- <form method="post" name="activate_script" action="<?php echo Horde::applicationUrl('script.php') ?>">
+ <form method="post" name="activate_script" action="<?php echo Horde::url('script.php') ?>">
<?php Horde_Util::pformInput() ?>
<input type="hidden" name="actionID" value="action_activate" />
<input class="button" type="submit" name="submit" value="<?php echo _("Activate Script") ?>" />
</form>
</td>
<td>
- <form method="post" name="deactivate_script" action="<?php echo Horde::applicationUrl('script.php') ?>">
+ <form method="post" name="deactivate_script" action="<?php echo Horde::url('script.php') ?>">
<?php Horde_Util::pformInput() ?>
<input type="hidden" name="actionID" value="action_deactivate" />
<input class="button" type="submit" name="submit" value="<?php echo _("Deactivate Script") ?>" />
</form>
</td>
<td>
- <form method="post" name="show_active_script" action="<?php echo Horde::applicationUrl('script.php') ?>">
+ <form method="post" name="show_active_script" action="<?php echo Horde::url('script.php') ?>">
<?php Horde_Util::pformInput() ?>
<input type="hidden" name="actionID" value="show_active" />
<input class="button" type="submit" name="submit" value="<?php echo _("Show Active Script") ?>" />
</td>
<?php else: ?>
<td>
- <form method="post" name="show_current_script" action="<?php echo Horde::applicationUrl('script.php') ?>">
+ <form method="post" name="show_current_script" action="<?php echo Horde::url('script.php') ?>">
<?php Horde_Util::pformInput() ?>
<input class="button" type="submit" name="submit" value="<?php echo _("Show Current Script") ?>" />
</form>
-<form method="post" name="filters" action="<?php echo Horde::applicationUrl('whitelist.php') ?>">
+<form method="post" name="filters" action="<?php echo Horde::url('whitelist.php') ?>">
<?php Horde_Util::pformInput() ?>
<input type="hidden" name="actionID" value="rule_update" />
<h1 class="header">
<tr>
<td colspan="2" class="control">
<input class="button" type="submit" value=" <?php echo _("Save") ?> " />
- <input class="button" type="button" onclick="document.location.href='<?php echo Horde::applicationUrl('filters.php', true) ?>'" value="<?php echo _("Return to Rules List") ?>" />
+ <input class="button" type="button" onclick="document.location.href='<?php echo Horde::url('filters.php', true) ?>'" value="<?php echo _("Return to Rules List") ?>" />
</td>
</tr>
</table>
/* Redirect if vacation is not available. */
if (!in_array(Ingo_Storage::ACTION_VACATION, $_SESSION['ingo']['script_categories'])) {
$notification->push(_("Vacation is not supported in the current filtering driver."), 'horde.error');
- Horde::applicationUrl('filters.php', true)->redirect();
+ Horde::url('filters.php', true)->redirect();
}
/* Get vacation object and rules. */
/* Load libraries. */
$vars = Horde_Variables::getDefaultVariables();
if ($vars->submitbutton == _("Return to Rules List")) {
- Horde::applicationUrl('filters.php', true)->redirect();
+ Horde::url('filters.php', true)->redirect();
}
/* Build form. */
/* Redirect if whitelist not available. */
if (!in_array(Ingo_Storage::ACTION_WHITELIST, $_SESSION['ingo']['script_categories'])) {
$notification->push(_("Whitelist is not supported in the current filtering driver."), 'horde.error');
- Horde::applicationUrl('filters.php', true)->redirect();
+ Horde::url('filters.php', true)->redirect();
}
$whitelist = $ingo_storage->retrieve(Ingo_Storage::ACTION_WHITELIST);
$menu = new Horde_Menu();
/* Jeta Home. */
- $menu->addArray(array('url' => Horde::applicationUrl('index.php'), 'text' => _("_Shell"), 'icon' => 'jeta.png', 'class' => (basename($_SERVER['PHP_SELF']) == 'index.php') ? 'current' : ''));
+ $menu->addArray(array('url' => Horde::url('index.php'), 'text' => _("_Shell"), 'icon' => 'jeta.png', 'class' => (basename($_SERVER['PHP_SELF']) == 'index.php') ? 'current' : ''));
return $menu;
}
function _getLinks($id, $subid, $name, $title)
{
- $url = Horde::applicationUrl('channels/aggregate.php');
+ $url = Horde::url('channels/aggregate.php');
$url = Horde_Util::addParameter($url, 'channel_id', $id);
$url = Horde_Util::addParameter($url, 'subchannel_id', $subid);
$edit = array('url' => Horde_Util::addParameter($url,'action', 'edit'), 'text' => sprintf(_("Edit channel \"%s\""), $name), 'title' => $title);
$channel_type = $channel['channel_type'];
if ($channel_type != Jonah::AGGREGATED_CHANNEL) {
$notification->push(_("This is no aggregated channel."), 'horde.error');
- Horde::applicationUrl('channels/edit.php', true)
+ Horde::url('channels/edit.php', true)
->add('channel_id', $channel_id)
->redirect();
}
}
}
- Horde::applicationUrl('channels/aggregate.php', true)
+ Horde::url('channels/aggregate.php', true)
->add('channel_id', $channel_id)
->redirect();
}
}
}
- Horde::applicationUrl('channels/aggregate.php', true)
+ Horde::url('channels/aggregate.php', true)
->add('channel_id', $channel_id)
->redirect();
} elseif ($vars->get('action') == 'edit') {
$channel = $news->getChannel($channel_id);
if (is_a($channel, 'PEAR_Error')) {
$notification->push(_("Invalid channel specified for deletion."), 'horde.message');
- Horde::applicationUrl('channels/index.php', true)->redirect();
+ Horde::url('channels/index.php', true)->redirect();
}
/* Check permissions and deny if not allowed. */
$notification->push(sprintf(_("There was an error deleting the channel: %s"), $delete->getMessage()), 'horde.error');
} else {
$notification->push(_("The channel has been deleted."), 'horde.success');
- Horde::applicationUrl('channels/index.php', true)->redirect();
+ Horde::url('channels/index.php', true)->redirect();
}
}
} elseif (!empty($form_submit)) {
$notification->push(_("Channel has not been deleted."), 'horde.message');
- Horde::applicationUrl('channels/index.php', true)->redirect();
+ Horde::url('channels/index.php', true)->redirect();
}
$template = new Horde_Template();
if ($channel_type == Jonah::AGGREGATED_CHANNEL) {
$notification->push(_("You can now edit the sub-feeds."), 'horde.message');
} else {
- Horde::applicationUrl('channels/index.php', true)->redirect();
+ Horde::url('channels/index.php', true)->redirect();
}
}
}
$have_news = Jonah_News::getAvailableTypes();
if (empty($have_news)) {
$notification->push(_("News is not enabled."), 'horde.warning');
- Horde::applicationUrl('index.php', true)->redirect();
+ Horde::url('index.php', true)->redirect();
}
$news = Jonah_News::factory();
/* Build channel specific fields. */
foreach ($channels as $key => $channel) {
/* Edit channel link. */
- $url = Horde::applicationUrl('channels/edit.php');
+ $url = Horde::url('channels/edit.php');
$url = Horde_Util::addParameter($url, 'channel_id', $channel['channel_id']);
$channels[$key]['edit_link'] = Horde::link($url, _("Edit channel"), '', '', '', _("Edit channel")) . Horde::img('edit.png') . '</a>';
/* Delete channel link. */
- $url = Horde::applicationUrl('channels/delete.php');
+ $url = Horde::url('channels/delete.php');
$url = Horde_Util::addParameter($url, 'channel_id', $channel['channel_id']);
$channels[$key]['delete_link'] = Horde::link($url, _("Delete channel"), '', '', '', _("Delete channel")) . Horde::img('delete.png') . '</a>';
/* View stories link. */
- $url = Horde::applicationUrl('stories/index.php');
+ $url = Horde::url('stories/index.php');
$url = Horde_Util::addParameter($url, 'channel_id', $channel['channel_id']);
$channels[$key]['stories_url'] = $url;
switch ($channel['channel_type']) {
case Jonah::INTERNAL_CHANNEL:
/* Add story link. */
- $url = Horde::applicationUrl('stories/edit.php');
+ $url = Horde::url('stories/edit.php');
$url = Horde_Util::addParameter($url, 'channel_id', $channel['channel_id']);
$channels[$key]['addstory_link'] = Horde::link($url, _("Add story"), '', '', '', _("Add story")) . Horde::img('new.png') . '</a>';
break;
case Jonah::EXTERNAL_CHANNEL:
case Jonah::AGGREGATED_CHANNEL:
/* Refresh cache link. */
- $url = Horde::applicationUrl('stories/index.php');
+ $url = Horde::url('stories/index.php');
$url = Horde_Util::addParameter($url, array('channel_id' => $channel['channel_id'], 'refresh' => '1', 'url' => Horde::selfUrl()));
$channels[$key]['refresh_link'] = Horde::link($url, _("Refresh channel"), '', '', '', _("Refresh channel")) . Horde::img('reload.png') . '</a>';
break;
if (is_a($channel, 'PEAR_Error')) {
Horde::logMessage($channel, 'ERR');
$notification->push(_("Invalid channel."), 'horde.error');
- Horde::applicationUrl('delivery/index.php', true)->redirect();
+ Horde::url('delivery/index.php', true)->redirect();
}
$title = sprintf(_("HTML Delivery for \"%s\""), $channel['channel_name']);
$template->set('channel_desc', @htmlspecialchars($channel['channel_desc'], ENT_COMPAT, $GLOBALS['registry']->getCharset()));
$template->set('channel_updated', htmlspecialchars(date('r', $channel['channel_updated'])));
$template->set('channel_official', htmlspecialchars($channel['channel_official']));
-$template->set('channel_rss', htmlspecialchars(Horde_Util::addParameter(Horde::applicationUrl('delivery/rss.php', true, -1), array('type' => 'rss', 'channel_id' => $channel['channel_id']))));
-$template->set('channel_rss2', htmlspecialchars(Horde_Util::addParameter(Horde::applicationUrl('delivery/rss.php', true, -1), array('type' => 'rss2', 'channel_id' => $channel['channel_id']))));
+$template->set('channel_rss', htmlspecialchars(Horde_Util::addParameter(Horde::url('delivery/rss.php', true, -1), array('type' => 'rss', 'channel_id' => $channel['channel_id']))));
+$template->set('channel_rss2', htmlspecialchars(Horde_Util::addParameter(Horde::url('delivery/rss.php', true, -1), array('type' => 'rss2', 'channel_id' => $channel['channel_id']))));
foreach ($stories as &$story) {
$story['story_title'] = @htmlspecialchars($story['story_title'], ENT_COMPAT, $GLOBALS['registry']->getCharset());
$story['story_desc'] = @htmlspecialchars($story['story_desc'], ENT_COMPAT, $GLOBALS['registry']->getCharset());
return;
}
- $url = Horde::applicationUrl('stories/');
+ $url = Horde::url('stories/');
$news = Jonah_News::factory();
$channels = $news->getChannels('internal');
if ($channels instanceof PEAR_Error) {
'results_url' => array(
'name' => _("Results URL"),
'type' => 'text',
- 'default' => Horde::applicationUrl('stories/results.php?tag_id=@id@')));
+ 'default' => Horde::url('stories/results.php?tag_id=@id@')));
}
function _title()
foreach ($channels as $key => $channel) {
/* Link for HTML delivery. */
- $url = Horde::applicationUrl('delivery/html.php')->add('channel_id', $channel['channel_id']);
+ $url = Horde::url('delivery/html.php')->add('channel_id', $channel['channel_id']);
$label = sprintf(_("\"%s\" stories in HTML"), $channel['channel_name']);
$html .= '<tr><td width="140">' .
Horde::img('story_marker.png') . ' ' .
$html .= '<td>' . ($channel['channel_updated'] ? date('M d, Y H:i', (int)$channel['channel_updated']) : '-') . '</td>';
/* Link for feed delivery. */
- $url = Horde::applicationUrl('delivery/rss.php', true, -1)->add('channel_id', $channel['channel_id']);
+ $url = Horde::url('delivery/rss.php', true, -1)->add('channel_id', $channel['channel_id']);
$label = sprintf(_("RSS Feed of \"%s\""), $channel['channel_name']);
$html .= '<td align="right" class="nowrap">' .
$url->link(array('title' => $label)) .
$channel[$channel_id] = $this->_getChannel($channel_id);
if (empty($channel[$channel_id]['channel_link'])) {
$channel[$channel_id]['channel_official'] =
- Horde::applicationUrl('delivery/html.php', true, -1)->add('channel_id', $channel_id)->setRaw(false);
+ Horde::url('delivery/html.php', true, -1)->add('channel_id', $channel_id)->setRaw(false);
} else {
$channel[$channel_id]['channel_official'] = str_replace(array('%25c', '%c'), array('%c', $channel_id), $channel[$channel_id]['channel_link']);
}
{
global $conf, $registry;
- $channel['channel_link'] = Horde::applicationUrl('delivery/html.php', true, -1)->add('channel_id', $channel['channel_id']);
+ $channel['channel_link'] = Horde::url('delivery/html.php', true, -1)->add('channel_id', $channel['channel_id']);
$stories = $this->_legacyGetStories($channel['channel_id'], $max, $from, $date, $unreleased, $order);
$date_format = $GLOBALS['prefs']->getValue('date_format');
$comments = $conf['comments']['allow'] && $registry->hasMethod('forums/numMessages');
!empty($channel['channel_story_url'])) {
$url = $channel['channel_story_url'];
} else {
- $url = Horde::applicationUrl('stories/view.php', true, -1)->add(array('channel_id' => '%c', 'story_id' => '%s'))->setRaw(false);
+ $url = Horde::url('stories/view.php', true, -1)->add(array('channel_id' => '%c', 'story_id' => '%s'))->setRaw(false);
}
return new Horde_Url(str_replace(array('%25c', '%25s', '%c', '%s'),
array('%c', '%s', $channel['channel_id'], $story['story_id']),
$this->addVariable(
_("Channel Slug"), 'channel_slug', 'text', true, false,
sprintf(_("Slugs allows direct access to this channel's content by visiting: %s. <br /> Slug names may contain only letters, numbers or the _ (underscore) character."),
- Horde::applicationUrl('slugname', true)),
+ Horde::url('slugname', true)),
array('/^[a-zA-Z1-9_]*$/'));
$this->addVariable(_("Include full story content in syndicated feeds?"), 'channel_full_feed', 'boolean', false);
$v = &$this->addVariable(_("Caching"), 'channel_interval', 'enum', false, false, _("The interval before stories aggregated into this feeds are rechecked for updates. If none, then stories will always be refetched from the sources."), array($interval));
$v->setDefault('86400');
if (!empty($channel_id)) {
- $edit_url = Horde::applicationUrl('channels/aggregate.php');
+ $edit_url = Horde::url('channels/aggregate.php');
$edit_url = Horde_Util::addParameter($edit_url, 'channel_id', $channel_id);
$edit_url = Horde_Util::addParameter($edit_url, 'channel_id', $channel_id);
$this->addVariable(_("Source URLs"), 'channel_urls', 'link', false, false, null, array(array('text' => _("Edit aggregated feeds"), 'url' => $edit_url)));
/* If authorized, show admin links. */
if (Jonah::checkPermissions('jonah:news', Horde_Perms::EDIT)) {
- $menu->addArray(array('url' => Horde::applicationUrl('channels/index.php'), 'text' => _("_Feeds"), 'icon' => 'jonah.png'));
+ $menu->addArray(array('url' => Horde::url('channels/index.php'), 'text' => _("_Feeds"), 'icon' => 'jonah.png'));
}
foreach ($conf['news']['enable'] as $channel_type) {
if (Jonah::checkPermissions($channel_type, Horde_Perms::EDIT)) {
- $menu->addArray(array('url' => Horde::applicationUrl('channels/edit.php'), 'text' => _("New Feed"), 'icon' => 'new.png'));
+ $menu->addArray(array('url' => Horde::url('channels/edit.php'), 'text' => _("New Feed"), 'icon' => 'new.png'));
break;
}
}
$channel = $news->getChannel($channel_id);
if ($channel['channel_type'] == Jonah::INTERNAL_CHANNEL &&
Jonah::checkPermissions(Jonah::typeToPermName($channel['channel_type']), Horde_Perms::EDIT, $channel_id)) {
- $menu->addArray(array('url' => Horde::applicationUrl('stories/edit.php')->add('channel_id', (int)$channel_id), 'text' => _("_New Story"), 'icon' => 'new.png'));
+ $menu->addArray(array('url' => Horde::url('stories/edit.php')->add('channel_id', (int)$channel_id), 'text' => _("_New Story"), 'icon' => 'new.png'));
}
}
$channel[$channel_id] = $this->_getChannel($channel_id);
if (!is_a($channel[$channel_id], 'PEAR_Error')) {
if (empty($channel[$channel_id]['channel_link'])) {
- $channel[$channel_id]['channel_official'] = Horde_Util::addParameter(Horde::applicationUrl('delivery/html.php', true, -1), 'channel_id', $channel_id, false);
+ $channel[$channel_id]['channel_official'] = Horde_Util::addParameter(Horde::url('delivery/html.php', true, -1), 'channel_id', $channel_id, false);
} else {
$channel[$channel_id]['channel_official'] = str_replace(array('%25c', '%c'), array('%c', $channel_id), $channel[$channel_id]['channel_link']);
}
!empty($channel['channel_story_url'])) {
$url = $channel['channel_story_url'];
} else {
- $url = Horde_Util::addParameter(Horde::applicationUrl('stories/view.php', true, -1), array('channel_id' => '%c', 'story_id' => '%s'), null, false);
+ $url = Horde_Util::addParameter(Horde::url('stories/view.php', true, -1), array('channel_id' => '%c', 'story_id' => '%s'), null, false);
}
return str_replace(array('%25c', '%25s', '%c', '%s'),
array('%c', '%s', $channel['channel_id'], $story['story_id']),
$channel = $news->isChannelEditable($channel_id);
if (is_a($channel, 'PEAR_Error')) {
$notification->push(sprintf(_("Story editing failed: %s"), $channel->getMessage()), 'horde.error');
- Horde::applicationUrl('channels/index.php', true)->redirect();
+ Horde::url('channels/index.php', true)->redirect();
}
/* Check permissions. */
$story = $news->getStory($channel_id, $story_id);
if (is_a($story, 'PEAR_Error')) {
$notification->push(_("No valid story requested for deletion."), 'horde.message');
- Horde::applicationUrl('channels/index.php', true)->redirect();
+ Horde::url('channels/index.php', true)->redirect();
}
/* If not yet submitted set up the form vars from the fetched story. */
$notification->push(sprintf(_("There was an error deleting the story: %s"), $delete->getMessage()), 'horde.error');
} else {
$notification->push(_("The story has been deleted."), 'horde.success');
- Horde::applicationUrl('stories/index.php', true)
+ Horde::url('stories/index.php', true)
->add('channel_id', $channel_id)
->redirect();
}
}
} elseif (!empty($form_submit)) {
$notification->push(_("Story has not been deleted."), 'horde.message');
- Horde::applicationUrl('stories/index.php', true)
+ Horde::url('stories/index.php', true)
->add('channel_id', $channel_id)
->redirect();
}
$channel = $news->isChannelEditable($channel_id);
if (is_a($channel, 'PEAR_Error')) {
$notification->push(sprintf(_("Story editing failed: %s"), $channel->getMessage()), 'horde.error');
- Horde::applicationUrl('channels/index.php', true)->redirect();
+ Horde::url('channels/index.php', true)->redirect();
}
/* Check permissions. */
$notification->push(sprintf(_("There was an error saving the story: %s"), $result->getMessage()), 'horde.error');
} else {
$notification->push(sprintf(_("The story \"%s\" has been saved."), $info['story_title']), 'horde.success');
- Horde::applicationUrl('stories/index.php', true)
+ Horde::url('stories/index.php', true)
->add('channel_id', $channel_id)
->redirect();
}
$channel_id = Horde_Util::getFormData('channel_id');
if (empty($channel_id)) {
$notification->push(_("No channel requested."), 'horde.error');
- Horde::applicationUrl('channels/index.php', true)->redirect();
+ Horde::url('channels/index.php', true)->redirect();
}
$channel = $news->getChannel($channel_id);
$stories = $news->getStories($channel_id, null, 0, !empty($refresh), null, true);
if (is_a($stories, 'PEAR_Error')) {
$notification->push(sprintf(_("Invalid channel requested. %s"), $stories->getMessage()), 'horde.error');
- Horde::applicationUrl('channels/index.php', true)->redirect();
+ Horde::url('channels/index.php', true)->redirect();
}
/* Do some state tests. */
$stories[$key]['view_link'] = Horde::link(Horde::url($story['story_link']), $story['story_desc']) . htmlspecialchars($story['story_title']) . '</a>';
/* PDF link. */
- $url = Horde::applicationUrl('stories/pdf.php');
+ $url = Horde::url('stories/pdf.php');
$url = Horde_Util::addParameter($url, array('story_id' => $story['story_id'], 'channel_id' => $channel_id));
$stories[$key]['pdf_link'] = Horde::link($url, _("PDF version")) . Horde::img('mime/pdf.png') . '</a>';
/* Edit story link. */
- $url = Horde::applicationUrl('stories/edit.php');
+ $url = Horde::url('stories/edit.php');
$url = Horde_Util::addParameter($url, array('story_id' => $story['story_id'], 'channel_id' => $channel_id));
$stories[$key]['edit_link'] = Horde::link($url, _("Edit story")) . Horde::img('edit.png') . '</a>';
/* Delete story link. */
if ($allow_delete) {
- $url = Horde::applicationUrl('stories/delete.php');
+ $url = Horde::url('stories/delete.php');
$url = Horde_Util::addParameter($url, array('story_id' => $story['story_id'], 'channel_id' => $channel_id));
$stories[$key]['delete_link'] = Horde::link($url, _("Delete story")) . Horde::img('delete.png') . '</a>';
}
/* Make sure we actually requested a tag search */
if (empty($tag_id)) {
$notification->push(_("No tag requested."), 'horde.error');
- Horde::applicationUrl('channels/index.php', true)->redirect();
+ Horde::url('channels/index.php', true)->redirect();
}
$tag_name = array_shift($news->getTagNames(array($tag_id)));
$stories = $news->searchTagsById(array($tag_id), 10, 0, $channel_ids);
if (is_a($stories, 'PEAR_Error')) {
$notification->push(sprintf(_("Invalid channel requested. %s"), $stories->getMessage()), 'horde.error');
- Horde::applicationUrl('channels/index.php', true)->redirect();
+ Horde::url('channels/index.php', true)->redirect();
}
/* Do some state tests. */
$stories[$key]['view_link'] = Horde::link(Horde::url($story['story_link']), $story['story_desc']) . htmlspecialchars($story['story_title']) . '</a>';
/* PDF link. */
- $url = Horde::applicationUrl('stories/pdf.php');
+ $url = Horde::url('stories/pdf.php');
$url = Horde_Util::addParameter($url, array('story_id' => $story['story_id'], 'channel_id' => $channel_id));
$stories[$key]['pdf_link'] = Horde::link($url, _("PDF version")) . Horde::img('mime/pdf.png') . '</a>';
/* Edit story link. */
if (Jonah::checkPermissions(Jonah::typeToPermName(Jonah::INTERNAL_CHANNEL), Horde_Perms::EDIT, $channel_id)) {
- $url = Horde::applicationUrl('stories/edit.php');
+ $url = Horde::url('stories/edit.php');
$url = Horde_Util::addParameter($url, array('story_id' => $story['story_id'], 'channel_id' => $channel_id));
$stories[$key]['edit_link'] = Horde::link($url, _("Edit story")) . Horde::img('edit.png') . '</a>';
}
/* Delete story link. */
if (Jonah::checkPermissions(Jonah::typeToPermName(Jonah::INTERNAL_CHANNEL), Horde_Perms::DELETE, $channel_id)) {
- $url = Horde::applicationUrl('stories/delete.php');
+ $url = Horde::url('stories/delete.php');
$url = Horde_Util::addParameter($url, array('story_id' => $story['story_id'], 'channel_id' => $channel_id));
$stories[$key]['delete_link'] = Horde::link($url, _("Delete story")) . Horde::img('delete.png') . '</a>';
}
$story_id = $vars->get('story_id');
if (!$conf['sharing']['allow']) {
- Horde::applicationUrl('stories/view.php', true)
+ Horde::url('stories/view.php', true)
->add(array('story_id' => $story_id, 'channel_id' => $channel_id))
->redirect();
}
$channel = $news->getChannel($channel_id);
if (empty($channel['channel_story_url'])) {
- $story_url = Horde::applicationUrl('stories/view.php', true);
+ $story_url = Horde::url('stories/view.php', true);
$story_url = Horde_Util::addParameter($story_url, array('channel_id' => '%c', 'story_id' => '%s'));
} else {
$story_url = $channel['channel_story_url'];
/* Prepare the story's tags for display */
$tag_html = array();
-$tag_link = Horde_Util::addParameter(Horde::applicationUrl('stories/results.php'), 'channel_id', $channel_id);
+$tag_link = Horde_Util::addParameter(Horde::url('stories/results.php'), 'channel_id', $channel_id);
foreach ($story['story_tags'] as $id => $tag) {
$link = Horde_Util::addParameter($tag_link, 'tag_id', $id);
$tag_html[] = Horde::link($link) . $tag . '</a>';
$view_template->set('cloud', '<div class="tagSelector" ' . $cloud->buildHTML() . '</div>', true);
/* Insert link for sharing. */
if ($conf['sharing']['allow']) {
- $url = Horde::applicationUrl('stories/share.php');
+ $url = Horde::url('stories/share.php');
$url = Horde_Util::addParameter($url, array('story_id' => $story['story_id'], 'channel_id' => $channel_id));
$view_template->set('sharelink', Horde::link($url) . _("Share this story") . '</a>', true);
} else {
if ($tag_id = Horde_Util::getFormData('tag_id')) {
$rss_url_params['tag_id'] = $tag_id;
}
- echo '<link rel="alternate" type="application/rss+xml" title="RSS 0.91" href="' . Horde_Util::addParameter(Horde::applicationUrl('delivery/rss.php', true, -1), $rss_url_params) . '" />';
+ echo '<link rel="alternate" type="application/rss+xml" title="RSS 0.91" href="' . Horde_Util::addParameter(Horde::url('delivery/rss.php', true, -1), $rss_url_params) . '" />';
}
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
false,
array(
'icon' => strval(Horde_Themes::img('menu/upload.png')),
- 'url' => Horde::applicationUrl('upload_menu.php')
+ 'url' => Horde::url('upload_menu.php')
)
);
}
$menu = new Horde_Menu(HORDE_MENU_MASK_ALL);
- $menu->add(Horde::applicationUrl('upload_menu.php'), _("Upload"), 'menu/upload.png', Horde_Themes::img());
+ $menu->add(Horde::url('upload_menu.php'), _("Upload"), 'menu/upload.png', Horde_Themes::img());
return $menu;
}
}
if (!empty($this->koward->conf['koward']['menu']['queries'])) {
- $menu->add(Horde::applicationUrl('Queries'), _("_Queries"), 'query.png', Horde_Themes::img());
+ $menu->add(Horde::url('Queries'), _("_Queries"), 'query.png', Horde_Themes::img());
}
if (!empty($this->koward->conf['koward']['menu']['test'])) {
$menu->add($this->urlFor(array('controller' => 'check', 'action' => 'show')),
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->redirect();
+ Horde::url('', true)->redirect();
}
do {
if (!empty($url)) {
$url = new Horde_Url($url, true);
} else {
- $url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)
+ $url = Horde::url($prefs->getValue('defaultview') . '.php', true)
->add(array('month' => Horde_Util::getFormData('month'),
'year' => Horde_Util::getFormData('year')));
}
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->redirect();
+ Horde::url('', true)->redirect();
}
// Get the current attendees array from the session cache.
$url = new Horde_Url($url, true);
} else {
$date = new Horde_Date(Horde_Util::getFormData('date'));
- $url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)
+ $url = Horde::url($prefs->getValue('defaultview') . '.php', true)
->add('date', $date->dateString());
}
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->setAnchor('calendar:internal')->redirect();
+ Horde::url('', true)->setAnchor('calendar:internal')->redirect();
}
require_once KRONOLITH_BASE . '/lib/Forms/CreateCalendar.php';
// Exit if this isn't an authenticated user or if the user can't
// create new calendars (default share is locked).
if (!$GLOBALS['registry']->getAuth() || $prefs->isLocked('default_share')) {
- Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
+ Horde::url($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
} catch (Exception $e) {
$notification->push($e, 'horde.error');
}
- Horde::applicationUrl('calendars/', true)->redirect();
+ Horde::url('calendars/', true)->redirect();
}
$title = $form->getTitle();
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
+ Horde::url($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$calendar_id = $vars->get('c');
if ($calendar_id == $GLOBALS['registry']->getAuth()) {
$notification->push(_("This calendar cannot be deleted."), 'horde.warning');
- Horde::applicationUrl('calendars/', true)->redirect();
+ Horde::url('calendars/', true)->redirect();
}
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->setAnchor('calendar:internal|' . $calendar_id)->redirect();
+ Horde::url('', true)->setAnchor('calendar:internal|' . $calendar_id)->redirect();
}
try {
$calendar = $kronolith_shares->getShare($calendar_id);
} catch (Exception $e) {
$notification->push($e, 'horde.error');
- Horde::applicationUrl('calendars/', true)->redirect();
+ Horde::url('calendars/', true)->redirect();
}
if ($calendar->get('owner') != $GLOBALS['registry']->getAuth() &&
(!is_null($calendar->get('owner')) || !$registry->isAdmin())) {
$notification->push(_("You are not allowed to delete this calendar."), 'horde.error');
- Horde::applicationUrl('calendars/', true)->redirect();
+ Horde::url('calendars/', true)->redirect();
}
$form = new Kronolith_DeleteCalendarForm($vars, $calendar);
} catch (Exception $e) {
$notification->push($e, 'horde.error');
}
- Horde::applicationUrl('calendars/', true)->redirect();
+ Horde::url('calendars/', true)->redirect();
}
$title = $form->getTitle();
$vars = Horde_Variables::getDefaultVariables();
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->setAnchor('calendar:internal|' . $vars->get('c'))->redirect();
+ Horde::url('', true)->setAnchor('calendar:internal|' . $vars->get('c'))->redirect();
}
require_once KRONOLITH_BASE . '/lib/Forms/EditCalendar.php';
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
+ Horde::url($prefs->getValue('defaultview') . '.php', true)->redirect();
}
try {
$calendar = $kronolith_shares->getShare($vars->get('c'));
} catch (Exception $e) {
$notification->push($e, 'horde.error');
- Horde::applicationUrl('calendars/', true)->redirect();
+ Horde::url('calendars/', true)->redirect();
}
if ($calendar->get('owner') != $GLOBALS['registry']->getAuth() &&
(!is_null($calendar->get('owner')) || !$registry->isAdmin())) {
$notification->push(_("You are not allowed to change this calendar."), 'horde.error');
- Horde::applicationUrl('calendars/', true)->redirect();
+ Horde::url('calendars/', true)->redirect();
}
$form = new Kronolith_EditCalendarForm($vars, $calendar);
} catch (Exception $e) {
$notification->push($e, 'horde.error');
}
- Horde::applicationUrl('calendars/', true)->redirect();
+ Horde::url('calendars/', true)->redirect();
}
$vars->set('name', $calendar->get('name'));
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->redirect();
+ Horde::url('', true)->redirect();
}
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- Horde::applicationUrl($prefs->getValue('defaultview') . '.php')->redirect();
+ Horde::url($prefs->getValue('defaultview') . '.php')->redirect();
}
-$edit_url_base = Horde::applicationUrl('calendars/edit.php');
-$remote_edit_url_base = Horde::applicationUrl('calendars/remote_edit.php');
-$delete_url_base = Horde::applicationUrl('calendars/delete.php');
-$remote_unsubscribe_url_base = Horde::applicationUrl('calendars/remote_unsubscribe.php');
-$perms_url_base = Horde::applicationUrl('perms.php', true);
-$display_url_base = Horde::applicationUrl('month.php', true, -1);
+$edit_url_base = Horde::url('calendars/edit.php');
+$remote_edit_url_base = Horde::url('calendars/remote_edit.php');
+$delete_url_base = Horde::url('calendars/delete.php');
+$remote_unsubscribe_url_base = Horde::url('calendars/remote_unsubscribe.php');
+$perms_url_base = Horde::url('perms.php', true);
+$display_url_base = Horde::url('month.php', true, -1);
$subscribe_url_base = $registry->get('webroot', 'horde');
if (isset($conf['urls']['pretty']) && $conf['urls']['pretty'] == 'rewrite') {
$subscribe_url_base .= '/rpc/kronolith/';
$url = $vars->get('url');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->setAnchor('calendar:remote|' . rawurlencode($url))->redirect();
+ Horde::url('', true)->setAnchor('calendar:remote|' . rawurlencode($url))->redirect();
}
require_once KRONOLITH_BASE . '/lib/Forms/EditRemoteCalendar.php';
// Exit if this isn't an authenticated user or if the user can't
// subscribe to remote calendars (remote_cals is locked).
if (!$GLOBALS['registry']->getAuth() || $prefs->isLocked('remote_cals')) {
- Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
+ Horde::url($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$remote_calendar = null;
}
if (is_null($remote_calendar)) {
$notification->push(_("The remote calendar was not found."), 'horde.error');
- Horde::applicationUrl('calendars/', true)->redirect();
+ Horde::url('calendars/', true)->redirect();
}
$form = new Kronolith_EditRemoteCalendarForm($vars, $remote_calendar);
} catch (Exception $e) {
$notification->push($e, 'horde.error');
}
- Horde::applicationUrl('calendars/', true)->redirect();
+ Horde::url('calendars/', true)->redirect();
}
$key = $registry->getAuthCredential('password');
$url = $vars->get('url');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->setAnchor('calendar:remote|' . rawurlencode($url))->redirect();
+ Horde::url('', true)->setAnchor('calendar:remote|' . rawurlencode($url))->redirect();
}
require_once KRONOLITH_BASE . '/lib/Forms/SubscribeRemoteCalendar.php';
// Exit if this isn't an authenticated user or if the user can't
// subscribe to remote calendars (remote_cals is locked).
if (!$GLOBALS['registry']->getAuth() || $prefs->isLocked('remote_cals')) {
- Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
+ Horde::url($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$form = new Kronolith_SubscribeRemoteCalendarForm($vars);
} catch (Exception $e) {
$notification->push($e, 'horde.error');
}
- Horde::applicationUrl('calendars/', true)->redirect();
+ Horde::url('calendars/', true)->redirect();
}
$title = $form->getTitle();
$url = $vars->get('url');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->setAnchor('calendar:remote|' . rawurlencode($url))->redirect();
+ Horde::url('', true)->setAnchor('calendar:remote|' . rawurlencode($url))->redirect();
}
require_once KRONOLITH_BASE . '/lib/Forms/UnsubscribeRemoteCalendar.php';
// Exit if this isn't an authenticated user or if the user can't
// subscribe to remote calendars (remote_cals is locked).
if (!$GLOBALS['registry']->getAuth() || $prefs->isLocked('remote_cals')) {
- Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
+ Horde::url($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$remote_calendar = null;
}
if (is_null($remote_calendar)) {
$notification->push(_("The remote calendar was not found."), 'horde.error');
- Horde::applicationUrl('calendars/', true)->redirect();
+ Horde::url('calendars/', true)->redirect();
}
$form = new Kronolith_UnsubscribeRemoteCalendarForm($vars, $remote_calendar);
} catch (Exception $e) {
$notification->push($e, 'horde.error');
}
- Horde::applicationUrl('calendars/', true)->redirect();
+ Horde::url('calendars/', true)->redirect();
}
$vars->set('url', $calendar['url']);
);
$_prefs['fb_url'] = array(
- 'value' => '<strong>' . _("My Free/Busy URL") . '</strong><div class="fburl"><div>' . _("Copy this URL for use wherever you need your Free/Busy URL:") . '</div><div class="fixed">' . Horde::applicationUrl('fb.php', true, -1)->add('u', $GLOBALS['registry']->getAuth()) . '</div></div>',
+ 'value' => '<strong>' . _("My Free/Busy URL") . '</strong><div class="fburl"><div>' . _("Copy this URL for use wherever you need your Free/Busy URL:") . '</div><div class="fixed">' . Horde::url('fb.php', true, -1)->add('u', $GLOBALS['registry']->getAuth()) . '</div></div>',
'type' => 'rawhtml'
);
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->redirect();
+ Horde::url('', true)->redirect();
}
if (!$GLOBALS['registry']->getAuth()) {
if (Kronolith::showAjaxView() && !(Horde_Util::getPost('import_ajax')) &&
(!Horde_Util::getFormData('actionID') == 'export')) {
- Horde::applicationUrl('', true)->redirect();
+ Horde::url('', true)->redirect();
}
if (!$conf['menu']['import_export']) {
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->setAnchor('day:' . Kronolith::currentDate()->dateString())->redirect();
+ Horde::url('', true)->setAnchor('day:' . Kronolith::currentDate()->dateString())->redirect();
}
$view = Kronolith::getView('Day');
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->redirect();
+ Horde::url('', true)->redirect();
}
if (Kronolith_Resource::isResourceCalendar($c = Horde_Util::getFormData('calendar'))) {
$event = $kronolith_driver->getEvent($eventID);
} catch(Exception $e) {
if (($url = Horde_Util::getFormData('url')) === null) {
- $url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true);
+ $url = Horde::url($prefs->getValue('defaultview') . '.php', true);
} else {
$url = new Horde_Url($url);
}
$url = new Horde_Url($url, true);
} else {
$date = new Horde_Date(Horde_Util::getFormData('date'));
- $url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)
+ $url = Horde::url($prefs->getValue('defaultview') . '.php', true)
->add('date', Horde_Util::getFormData('date', date('Ymd')));
}
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->redirect();
+ Horde::url('', true)->redirect();
}
do {
if (!empty($url)) {
$url = new Horde_Url($url, true);
} else {
- $url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)
+ $url = Horde::url($prefs->getValue('defaultview') . '.php', true)
->add(array('month' => Horde_Util::getFormData('month'),
'year' => Horde_Util::getFormData('year')));
}
$view = Kronolith::getView($viewName);
if (is_string($view->event)) {
$notification->push($view->event, 'horde.error');
- Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
+ Horde::url($prefs->getValue('defaultview') . '.php', true)->redirect();
}
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->setAnchor('event:' . $view->event->calendarType . '|' . $view->event->calendar . ':' . $view->event->id . ':' . Horde_Util::getFormData('datetime', Kronolith::currentDate()->dateString()))->redirect();
+ Horde::url('', true)->setAnchor('event:' . $view->event->calendarType . '|' . $view->event->calendar . ':' . $view->event->id . ':' . Horde_Util::getFormData('datetime', Kronolith::currentDate()->dateString()))->redirect();
}
switch ($viewName) {
if (!$view->event->recurs() &&
!($prefs->getValue('confirm_delete') ||
Horde_Util::getFormData('confirm'))) {
- Horde::applicationUrl('delete.php?' . $_SERVER['QUERY_STRING'], true)->redirect();
+ Horde::url('delete.php?' . $_SERVER['QUERY_STRING'], true)->redirect();
}
break;
if (!empty($url)) {
$url = new Horde_Url($url, true);
} else {
- $url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true);
+ $url = Horde::url($prefs->getValue('defaultview') . '.php', true);
}
$url->unique()->redirect();
}
}
if (isset($conf['urls']['pretty']) && $conf['urls']['pretty'] == 'rewrite') {
- $self_url = Horde::applicationUrl('feed/' . $calendar, true, -1);
+ $self_url = Horde::url('feed/' . $calendar, true, -1);
} else {
- $self_url = Horde::applicationUrl('feed/index.php', true, -1)
+ $self_url = Horde::url('feed/index.php', true, -1)
->add('c', $calendar);
}
case 'menu':
$menus = array(
- array('new', _("New Event"), 'new.png', Horde::applicationUrl('new.php')),
- array('day', _("Day"), 'dayview.png', Horde::applicationUrl('day.php')),
- array('work', _("Work Week"), 'workweekview.png', Horde::applicationUrl('workweek.php')),
- array('week', _("Week"), 'weekview.png', Horde::applicationUrl('week.php')),
- array('month', _("Month"), 'monthview.png', Horde::applicationUrl('month.php')),
- array('year', _("Year"), 'yearview.png', Horde::applicationUrl('year.php')),
- array('search', _("Search"), 'search.png', Horde::applicationUrl('search.php'))
+ array('new', _("New Event"), 'new.png', Horde::url('new.php')),
+ array('day', _("Day"), 'dayview.png', Horde::url('day.php')),
+ array('work', _("Work Week"), 'workweekview.png', Horde::url('workweek.php')),
+ array('week', _("Week"), 'weekview.png', Horde::url('week.php')),
+ array('month', _("Month"), 'monthview.png', Horde::url('month.php')),
+ array('year', _("Year"), 'yearview.png', Horde::url('year.php')),
+ array('search', _("Search"), 'search.png', Horde::url('search.php'))
);
foreach ($menus as $menu) {
$html .= '<td align="center" class="' . $td_class . '">';
/* Set up the link to the day view. */
- $url = Horde::applicationUrl('day.php', true)
+ $url = Horde::url('day.php', true)
->add('date', $date_ob->dateString());
if (isset($this->_params['calendar']) &&
$this->_params['calendar'] != '__all') {
} else {
$dayname = $day->strftime($GLOBALS['prefs']->getValue('date_format'));
}
- $url = Horde::applicationUrl('day.php', true)
+ $url = Horde::url('day.php', true)
->setRaw(false)
->add('date', $day->dateString());
if (isset($this->_params['calendar']) &&
'mday' => $match[3]));
$formatted = $horde_date->strftime($GLOBALS['prefs']->getValue('date_format'));
return $formatted
- . Horde::applicationUrl('edit.php')
+ . Horde::url('edit.php')
->add(array('calendar' => $this->calendar,
'eventID' => $this->id,
'del_exception' => $date,
$params['calendar'] = $this->calendar;
$params['type'] = $this->calendarType;
- return Horde::applicationUrl('event.php', $full)->setRaw(!$encoded)->add($params);
+ return Horde::url('event.php', $full)->setRaw(!$encoded)->add($params);
}
/**
$params['calendar'] = $this->calendar;
$params['type'] = $this->calendarType;
- return Horde::applicationUrl('event.php')->add($params);
+ return Horde::url('event.php')->add($params);
}
/**
$params['calendar'] = $this->calendar;
$params['type'] = $this->calendarType;
- return Horde::applicationUrl('event.php')->add($params);
+ return Horde::url('event.php')->add($params);
}
/**
$params['calendar'] = $this->calendar;
$params['type'] = $this->calendarType;
- return Horde::applicationUrl('event.php')->add($params);
+ return Horde::url('event.php')->add($params);
}
public function getLink($datetime = null, $icons = true, $from_url = null,
$vFb->setAttribute('DTSTAMP', $_SERVER['REQUEST_TIME']);
$vFb->setAttribute('DTSTART', $startstamp);
$vFb->setAttribute('DTEND', $endstamp);
- $vFb->setAttribute('URL', Horde::applicationUrl('fb.php?u=' . $user, true, -1));
+ $vFb->setAttribute('URL', Horde::url('fb.php?u=' . $user, true, -1));
/* Add all the busy periods. */
foreach ($busy as $events) {
{
if (isset($GLOBALS['conf']['urls']['pretty']) &&
$GLOBALS['conf']['urls']['pretty'] == 'rewrite') {
- return Horde::applicationUrl('feed/' . $calendar, true, -1);
+ return Horde::url('feed/' . $calendar, true, -1);
}
- return Horde::applicationUrl('feed/index.php', true, -1)
+ return Horde::url('feed/index.php', true, -1)
->add('c', $calendar);
}
}
if ($action == self::ITIP_REQUEST) {
- $attend_link = Horde::applicationUrl('attend.php', true, -1)
+ $attend_link = Horde::url('attend.php', true, -1)
->add(array('c' => $event->calendar,
'e' => $event->id,
'u' => $email));
$tabs = new Horde_Core_Ui_Tabs('view', Horde_Variables::getDefaultVariables());
$tabs->preserve('date', $date_stamp);
- $tabs->addTab(_("Day"), Horde::applicationUrl('day.php'),
+ $tabs->addTab(_("Day"), Horde::url('day.php'),
array('tabname' => 'day', 'id' => 'tabday', 'onclick' => 'return ShowView(\'Day\', \'' . $date_stamp . '\');'));
- $tabs->addTab(_("Work Week"), Horde::applicationUrl('workweek.php'),
+ $tabs->addTab(_("Work Week"), Horde::url('workweek.php'),
array('tabname' => 'workweek', 'id' => 'tabworkweek', 'onclick' => 'return ShowView(\'WorkWeek\', \'' . $date_stamp . '\');'));
- $tabs->addTab(_("Week"), Horde::applicationUrl('week.php'),
+ $tabs->addTab(_("Week"), Horde::url('week.php'),
array('tabname' => 'week', 'id' => 'tabweek', 'onclick' => 'return ShowView(\'Week\', \'' . $date_stamp . '\');'));
- $tabs->addTab(_("Month"), Horde::applicationUrl('month.php'),
+ $tabs->addTab(_("Month"), Horde::url('month.php'),
array('tabname' => 'month', 'id' => 'tabmonth', 'onclick' => 'return ShowView(\'Month\', \'' . $date_stamp . '\');'));
- $tabs->addTab(_("Year"), Horde::applicationUrl('year.php'),
+ $tabs->addTab(_("Year"), Horde::url('year.php'),
array('tabname' => 'year', 'id' => 'tabyear', 'onclick' => 'return ShowView(\'Year\', \'' . $date_stamp . '\');'));
if ($tabname === null) {
$menu = new Horde_Menu();
- $menu->add(Horde::applicationUrl($prefs->getValue('defaultview') . '.php'), _("_Today"), 'today.png', null, null, null, '__noselection');
+ $menu->add(Horde::url($prefs->getValue('defaultview') . '.php'), _("_Today"), 'today.png', null, null, null, '__noselection');
if (self::getDefaultCalendar(Horde_Perms::EDIT) &&
(!empty($conf['hooks']['permsdenied']) ||
$GLOBALS['injector']->getInstance('Horde_Perms')->hasAppPermission('max_events') === true ||
$GLOBALS['injector']->getInstance('Horde_Perms')->hasAppPermission('max_events') > self::countEvents())) {
- $menu->add(Horde::applicationUrl('new.php')->add('url', Horde::selfUrl(true, false, true)), _("_New Event"), 'new.png');
+ $menu->add(Horde::url('new.php')->add('url', Horde::selfUrl(true, false, true)), _("_New Event"), 'new.png');
}
if ($browser->hasFeature('dom')) {
Horde_Core_Ui_JsCalendar::init(array(
));
Horde::addScriptFile('goto.js', 'kronolith');
Horde::addInlineScript(array(
- 'KronolithGoto.dayurl = ' . Horde_Serialize::serialize(strval(Horde::applicationUrl('day.php')), Horde_Serialize::JSON, $registry->getCharset()),
- 'KronolithGoto.monthurl = ' . Horde_Serialize::serialize(strval(Horde::applicationUrl('month.php')), Horde_Serialize::JSON, $registry->getCharset()),
- 'KronolithGoto.weekurl = ' . Horde_Serialize::serialize(strval(Horde::applicationUrl('week.php')), Horde_Serialize::JSON, $registry->getCharset()),
- 'KronolithGoto.yearurl = ' . Horde_Serialize::serialize(strval(Horde::applicationUrl('year.php')), Horde_Serialize::JSON, $registry->getCharset()),
+ 'KronolithGoto.dayurl = ' . Horde_Serialize::serialize(strval(Horde::url('day.php')), Horde_Serialize::JSON, $registry->getCharset()),
+ 'KronolithGoto.monthurl = ' . Horde_Serialize::serialize(strval(Horde::url('month.php')), Horde_Serialize::JSON, $registry->getCharset()),
+ 'KronolithGoto.weekurl = ' . Horde_Serialize::serialize(strval(Horde::url('week.php')), Horde_Serialize::JSON, $registry->getCharset()),
+ 'KronolithGoto.yearurl = ' . Horde_Serialize::serialize(strval(Horde::url('year.php')), Horde_Serialize::JSON, $registry->getCharset()),
));
$menu->add(new Horde_Url(''), _("_Goto"), 'goto.png', null, '', null, 'kgotomenu');
}
- $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde::url('search.php'), _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'));
/* Import/Export. */
if ($conf['menu']['import_export']) {
- $menu->add(Horde::applicationUrl('data.php'), _("_Import/Export"), 'data.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde::url('data.php'), _("_Import/Export"), 'data.png', Horde_Themes::img(null, 'horde'));
}
return $menu;
echo '<tbody>';
if ($addLinks) {
- $newEventUrl = Horde::applicationUrl('new.php')
+ $newEventUrl = Horde::url('new.php')
->add(array('datetime' => sprintf($this->dateString() . '%02d%02d00',
$this->slots[0]['hour'], $this->slots[0]['min']),
'allday' => 1,
}
if ($addLinks) {
- $newEventUrl = Horde::applicationUrl('new.php')
+ $newEventUrl = Horde::url('new.php')
->add(array('datetime' => sprintf($this->dateString() . '%02d%02d00',
$this->slots[$i]['hour'], $this->slots[$i]['min']),
'url' => $this->link(0, true)))
function link($offset = 0, $full = false)
{
- return Horde::applicationUrl('day.php', $full)
+ return Horde::url('day.php', $full)
->add('date', $this->getTime('%Y%m%d', $offset));
}
if (isset($url)) {
$cancelurl = new Horde_Url($url);
} else {
- $cancelurl = Horde::applicationUrl('month.php', true)
+ $cancelurl = Horde::url('month.php', true)
->add(array('month' => $month, 'year' => $year));
}
$showLocation = Kronolith::viewShowLocation();
$showTime = Kronolith::viewShowTime();
- $day_url = Horde::applicationUrl('day.php');
+ $day_url = Horde::url('day.php');
$this_link = $this->link(0, true);
- $new_url = Horde::applicationUrl('new.php')->add('url', $this_link);
+ $new_url = Horde::url('new.php')->add('url', $this_link);
$new_img = Horde::img('new_small.png', '+');
foreach ($this->_currentCalendars as $id => $cal) {
}
if ($date->dayOfWeek() == Horde_Date::DATE_MONDAY) {
- $html .= Horde::applicationUrl('week.php')
+ $html .= Horde::url('week.php')
->add('date', $date->dateString())
->link(array('class' => 'week'))
. sprintf(_("Week %d"), $week) . '</a>';
function link($offset = 0, $full = false)
{
$month = $this->getMonth($offset);
- return Horde::applicationUrl('month.php', $full)
+ return Horde::url('month.php', $full)
->add('date', $month->dateString());
}
function link($offset = 0, $full = false)
{
$week = $this->getWeek($offset);
- return Horde::applicationUrl($this->_controller, $full)
+ return Horde::url($this->_controller, $full)
->add('date', $week->dateString());
}
$date = new Horde_Date(sprintf('%04d%02d01010101', $this->year, $month));
$mtitle = $date->strftime('%B');
$html .= '<h2 class="smallheader"><a class="smallheader" href="'
- . Horde::applicationUrl('month.php')
+ . Horde::url('month.php')
->add('date', $date->dateString())
. '">' . $mtitle . '</a></h2>'
. '<table class="nopadding monthgrid" cellspacing="0" width="100%"><thead><tr class="item">';
}
/* Set up the link to the day view. */
- $url = Horde::applicationUrl('day.php', true)
+ $url = Horde::url('day.php', true)
->add('date', $date->dateString());
if ($date->month != $month) {
function link($offset = 0, $full = false)
{
- return Horde::applicationUrl('year.php', $full)
+ return Horde::url('year.php', $full)
->add('date', ($this->year + $offset) . '0101');
}
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->setAnchor('month:' . Kronolith::currentDate()->dateString())->redirect();
+ Horde::url('', true)->setAnchor('month:' . Kronolith::currentDate()->dateString())->redirect();
}
$view = Kronolith::getView('Month');
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->setAnchor('event')->redirect();
+ Horde::url('', true)->setAnchor('event')->redirect();
}
/* Check permissions. */
-$url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)
+$url = Horde::url($prefs->getValue('defaultview') . '.php', true)
->add(array('month' => Horde_Util::getFormData('month'),
'year' => Horde_Util::getFormData('year')));
if (isset($url)) {
$cancelurl = new Horde_Url($url);
} else {
- $cancelurl = Horde::applicationUrl('month.php', true)->add('month', $month);
+ $cancelurl = Horde::url('month.php', true)->add('month', $month);
}
$calendars = Kronolith::listCalendars(Horde_Perms::EDIT | Kronolith::PERMS_DELEGATE, true);
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->redirect();
+ Horde::url('', true)->redirect();
}
// Exit if the user shouldn't be able to change share permissions.
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->redirect();
+ Horde::url('', true)->redirect();
}
// Exit if this isn't an authenticated, administrative user
if (!$registry->isAdmin()) {
- Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
+ Horde::url($prefs->getValue('defaultview') . '.php', true)->redirect();
}
require_once KRONOLITH_BASE . '/lib/Forms/CreateResource.php';
$notification->push($e, 'horde.error');
}
- Horde::applicationUrl('resources/', true)->redirect();
+ Horde::url('resources/', true)->redirect();
exit;
}
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->redirect();
+ Horde::url('', true)->redirect();
}
require_once KRONOLITH_BASE . '/lib/Forms/DeleteResource.php';
// Exit if this isn't an authenticated administrative user.
if (!$registry->isAdmin()) {
- Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
+ Horde::url($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$resource = Kronolith::getDriver('Resource')->getResource($vars->get('c'));
if (!$resource->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
$notification->push(_("You are not allowed to delete this resource."), 'horde.error');
- Horde::applicationUrl('resources/', true)->redirect();
+ Horde::url('resources/', true)->redirect();
}
} catch (Exception $e) {
$notification->push($e, 'horde.error');
- Horde::applicationUrl('resources/', true)->redirect();
+ Horde::url('resources/', true)->redirect();
}
$form = new Kronolith_DeleteResourceForm($vars, $resource);
$notification->push($e, 'horde.error');
}
- Horde::applicationUrl('resources/', true)->redirect();
+ Horde::url('resources/', true)->redirect();
}
$title = $form->getTitle();
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->redirect();
+ Horde::url('', true)->redirect();
}
require_once KRONOLITH_BASE . '/lib/Forms/EditResource.php';
// Exit if this isn't an authenticated administrative user.
if (!$registry->isAdmin()) {
- Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
+ Horde::url($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$resource = Kronolith::getDriver('Resource')->getResource($vars->get('c'));
if (!$resource->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
$notification->push(_("You are not allowed to change this resource."), 'horde.error');
- Horde::applicationUrl('resources/', true)->redirect();
+ Horde::url('resources/', true)->redirect();
}
} catch (Exception $e) {
$notification->push($e, 'horde.error');
- Horde::applicationUrl('resources/', true)->redirect();
+ Horde::url('resources/', true)->redirect();
}
$form = new Kronolith_EditResourceForm($vars, $resource);
$notification->push($e, 'horde.error');
}
- Horde::applicationUrl('resources/', true)->redirect();
+ Horde::url('resources/', true)->redirect();
}
$vars->set('name', $resource->get('name'));
// Exit if this isn't an authenticated, administrative user
if (!$registry->isAdmin()) {
- Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
+ Horde::url($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$notification->push($e, 'horde.error');
}
- Horde::applicationUrl('resources/groups/', true)->redirect();
+ Horde::url('resources/groups/', true)->redirect();
}
$title = $form->getTitle();
// Exit if this isn't an authenticated administrative user.
if (!$registry->isAdmin()) {
- Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
+ Horde::url($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$resource = Kronolith::getDriver('Resource')->getResource($vars->get('c'));
if (!$resource->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
$notification->push(_("You are not allowed to delete this resource group."), 'horde.error');
- Horde::applicationUrl('resources/groups/', true)->redirect();
+ Horde::url('resources/groups/', true)->redirect();
}
} catch (Exception $e) {
$notification->push($e, 'horde.error');
- Horde::applicationUrl('resources/groups/', true)->redirect();
+ Horde::url('resources/groups/', true)->redirect();
}
$form = new Kronolith_DeleteResourceGroupForm($vars, $resource);
$notification->push($e, 'horde.error');
}
- Horde::applicationUrl('resources/groups/', true)->redirect();
+ Horde::url('resources/groups/', true)->redirect();
}
$title = $form->getTitle();
// Exit if this isn't an authenticated administrative user.
if (!$registry->isAdmin()) {
- Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
+ Horde::url($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$group = Kronolith::getDriver('Resource')->getResource($vars->get('c'));
if (!$group->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
$notification->push(_("You are not allowed to change this resource."), 'horde.error');
- Horde::applicationUrl('resources/groups/', true)->redirect();
+ Horde::url('resources/groups/', true)->redirect();
}
} catch (Exception $e) {
$notification->push($e, 'horde.error');
- Horde::applicationUrl('resources/groups/', true)->redirect();
+ Horde::url('resources/groups/', true)->redirect();
}
$form = new Kronolith_EditResourceGroupForm($vars, $group);
$notification->push($e, 'horde.error');
}
- Horde::applicationUrl('resources/groups/', true)->redirect();
+ Horde::url('resources/groups/', true)->redirect();
}
$vars->set('name', $group->get('name'));
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- Horde::applicationUrl($prefs->getValue('defaultview') . '.php')->redirect();
+ Horde::url($prefs->getValue('defaultview') . '.php')->redirect();
}
-$edit_url_base = Horde::applicationUrl('resources/groups/edit.php');
+$edit_url_base = Horde::url('resources/groups/edit.php');
$edit_img = Horde::img('edit.png', _("Edit"));
$resources = Kronolith::getDriver('Resource')->listResources(Horde_Perms::EDIT, array('type' => Kronolith_Resource::TYPE_GROUP));
-//$display_url_base = Horde::applicationUrl('month.php', true, -1);
-$delete_url_base = Horde::applicationUrl('resources/groups/delete.php');
+//$display_url_base = Horde::url('month.php', true, -1);
+$delete_url_base = Horde::url('resources/groups/delete.php');
$delete_img = Horde::img('delete.png', _("Delete"));
?>
<script type="text/javascript">
<form method="get" action="create.php">
<?php echo Horde_Util::formInput() ?>
<input type="submit" class="button" value="<?php echo _("Create a new Resource Group") ?>" />
- <a class="button" href="<?php echo Horde::applicationUrl('resources')?>"><?php echo _("Return to Single Resources")?></a>
+ <a class="button" href="<?php echo Horde::url('resources')?>"><?php echo _("Return to Single Resources")?></a>
</form>
<?php endif ?>
<table summary="<?php echo _("Resource Group List") ?>" cellspacing="0" id="calendar-list" class="striped sortable">
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->redirect();
+ Horde::url('', true)->redirect();
}
$title = _("Edit resources");
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- Horde::applicationUrl($prefs->getValue('defaultview') . '.php')->redirect();
+ Horde::url($prefs->getValue('defaultview') . '.php')->redirect();
}
-$edit_url_base = Horde::applicationUrl('resources/edit.php');
+$edit_url_base = Horde::url('resources/edit.php');
$edit_img = Horde::img('edit.png', _("Edit"));
$resources = Kronolith::getDriver('Resource')->listResources(Horde_Perms::READ, array('type' => Kronolith_Resource::TYPE_SINGLE));
-$display_url_base = Horde::applicationUrl('month.php', true, -1);
-$delete_url_base = Horde::applicationUrl('resources/delete.php');
+$display_url_base = Horde::url('month.php', true, -1);
+$delete_url_base = Horde::url('resources/delete.php');
$delete_img = Horde::img('delete.png', _("Delete"));
?>
<script type="text/javascript">
<form method="get" action="create.php">
<?php echo Horde_Util::formInput() ?>
<input type="submit" class="button" value="<?php echo _("Create a new Resource") ?>" />
- <a class="button" href="<?php echo Horde::applicationUrl('resources/groups') ?>"><?php echo _("Manage Resource Groups")?> </a>
+ <a class="button" href="<?php echo Horde::url('resources/groups') ?>"><?php echo _("Manage Resource Groups")?> </a>
</form>
<?php endif ?>
<table summary="<?php echo _("Resource List") ?>" cellspacing="0" id="calendar-list" class="striped sortable">
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->redirect();
+ Horde::url('', true)->redirect();
}
/* Get search parameters. */
<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::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>
+ <td align="center"><?php echo Horde::url('#')->link(array('class' => 'widget', 'onclick' => 'window.open(\'' . Horde::url('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>
?>
<div id="kronolithCalendarDialog" class="kronolithDialog">
-<form id="kronolithCalendarForminternal" method="post" action="<?php echo Horde::applicationUrl('data.php') ?>"<?php if ($file_upload) echo ' enctype="multipart/form-data"' ?>>
+<form id="kronolithCalendarForminternal" method="post" action="<?php echo Horde::url('data.php') ?>"<?php if ($file_upload) echo ' enctype="multipart/form-data"' ?>>
<input type="hidden" name="type" value="internal" />
<input id="kronolithCalendarinternalId" type="hidden" name="calendar" />
<?php if ($file_upload): ?>
//-->
</script>
-<form method="post" name="contacts" onsubmit="passAddresses();" action="<?php echo Horde::applicationUrl('contacts.php')->unique() ?>">
+<form method="post" name="contacts" onsubmit="passAddresses();" action="<?php echo Horde::url('contacts.php')->unique() ?>">
<input type="hidden" name="sa" />
<?php Horde_Util::pformInput() ?>
<?php
if (empty($url)) {
- $url = Horde::applicationUrl('month.php', true)
+ $url = Horde::url('month.php', true)
->add(array('month' => $month, 'year' => $year));
}
?>
<?php
if (empty($url)) {
- $url = Horde::applicationUrl('month.php', true)
+ $url = Horde::url('month.php', true)
->add(array('month' => $month, 'year' => $year));
}
?>
<tr>
<td></td>
<td colspan="4">
- <?php echo Horde::applicationUrl('attendees.php')->link(array('class' => 'button', 'id' => 'attendees_button', 'target' => '_blank')) . _("Edit Attendees and Resources") . '</a>' ?>
+ <?php echo Horde::url('attendees.php')->link(array('class' => 'button', 'id' => 'attendees_button', 'target' => '_blank')) . _("Edit Attendees and Resources") . '</a>' ?>
</td>
</tr>
</tbody>
/* Variables used in core javascript files. */
$var = array(
- 'calendar_info_url' => (string)Horde::applicationUrl('calendars/info.php', true),
+ 'calendar_info_url' => (string)Horde::url('calendars/info.php', true),
'page_title' => $GLOBALS['registry']->get('name') . ' :: ',
'pref_api_url' => (string)Horde::getServiceLink('prefsapi', 'kronolith'),
'twentyFour' => intval($GLOBALS['prefs']->getValue('twentyFour')),
- 'view_url' => (string)Horde::applicationUrl('view.php'),
+ 'view_url' => (string)Horde::url('view.php'),
);
/* Gettext strings used in core javascript files. */
<?php if ($GLOBALS['registry']->getAuth()): ?>
<p>
- <a href="<?php echo Horde::applicationUrl('calendars/') ?>"><?php echo _("[Manage Calendars]") ?></a><br />
- <a href="<?php echo Horde::applicationUrl('resources/')?>"><?php echo ($GLOBALS['registry']->isAdmin() ? _("[Manage Resource Calendars]") : _("[Resource Calendars]"))?></a>
+ <a href="<?php echo Horde::url('calendars/') ?>"><?php echo _("[Manage Calendars]") ?></a><br />
+ <a href="<?php echo Horde::url('resources/')?>"><?php echo ($GLOBALS['registry']->isAdmin() ? _("[Manage Resource Calendars]") : _("[Resource Calendars]"))?></a>
</p>
<?php endif; ?>
<br /><br />
<h1 class="header">
<span class="smallheader rightFloat">
- <?php echo Horde::widget(Horde::applicationUrl('search.php')->add('search_mode', 'advanced'), _("Advanced Search"), 'smallheader', '', '', _("Ad_vanced Search")) ?>
+ <?php echo Horde::widget(Horde::url('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::applicationUrl('search.php')->add('search_mode', 'basic'), _("Basic Search"), 'smallheader', '', '', _("_Basic Search")) ?>
+ <?php echo Horde::widget(Horde::url('search.php')->add('search_mode', 'basic'), _("Basic Search"), 'smallheader', '', '', _("_Basic Search")) ?>
</span>
<?php echo _("Advanced Search") ?>
</h1>
(!empty($conf['hooks']['permsdenied']) ||
$GLOBALS['injector']->getInstance('Horde_Perms')->hasAppPermission('max_events') === true ||
$GLOBALS['injector']->getInstance('Horde_Perms')->hasAppPermission('max_events') > Kronolith::countEvents())) {
- echo Horde::applicationUrl('new.php')
+ echo Horde::url('new.php')
->add(array('date' => $day->dateString(),
'url' => $this->link(0, true)))
->link(array('title' => _("Create a New Event"),
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->redirect();
+ Horde::url('', true)->redirect();
}
$view = Kronolith::getView(Horde_Util::getFormData('view'));
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->setAnchor('week:' . Kronolith::currentDate()->dateString())->redirect();
+ Horde::url('', true)->setAnchor('week:' . Kronolith::currentDate()->dateString())->redirect();
}
$view = Kronolith::getView('Week');
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->setAnchor('week:' . Kronolith::currentDate()->dateString())->redirect();
+ Horde::url('', true)->setAnchor('week:' . Kronolith::currentDate()->dateString())->redirect();
exit;
}
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- Horde::applicationUrl('', true)->setAnchor('year:' . Kronolith::currentDate()->dateString())->redirect();
+ Horde::url('', true)->setAnchor('year:' . Kronolith::currentDate()->dateString())->redirect();
exit;
}
if (!in_array($string, $this->_langmap['reserved']) &&
!in_array($match[0][$id], $replaced) && $idx = $index->isSymbol($string, $altsources)) {
- $link = Horde::applicationUrl(Horde_Util::addParameter('symbol.php', 'i', $idx));
+ $link = Horde::url(Horde_Util::addParameter('symbol.php', 'i', $idx));
$link = Horde_Util::addParameter($link, 'source', $sourceid);
$match0 = str_replace($string, '<a href="' . $link . '" class="fixed"><span class="symbol">' . $string . "</span></a>", $match[0][$id]);
$code = str_replace($match[0][$id], $match0, $code);
$uri = 'source.php';
}
- $url = Horde_Util::addParameter(Horde::applicationUrl($uri), $arglist);
+ $url = Horde_Util::addParameter(Horde::url($uri), $arglist);
if (!empty($anchor)) {
$url .= "#$anchor";
}
global $registry;
$menu = new Horde_Menu(Horde_Menu::MASK_ALL);
- $menu->add(Horde::applicationUrl('source.php'), _("_Browse"), 'luxor.png');
+ $menu->add(Horde::url('source.php'), _("_Browse"), 'luxor.png');
if ($returnType == 'object') {
return $menu;
$symbol = Horde_Util::getFormData('s');
if (!$symbol) {
- Horde::applicationUrl('source.php', true)->redirect();
+ Horde::url('source.php', true)->redirect();
}
$ids = $index->searchSymbols($symbol);
if (count($ids) == 1) {
$id = current($ids);
- Horde::applicationUrl('symbol.php', true)->add('i', $id)->redirect();
+ Horde::url('symbol.php', true)->add('i', $id)->redirect();
}
// If there are multiple search results, display some info for all of them.
}
$name = $index->symname($ident);
- echo '<br /><span class="header">' . Horde::link(Horde::applicationUrl('symbol.php?i=' . $ident), $name, 'header') . $name . '</a></span><br />';
+ echo '<br /><span class="header">' . Horde::link(Horde::url('symbol.php?i=' . $ident), $name, 'header') . $name . '</a></span><br />';
$references = $index->getIndex($ident);
$sorted = array();
}
</script>
-<form method="get" action="<?php echo Horde::applicationUrl('search.php') ?>">
+<form method="get" action="<?php echo Horde::url('search.php') ?>">
<?php Horde_Util::pformInput() ?>
<div id="menu">
<div class="rightFloat">
public function sidebarCreate(Horde_Tree_Base $tree, $parent = null,
array $params = array())
{
- $add = Horde::applicationUrl('memo.php')->add('actionID', 'add_memo');
+ $add = Horde::url('memo.php')->add('actionID', 'add_memo');
$tree->addNode(
$parent . '__new',
false,
array(
'icon' => Horde_Themes::img('search.png'),
- 'url' => Horde::applicationUrl('search.php')
+ 'url' => Horde::url('search.php')
)
);
}
? $this->_params['block_title']
: $registry->get('name');
- return Horde::link(Horde::applicationUrl($registry->getInitialPage(), true))
+ return Horde::link(Horde::url($registry->getInitialPage(), true))
. htmlspecialchars($label) . '</a>';
}
array('memo' => $memo['memo_id'],
'memolist' => $memo['memolist_id']));
$html .= '<td width="1%">'
- . Horde::link(htmlspecialchars(Horde::applicationUrl(Horde_Util::addParameter($editurl, 'actionID', 'modify_memo'), true)), _("Edit Note"))
+ . Horde::link(htmlspecialchars(Horde::url(Horde_Util::addParameter($editurl, 'actionID', 'modify_memo'), true)), _("Edit Note"))
. Horde::img($editImg, _("Edit Note"))
. '</a></td>';
}
$html .= '<td>'
. Horde::linkTooltip(
- htmlspecialchars(Horde::applicationUrl($viewurl, true)),
+ htmlspecialchars(Horde::url($viewurl, true)),
'', '', '', '',
$memo['body'] != $memo['desc'] ? Mnemo::getNotePreview($memo) : '')
. (strlen($memo['desc']) ? htmlspecialchars($memo['desc']) : '<em>' . _("Empty Note") . '</em>')
}
return '<link href="'
- . htmlspecialchars(Horde::applicationUrl('themes/categoryCSS.php',
+ . htmlspecialchars(Horde::url('themes/categoryCSS.php',
true))
. '" rel="stylesheet" type="text/css" />'
. '<table cellspacing="0" width="100%" class="linedRow">' . $html
global $conf, $registry, $print_link;
$menu = new Horde_Menu();
- $menu->add(Horde::applicationUrl('list.php'), _("_List Notes"), 'mnemo.png', null, null, null, basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
+ $menu->add(Horde::url('list.php'), _("_List Notes"), 'mnemo.png', null, null, null, basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
if (Mnemo::getDefaultNotepad(Horde_Perms::EDIT) &&
(!empty($conf['hooks']['permsdenied']) ||
$GLOBALS['injector']->getInstance('Horde_Perms')->hasAppPermission('max_notes') === true ||
$GLOBALS['injector']->getInstance('Horde_Perms')->hasAppPermission('max_notes') > Mnemo::countMemos())) {
- $menu->add(Horde::applicationUrl(Horde_Util::addParameter('memo.php', 'actionID', 'add_memo')), _("_New Note"), 'add.png', null, null, null, Horde_Util::getFormData('memo') ? '__noselection' : null);
+ $menu->add(Horde::url(Horde_Util::addParameter('memo.php', 'actionID', 'add_memo')), _("_New Note"), 'add.png', null, null, null, Horde_Util::getFormData('memo') ? '__noselection' : null);
}
/* Search. */
- $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde::url('search.php'), _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'));
/* Import/Export */
if ($conf['menu']['import_export']) {
- $menu->add(Horde::applicationUrl('data.php'), _("_Import/Export"), 'data.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde::url('data.php'), _("_Import/Export"), 'data.png', Horde_Themes::img(null, 'horde'));
}
/* Print */
if ($conf['menu']['print'] && isset($print_link)) {
- $menu->add(Horde::applicationUrl($print_link), _("_Print"), 'print.png', Horde_Themes::img(null, 'horde'), '_blank', 'popup(this.href); return false;');
+ $menu->add(Horde::url($print_link), _("_Print"), 'print.png', Horde_Themes::img(null, 'horde'), '_blank', 'popup(this.href); return false;');
}
return $menu;
$memolist_id = Horde_Util::getFormData('memolist');
$actionID = Horde_Util::getFormData('actionID');
if (is_null($actionID)) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
/* Load category manager. */
$message = Horde::callHook('_perms_hook_denied', array('mnemo:max_notes'), 'horde', $message);
}
$notification->push($message, 'horde.error', array('content.raw'));
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
/* Set up the note attributes. */
if (empty($memolist_id)) {
$memo = Mnemo::getMemo($memolist_id, $memo_id, $passphrase);
if (!$memo || !isset($memo['memo_id'])) {
$notification->push(_("Note not found."), 'horde.error');
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
$storage = &Mnemo_Driver::singleton($memolist_id);
$memo = Mnemo::getMemo($memolist_original, $memo_id);
if (!$memo || !isset($memo['memo_id'])) {
$notification->push(_("Note not found."), 'horde.error');
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
$title = sprintf(_("Edit: %s"), $memo['desc']);
$show_passphrase = showPassphrase($memo);
/* Check permissions. */
if ($injector->getInstance('Horde_Perms')->hasAppPermission('max_notes') !== true &&
$injector->getInstance('Horde_Perms')->hasAppPermission('max_notes') <= Mnemo::countMemos()) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
/* Creating a new note. */
$storage = Mnemo_Driver::singleton($notepad_target);
}
/* Return to the notepad view. */
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
case 'delete_memos':
/* Delete the note if we're provided with a valid note ID. */
}
/* Return to the notepad. */
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
default:
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
$notepads = Mnemo::listNotepads(false, Horde_Perms::EDIT);
if ($uid = Horde_Util::getFormData('uid')) {
$note = $storage->getByUID($uid, $passphrase);
if ($note instanceof PEAR_Error) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
$note_id = $note['memo_id'];
$note_id = Horde_Util::getFormData('note');
$notelist_id = Horde_Util::getFormData('notepad');
if (!isset($note_id) || !$notelist_id) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
/* Get the current memo. */
$share = $GLOBALS['mnemo_shares']->getShare($notelist_id);
} catch (Horde_Share_Exception $e) {
$notification->push(sprintf(_("There was an error viewing this notepad: %s"), $e->getMessage()), 'horde.error');
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
$notification->push(sprintf(_("You do not have permission to view the notepad %s."), $share->get('name')), 'horde.error');
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
/* If the requested note doesn't exist, display an error message. */
if (!$note || !isset($note['memo_id'])) {
$notification->push(_("Note not found."), 'horde.error');
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
/* Let's assume that the note content can be converted to ISO-8859-1 if this
// Exit if this isn't an authenticated user or if the user can't
// create new notepads (default share is locked).
if (!$GLOBALS['registry']->getAuth() || $prefs->isLocked('default_notepad')) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$notification->push(sprintf(_("The notepad \"%s\" has been created."), $vars->get('name')), 'horde.success');
}
- Horde::applicationUrl('notepads/', true)->redirect();
+ Horde::url('notepads/', true)->redirect();
}
$title = $form->getTitle();
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$notepad_id = $vars->get('n');
if ($notepad_id == $GLOBALS['registry']->getAuth()) {
$notification->push(_("This notepad cannot be deleted"), 'horde.warning');
- Horde::applicationUrl('notepads/', true)->redirect();
+ Horde::url('notepads/', true)->redirect();
}
try {
$notepad = $mnemo_shares->getShare($notepad_id);
} catch (Horde_Share_Exception $e) {
$notification->push($e->getMessage(), 'horde.error');
- Horde::applicationUrl('notepads/', true)->redirect();
+ Horde::url('notepads/', true)->redirect();
}
if (!$GLOBALS['registry']->getAuth() || $notepad->get('owner') != $GLOBALS['registry']->getAuth()) {
$notification->push(_("You are not allowed to delete this notepad."), 'horde.error');
- Horde::applicationUrl('notepads/', true)->redirect();
+ Horde::url('notepads/', true)->redirect();
}
$form = new Mnemo_DeleteNotepadForm($vars, $notepad);
$notification->push(sprintf(_("The notepad \"%s\" has been deleted."), $notepad->get('name')), 'horde.success');
}
- Horde::applicationUrl('notepads/', true)->redirect();
+ Horde::url('notepads/', true)->redirect();
}
$title = $form->getTitle();
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$notepad = $mnemo_shares->getShare($vars->get('n'));
} catch (Horde_Share_Exception $e) {
$notification->push($e->getMessage(), 'horde.error');
- Horde::applicationUrl('notepads/', true)->redirect();
+ Horde::url('notepads/', true)->redirect();
}
if (!$GLOBALS['registry']->getAuth() ||
$notepad->get('owner') != $GLOBALS['registry']->getAuth()) {
$notification->push(_("You are not allowed to change this notepad."), 'horde.error');
- Horde::applicationUrl('notepads/', true)->redirect();
+ Horde::url('notepads/', true)->redirect();
}
$form = new Mnemo_EditNotepadForm($vars, $notepad);
}
}
- Horde::applicationUrl('notepads/', true)->redirect();
+ Horde::url('notepads/', true)->redirect();
}
$vars->set('name', $notepad->get('name'));
exit;
}
-$edit_url_base = Horde::applicationUrl('notepads/edit.php');
+$edit_url_base = Horde::url('notepads/edit.php');
$perms_url_base = Horde::url($registry->get('webroot', 'horde') . '/services/shares/edit.php?app=mnemo');
-$delete_url_base = Horde::applicationUrl('notepads/delete.php');
+$delete_url_base = Horde::url('notepads/delete.php');
$notepads = Mnemo::listNotepads(true);
if (count($search_results) == 1) {
$note = array_shift($search_results);
- Horde::applicationUrl('view.php', true)
+ Horde::url('view.php', true)
->add(array('memo' => $note['memo_id'], 'memolist' => $note['memolist_id']))
->redirect();
}
<title><?php echo htmlspecialchars($page_title) ?></title>
<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
<?php Horde_Themes::includeStylesheetFiles() ?>
-<link href="<?php echo Horde::applicationUrl('themes/categoryCSS.php') ?>" rel="stylesheet" type="text/css" />
+<link href="<?php echo Horde::url('themes/categoryCSS.php') ?>" rel="stylesheet" type="text/css" />
</head>
<body<?php if ($bc) echo ' class="' . $bc . '"' ?><?php if ($bi = Horde_Util::nonInputVar('bodyId')) echo ' id="' . $bi . '"'; ?>>
<br />
<h1 class="header"><?php echo _("Export Notes") ?></h1>
-<form method="post" name="export" action="<?php echo Horde::downloadUrl(_("notes.csv"), null, Horde::applicationUrl('data.php')) ?>">
+<form method="post" name="export" action="<?php echo Horde::downloadUrl(_("notes.csv"), null, Horde::url('data.php')) ?>">
<input type="hidden" name="actionID" value="export" />
<div class="item" style="padding:.5em">
<h1 class="header"><?php printf(_("Import Notes, Step %d"), (int)$import_step) ?></h1>
-<form method="post" name="import_form" enctype="multipart/form-data" action="<?php echo Horde::applicationUrl('data.php') ?>">
+<form method="post" name="import_form" enctype="multipart/form-data" action="<?php echo Horde::url('data.php') ?>">
<input type="hidden" name="actionID" value="<?php echo htmlspecialchars($next_step) ?>" />
<input type="hidden" name="import_step" value="<?php echo (int)$import_step ?>" />
<div class="item" style="padding:.5em">
<div id="page">
<div class="header leftAlign">
<?php echo htmlspecialchars($title) . ' (' . count($memos) . ')' ?>
- <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search"), '') ?></a>
+ <a id="quicksearchL" href="<?php echo Horde::url('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search"), '') ?></a>
<div id="quicksearch" style="display:none">
<input type="text" name="quicksearchT" id="quicksearchT" for="notes_body" empty="notes_empty" />
<small>
<a title="<?php echo _("Close Search") ?>" href="#" onclick="$('quicksearch').hide(); $('quicksearchT').value = ''; QuickFinder.filter($('quicksearchT')); $('quicksearchL').show(); return false;">X</a>
- <?php echo Horde::link(Horde::applicationUrl('search.php')) . _("More Options...") ?></a>
+ <?php echo Horde::link(Horde::url('search.php')) . _("More Options...") ?></a>
</small>
</div>
</div>
<th class="nosort" width="3%"><?php echo Horde::img('edit.png', _("Edit Note"), '') ?></th>
<?php if ($showNotepad): ?>
<th id="s<?php echo Mnemo::SORT_NOTEPAD ?>"<?php if ($sortby == Mnemo::SORT_NOTEPAD) echo ' class="' . $sortdirclass . '"' ?> width="2%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', Mnemo::SORT_NOTEPAD)), _("Sort by Notepad"), 'sortlink', '', '', _("Notepad")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby', Mnemo::SORT_NOTEPAD)), _("Sort by Notepad"), 'sortlink', '', '', _("Notepad")) ?>
</th>
<?php endif; ?>
<th id="s<?php echo Mnemo::SORT_DESC ?>"<?php if ($sortby == Mnemo::SORT_DESC) echo ' class="' . $sortdirclass . '"' ?> width="82%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter('list.php', 'sortby', Mnemo::SORT_DESC)), _("Sort by Note Text"), 'sortlink', '', '', _("No_te")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter('list.php', 'sortby', Mnemo::SORT_DESC)), _("Sort by Note Text"), 'sortlink', '', '', _("No_te")) ?>
</th>
<th id="s<?php echo Mnemo::SORT_CATEGORY ?>"<?php if ($sortby == Mnemo::SORT_CATEGORY) echo ' class="' . $sortdirclass . '"' ?> width="15%">
<?php
- echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter('list.php', 'sortby', Mnemo::SORT_CATEGORY)), _("Sort by Category"), 'sortlink', '', '', _("_Category"));
+ echo Horde::widget(Horde::url(Horde_Util::addParameter('list.php', 'sortby', Mnemo::SORT_CATEGORY)), _("Sort by Category"), 'sortlink', '', '', _("_Category"));
if ($GLOBALS['registry']->getAuth() && (!$GLOBALS['prefs']->isLocked('categories') ||
!$GLOBALS['prefs']->isLocked('category_colors'))) {
$categoryUrl = Horde_Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/prefs.php'), array('app' => 'horde', 'group' => 'categories'));
<?php
if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
$label = sprintf(_("Edit \"%s\""), $memo['desc']);
- echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($memourl, 'actionID', 'modify_memo')), $label) .
+ echo Horde::link(Horde::url(Horde_Util::addParameter($memourl, 'actionID', 'modify_memo')), $label) .
Horde::img('edit.png', $label, '') . '</a>';
}
?>
<td><?php echo htmlspecialchars($notepad) ?></td>
<?php endif; ?>
<td>
- <?php echo Horde::linkTooltip(Horde::applicationUrl($viewurl), '', '', '', '', ($memo['body'] != $memo['desc']) ? Mnemo::getNotePreview($memo) : '') . (strlen($memo['desc']) ? htmlspecialchars($memo['desc']) : '<em>' . _("Empty Note") . '</em>') ?></a>
+ <?php echo Horde::linkTooltip(Horde::url($viewurl), '', '', '', '', ($memo['body'] != $memo['desc']) ? Mnemo::getNotePreview($memo) : '') . (strlen($memo['desc']) ? htmlspecialchars($memo['desc']) : '<em>' . _("Empty Note") . '</em>') ?></a>
</td>
<td class="category<?php echo md5($memo['category']) ?>"><?php echo htmlspecialchars($memo['category'] ? $memo['category'] : _("Unfiled")) ?></td>
</tr>
$share = $GLOBALS['mnemo_shares']->getShare($memolist_id);
if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)): ?>
- <span class="rightFloat"><input type="button" class="button" value="<?php echo _("Delete this note") ?>" onclick="window.location='<?php echo addslashes(Horde::applicationUrl(Horde_Util::addParameter($memourl, 'actionID', 'delete_memos'))) ?>';" /></span>
+ <span class="rightFloat"><input type="button" class="button" value="<?php echo _("Delete this note") ?>" onclick="window.location='<?php echo addslashes(Horde::url(Horde_Util::addParameter($memourl, 'actionID', 'delete_memos'))) ?>';" /></span>
<?php endif; endif; ?>
<?php if ($actionID == 'modify_memo' && $show_passphrase): ?>
<?php if ($GLOBALS['registry']->getAuth()): ?>
<p>
- <a href="<?php echo Horde::applicationUrl('notepads/') ?>"><?php echo _("[Manage Notepads]") ?></a>
+ <a href="<?php echo Horde::url('notepads/') ?>"><?php echo _("[Manage Notepads]") ?></a>
</p>
<?php endif; ?>
-<form method="post" name="memo" enctype="multipart/form-data" action="<?php echo Horde::applicationUrl('list.php') ?>">
+<form method="post" name="memo" enctype="multipart/form-data" action="<?php echo Horde::url('list.php') ?>">
<input type="hidden" name="actionID" value="search_memos" />
<h1 class="header"><?php echo _("Search") ?></h1>
<div class="rightFloat">
<?php
if (!$print_view) {
- echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter('note/pdf.php', array('note' => $memo_id, 'notepad' => $memolist_id))), _("Save as PDF"), 'smallheader');
+ echo Horde::widget(Horde::url(Horde_Util::addParameter('note/pdf.php', array('note' => $memo_id, 'notepad' => $memolist_id))), _("Save as PDF"), 'smallheader');
if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
- echo ' | ' . Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($memourl, 'actionID', 'modify_memo')), _("Edit"), 'smallheader', '', '', _("_Edit"));
+ echo ' | ' . Horde::widget(Horde::url(Horde_Util::addParameter($memourl, 'actionID', 'modify_memo')), _("Edit"), 'smallheader', '', '', _("_Edit"));
}
if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
- echo ' | ' . Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($memourl, 'actionID', 'delete_memos')), _("Delete"), 'smallheader', '', $prefs->getValue('delete_opt') ? 'return window.confirm(\'' . addslashes(_("Really delete this note?")) . '\');' : '', _("_Delete"));
+ echo ' | ' . Horde::widget(Horde::url(Horde_Util::addParameter($memourl, 'actionID', 'delete_memos')), _("Delete"), 'smallheader', '', $prefs->getValue('delete_opt') ? 'return window.confirm(\'' . addslashes(_("Really delete this note?")) . '\');' : '', _("_Delete"));
}
}
?>
if ($uid = Horde_Util::getFormData('uid')) {
$memo = $storage->getByUID($uid, $passphrase);
if (is_a($memo, 'PEAR_Error')) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
$memo_id = $memo['memo_id'];
$memo_id = Horde_Util::getFormData('memo');
$memolist_id = Horde_Util::getFormData('memolist');
if (!isset($memo_id) || !$memolist_id) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
/* Get the current memo. */
$share = $GLOBALS['mnemo_shares']->getShare($memolist_id);
} catch (Horde_Share_Exception $e) {
$notification->push(sprintf(_("There was an error viewing this notepad: %s"), $e->getMessage()), 'horde.error');
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
$notification->push(sprintf(_("You do not have permission to view the notepad %s."), $share->get('name')), 'horde.error');
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
/* If the requested note doesn't exist, display an error message. */
if (!$memo || !isset($memo['memo_id'])) {
$notification->push(_("Note not found."), 'horde.error');
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
/* Get the note's history. */
'variable_length' => false,
'params' => array('task' => $task->id,
'tasklist' => $task->tasklist),
- 'link' => Horde::applicationUrl('view.php', true)->add(array('tasklist' => $task->tasklist, 'task' => $task->id)),
- 'edit_link' => Horde::applicationUrl('task.php', true)->add(array('tasklist' => $task->tasklist, 'task' => $task->id, 'actionID' => 'modify_task')),
- 'delete_link' => Horde::applicationUrl('task.php', true)->add(array('tasklist' => $task->tasklist, 'task' => $task->id, 'actionID' => 'delete_task')),
+ 'link' => Horde::url('view.php', true)->add(array('tasklist' => $task->tasklist, 'task' => $task->id)),
+ 'edit_link' => Horde::url('task.php', true)->add(array('tasklist' => $task->tasklist, 'task' => $task->id, 'actionID' => 'modify_task')),
+ 'delete_link' => Horde::url('task.php', true)->add(array('tasklist' => $task->tasklist, 'task' => $task->id, 'actionID' => 'delete_task')),
'ajax_link' => 'task:' . $task->tasklist . ':' . $task->id);
}
$title = ($differential >= 60)
? sprintf(_("%s is due in %s"), $task->name, Nag::secondsToString($differential))
: sprintf(_("%s is due now."), $task->name);
- $url = Horde::applicationUrl('view.php')->add(array(
+ $url = Horde::url('view.php')->add(array(
'task' => $task->id,
'tasklist' => $task->tasklist
));
break;
case 'menu':
- $add = Horde::applicationUrl('task.php')->add('actionID', 'add_task');
+ $add = Horde::url('task.php')->add('actionID', 'add_task');
$tree->addNode(
$parent . '__new',
false,
array(
'icon' => Horde_Themes::img('search.png'),
- 'url' => Horde::applicationUrl('search.php')
+ 'url' => Horde::url('search.php')
)
);
break;
? $this->_params['block_title']
: $registry->get('name');
- return Horde::applicationUrl($registry->getInitialPage(), true)->link()
+ return Horde::url($registry->getInitialPage(), true)->link()
. htmlspecialchars($label) . '</a>';
}
array('task' => $task->id,
'tasklist' => $task->tasklist));
$link = Horde::link(
- htmlspecialchars(Horde::applicationUrl($viewurl, true)))
+ htmlspecialchars(Horde::url($viewurl, true)))
. (!empty($task->name)
? htmlspecialchars($task->name) : _("[none]"))
. '</a>';
'url' => Horde::selfUrl(true)));
$label = sprintf(_("Edit \"%s\""), $task->name);
$html .= '<td width="1%">'
- . Horde::link(htmlspecialchars(Horde::applicationUrl(Horde_Util::addParameter($taskurl, 'actionID', 'modify_task'), true)), $label)
+ . Horde::link(htmlspecialchars(Horde::url(Horde_Util::addParameter($taskurl, 'actionID', 'modify_task'), true)), $label)
. Horde::img('edit.png', $label)
. '</a></td>';
if ($task->completed) {
} else {
$label = sprintf(_("Complete \"%s\""), $task->name);
$html .= '<td width="1%">'
- . Horde::link(htmlspecialchars(Horde::applicationUrl(Horde_Util::addParameter($taskurl, 'actionID', 'complete_task'), true)), $label)
+ . Horde::link(htmlspecialchars(Horde::url(Horde_Util::addParameter($taskurl, 'actionID', 'complete_task'), true)), $label)
. Horde::img('unchecked.png', $label) . '</a></td>';
}
}
'tasklist' => $task->tasklist));
$html .= $task->treeIcons()
. Horde::link(
- htmlspecialchars(Horde::applicationUrl($viewurl, true)),
+ htmlspecialchars(Horde::url($viewurl, true)),
$task->desc)
. (!empty($task->name)
? htmlspecialchars($task->name) : _("[none]"))
}
return '<link href="'
- . htmlspecialchars(Horde::applicationUrl('themes/categoryCSS.php',
+ . htmlspecialchars(Horde::url('themes/categoryCSS.php',
true))
. '" rel="stylesheet" type="text/css" />'
. '<table cellspacing="0" width="100%" class="linedRow">'
global $conf, $registry;
$menu = new Horde_Menu();
- $menu->add(Horde::applicationUrl('list.php'), _("_List Tasks"), 'nag.png', null, null, null, basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
+ $menu->add(Horde::url('list.php'), _("_List Tasks"), 'nag.png', null, null, null, basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
if (Nag::getDefaultTasklist(Horde_Perms::EDIT) &&
(!empty($conf['hooks']['permsdenied']) ||
$GLOBALS['injector']->getInstance('Horde_Perms')->hasAppPermission('max_tasks') === true ||
$GLOBALS['injector']->getInstance('Horde_Perms')->hasAppPermission('max_tasks') > Nag::countTasks())) {
- $menu->add(Horde::applicationUrl('task.php')->add('actionID', 'add_task'), _("_New Task"), 'add.png', null, null, null, Horde_Util::getFormData('task') ? '__noselection' : null);
+ $menu->add(Horde::url('task.php')->add('actionID', 'add_task'), _("_New Task"), 'add.png', null, null, null, Horde_Util::getFormData('task') ? '__noselection' : null);
if ($GLOBALS['browser']->hasFeature('dom')) {
$menu->add(new Horde_Url(''), _("_Quick Add"), 'add.png', null, null, 'Nag.quickAddPanel.show(); $(\'quickText\').focus(); return false;', Horde_Util::getFormData('task') ? 'quickAdd __noselection' : 'quickAdd');
}
}
/* Search. */
- $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde::url('search.php'), _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'));
/* Import/Export. */
if ($conf['menu']['import_export']) {
- $menu->add(Horde::applicationUrl('data.php'), _("_Import/Export"), 'data.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde::url('data.php'), _("_Import/Export"), 'data.png', Horde_Themes::img(null, 'horde'));
}
return $menu;
foreach ($addresses as $lang => $twentyFour) {
$GLOBALS['registry']->setLanguageEnvironment($lang);
- $view_link = Horde_Util::addParameter(Horde::applicationUrl('view.php', true),
+ $view_link = Horde_Util::addParameter(Horde::url('view.php', true),
array('tasklist' => $task->tasklist,
'task' => $task->id),
null, false);
}
if (!isset($view_url_list[$this->tasklist])) {
- $view_url_list[$this->tasklist] = Horde_Util::addParameter(Horde::applicationUrl('view.php'), 'tasklist', $this->tasklist);
- $task_url_list[$this->tasklist] = Horde_Util::addParameter(Horde::applicationUrl('task.php'), 'tasklist', $this->tasklist);
+ $view_url_list[$this->tasklist] = Horde_Util::addParameter(Horde::url('view.php'), 'tasklist', $this->tasklist);
+ $task_url_list[$this->tasklist] = Horde_Util::addParameter(Horde::url('task.php'), 'tasklist', $this->tasklist);
}
/* Obscure private tasks. */
echo '<div id="page">';
if (!$prefs->isLocked('show_completed')) {
- $listurl = Horde::applicationUrl('list.php');
+ $listurl = Horde::url('list.php');
$tabs = new Horde_Core_Ui_Tabs('show_completed', $vars);
$tabs->addTab(_("_All tasks"), $listurl, Nag::VIEW_ALL);
$tabs->addTab(_("Incom_plete tasks"), $listurl, Nag::VIEW_INCOMPLETE);
throw new Nag_Exception($result);
}
$notification->push(sprintf(ngettext("Added %d task", "Added %d tasks", count($result)), count($result)), 'horde.success');
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
header('Location: ' . $url);
exit;
}
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
require_once dirname(__FILE__) . '/lib/Application.php';
/* Redirect to the task list if no action has been requested. */
$actionID = $vars->get('actionID');
if (is_null($actionID)) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
/* Run through the action handlers. */
$message = @htmlspecialchars(sprintf(_("You are not allowed to create more than %d tasks."), $perms->hasAppPermission('max_tasks')), ENT_COMPAT, $GLOBALS['registry']->getCharset());
}
$notification->push($message, 'horde.error', array('content.raw'));
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
$vars->set('actionID', 'save_task');
}
/* Return to the task list. */
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
case 'save_task':
if ($vars->get('submitbutton') == _("Delete this task")) {
$share = $GLOBALS['nag_shares']->getShare($info['tasklist_id']);
} catch (Horde_Share_Exception $e) {
$notification->push(sprintf(_("Access denied saving task: %s"), $e->getMessage()), 'horde.error');
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
$notification->push(sprintf(_("Access denied saving task to %s."), $share->get('name')), 'horde.error');
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
/* Add new category. */
$perms = $GLOBALS['injector']->getInstance('Horde_Perms');
if ($perms->hasAppPermission('max_tasks') !== true &&
$perms->hasAppPermission('max_tasks') <= Nag::countTasks()) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
/* Creating a new task. */
header('Location: ' . $url);
exit;
}
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
break;
header('Location: ' . $url);
exit;
}
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
default:
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
$title = $form->getTitle();
// Exit if this isn't an authenticated user or if the user can't
// create new task lists (default share is locked).
if (!$GLOBALS['registry']->getAuth() || $prefs->isLocked('default_tasklist')) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$notification->push($e, 'horde.error');
}
- Horde::applicationUrl('tasklists/', true)->redirect();
+ Horde::url('tasklists/', true)->redirect();
}
$title = $form->getTitle();
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$tasklist_id = $vars->get('t');
if ($tasklist_id == $GLOBALS['registry']->getAuth()) {
$notification->push(_("This task list cannot be deleted."), 'horde.warning');
- Horde::applicationUrl('tasklists/', true)->redirect();
+ Horde::url('tasklists/', true)->redirect();
}
try {
$tasklist = $nag_shares->getShare($tasklist_id);
} catch (Horde_Share_Exception $e) {
$notification->push($tasklist, 'horde.error');
- Horde::applicationUrl('tasklists/', true)->redirect();
+ Horde::url('tasklists/', true)->redirect();
}
if ($tasklist->get('owner') != $GLOBALS['registry']->getAuth() &&
(!is_null($tasklist->get('owner')) || !$GLOBALS['registry']->isAdmin())) {
$notification->push(_("You are not allowed to delete this task list."), 'horde.error');
- Horde::applicationUrl('tasklists/', true)->redirect();
+ Horde::url('tasklists/', true)->redirect();
}
$form = new Nag_DeleteTaskListForm($vars, $tasklist);
$notification->push($e, 'horde.error');
}
- Horde::applicationUrl('tasklists/', true)->redirect();
+ Horde::url('tasklists/', true)->redirect();
}
$title = $form->getTitle();
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$tasklist = $nag_shares->getShare($vars->get('t'));
} catch (Horde_Share_Exception $e) {
$notification->push($e->getMessage(), 'horde.error');
- Horde::applicationUrl('tasklists/', true)->redirect();
+ Horde::url('tasklists/', true)->redirect();
}
if ($tasklist->get('owner') != $GLOBALS['registry']->getAuth() &&
(!is_null($tasklist->get('owner')) || !$GLOBALS['registry']->isAdmin())) {
$notification->push(_("You are not allowed to change this task list."), 'horde.error');
- Horde::applicationUrl('tasklists/', true)->redirect();
+ Horde::url('tasklists/', true)->redirect();
}
$form = new Nag_EditTaskListForm($vars, $tasklist);
$notification->push($e, 'horde.error');
}
- Horde::applicationUrl('tasklists/', true)->redirect();
+ Horde::url('tasklists/', true)->redirect();
}
$vars->set('name', $tasklist->get('name'));
exit;
}
-$edit_url_base = Horde::applicationUrl('tasklists/edit.php');
+$edit_url_base = Horde::url('tasklists/edit.php');
$perms_url_base = Horde::url($registry->get('webroot', 'horde') . '/services/shares/edit.php?app=nag');
-$delete_url_base = Horde::applicationUrl('tasklists/delete.php');
-$display_url_base = Horde::applicationUrl('list.php', true, -1);
+$delete_url_base = Horde::url('tasklists/delete.php');
+$display_url_base = Horde::url('list.php', true, -1);
$subscribe_url_base = $registry->get('webroot', 'horde');
if (isset($conf['urls']['pretty']) && $conf['urls']['pretty'] == 'rewrite') {
$subscribe_url_base .= '/rpc/nag/';
<title><?php echo htmlspecialchars($page_title) ?></title>
<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
<?php Horde_Themes::includeStylesheetFiles() ?>
-<link href="<?php echo Horde::applicationUrl('themes/categoryCSS.php') ?>" rel="stylesheet" type="text/css" />
+<link href="<?php echo Horde::url('themes/categoryCSS.php') ?>" rel="stylesheet" type="text/css" />
<script src="<?php echo $GLOBALS['registry']->get('jsuri', 'horde') ?>/glow/1.5.1/core/core.js" type="text/javascript"></script>
<script src="<?php echo $GLOBALS['registry']->get('jsuri', 'horde') ?>/glow/1.5.1/widgets/widgets.js" type="text/javascript"></script>
<link href="<?php echo $GLOBALS['registry']->get('jsuri', 'horde') ?>/glow/1.5.1/widgets/widgets.css" type="text/css" rel="stylesheet" />
<div class="header leftAlign">
<?php echo htmlspecialchars($title) . ' (' . $tasks->count() . ')' ?>
- <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search")) ?></a>
+ <a id="quicksearchL" href="<?php echo Horde::url('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search")) ?></a>
<div id="quicksearch" style="display:none">
<input type="text" name="quicksearchT" id="quicksearchT" for="tasks-body" empty="tasks_empty" />
<small>
<a title="<?php echo _("Close Search") ?>" href="#" onclick="$('quicksearch').hide(); $('quicksearchT').value = ''; QuickFinder.filter($('quicksearchT')); $('quicksearchL').show(); return false;">X</a>
- <?php echo Horde::link(Horde::applicationUrl('search.php')) . _("More Options...") ?></a>
+ <?php echo Horde::link(Horde::url('search.php')) . _("More Options...") ?></a>
</small>
</div>
</div>
<thead>
<tr class="item leftAlign">
<th id="s<?php echo Nag::SORT_COMPLETION ?>"<?php if ($sortby == Nag::SORT_COMPLETION) echo ' class="' . $sortdirclass . '"' ?> width="2%">
- <?php echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_COMPLETION)), _("Sort by Completion Status"), 'sortlink') . Horde::img('checkbox.png', _("Completed?")) ?></a>
+ <?php echo Horde::link(Horde::url(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_COMPLETION)), _("Sort by Completion Status"), 'sortlink') . Horde::img('checkbox.png', _("Completed?")) ?></a>
</th>
<?php if (in_array('tasklist', $columns)): ?>
<th id="s<?php echo Nag::SORT_OWNER ?>"<?php if ($sortby == Nag::SORT_OWNER) echo ' class="' . $sortdirclass . '"' ?> width="2%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_OWNER)), _("Sort by User Name"), 'sortlink', '', '', _("_Task List")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_OWNER)), _("Sort by User Name"), 'sortlink', '', '', _("_Task List")) ?>
</th>
<?php endif; if (in_array('priority', $columns)): ?>
<th id="s<?php echo Nag::SORT_PRIORITY ?>"<?php if ($sortby == Nag::SORT_PRIORITY) echo ' class="' . $sortdirclass . '"' ?> width="2%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_PRIORITY)), _("Sort by Priority"), 'sortlink', '', '', _("P_ri")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_PRIORITY)), _("Sort by Priority"), 'sortlink', '', '', _("P_ri")) ?>
</th>
<?php endif; ?>
<th width="2%" class="nosort">
<?php echo Horde::img('edit.png', _("Edit Task")) ?>
</th>
<th id="s<?php echo Nag::SORT_NAME ?>"<?php if ($sortby == Nag::SORT_NAME) echo ' class="' . $sortdirclass . '"' ?>>
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_NAME)), _("Sort by Name"), 'sortlink', '', '', _("Na_me")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_NAME)), _("Sort by Name"), 'sortlink', '', '', _("Na_me")) ?>
</th>
<th width="2%" class="nosort"><?php echo Horde::img('note.png', _("Task Note?")) ?></th>
<th width="2%" class="nosort"><?php echo Horde::img('alarm.png', _("Task Alarm?")) ?></th>
<?php if (in_array('due', $columns)): ?>
<th id="s<?php echo Nag::SORT_DUE ?>"<?php if ($sortby == Nag::SORT_DUE) echo ' class="' . $sortdirclass . '"' ?> width="2%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_DUE)), _("Sort by Due Date"), 'sortlink', '', '', _("_Due Date")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_DUE)), _("Sort by Due Date"), 'sortlink', '', '', _("_Due Date")) ?>
</th>
<?php endif; if (in_array('start', $columns)): ?>
<th id="s<?php echo Nag::SORT_START ?>"<?php if ($sortby == Nag::SORT_START) echo ' class="' . $sortdirclass . '"' ?> width="2%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_START)), _("Sort by Start Date"), 'sortlink', '', '', _("_Start Date")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_START)), _("Sort by Start Date"), 'sortlink', '', '', _("_Start Date")) ?>
</th>
<?php endif; if (in_array('estimate', $columns)): ?>
<th id="s<?php echo Nag::SORT_ESTIMATE ?>"<?php if ($sortby == Nag::SORT_ESTIMATE) echo ' class="' . $sortdirclass . '"' ?> width="10%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_ESTIMATE)), _("Sort by estimated time"), 'sortlink', '', '', _("Estimated Time")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_ESTIMATE)), _("Sort by estimated time"), 'sortlink', '', '', _("Estimated Time")) ?>
</th>
<?php endif; if (in_array('assignee', $columns)): ?>
<th id="s<?php echo Nag::SORT_ASSIGNEE ?>"<?php if ($sortby == Nag::SORT_ASSIGNEE) echo ' class="' . $sortdirclass . '"' ?> width="10%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_ASSIGNEE)), _("Sort by Assignee"), 'sortlink', '', '', _("Assignee")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_ASSIGNEE)), _("Sort by Assignee"), 'sortlink', '', '', _("Assignee")) ?>
</th>
<?php endif; if (in_array('category', $columns)): ?>
<th id="s<?php echo Nag::SORT_CATEGORY ?>"<?php if ($sortby == Nag::SORT_CATEGORY) echo ' class="' . $sortdirclass . '"' ?> width="10%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_CATEGORY)), _("Sort by Category"), 'sortlink', '', '', _("Cat_egory")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_CATEGORY)), _("Sort by Category"), 'sortlink', '', '', _("Cat_egory")) ?>
<?php
if ($GLOBALS['registry']->getAuth() &&
(!$GLOBALS['prefs']->isLocked('categories') ||
$$('#pageControlsInner .tasklist-info').invoke('observe', 'click', function() {
RedBox.loading();
var tasklist_id = this.previous().down('.checkbox').value;
- new Ajax.Request('<?php echo Horde::applicationUrl('tasklists/info.php') ?>', {
+ new Ajax.Request('<?php echo Horde::url('tasklists/info.php') ?>', {
parameters: { t: tasklist_id },
method: 'get',
onSuccess: function(transport) {
<?php if ($GLOBALS['registry']->getAuth()): ?>
<p>
- <a href="<?php echo Horde::applicationUrl('tasklists/') ?>"><?php echo _("[Manage Task Lists]") ?></a>
+ <a href="<?php echo Horde::url('tasklists/') ?>"><?php echo _("[Manage Task Lists]") ?></a>
</p>
<?php endif; ?>
<td>
<?php if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
if (empty($task->completed)) {
- echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($taskurl, 'actionID', 'complete_task')), _("Complete Task"), 'widget') . Horde::img('unchecked.png', _("Complete Task")) . '</a>';
+ echo Horde::link(Horde::url(Horde_Util::addParameter($taskurl, 'actionID', 'complete_task')), _("Complete Task"), 'widget') . Horde::img('unchecked.png', _("Complete Task")) . '</a>';
} else {
- echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($taskurl, 'actionID', 'complete_task')), _("Mark as incomplete"), 'widget') . Horde::img('checked.png', _("Mark as incomplete")) . '</a>';
+ echo Horde::link(Horde::url(Horde_Util::addParameter($taskurl, 'actionID', 'complete_task')), _("Mark as incomplete"), 'widget') . Horde::img('checked.png', _("Mark as incomplete")) . '</a>';
}
} else {
echo Nag::formatCompletion($task->completed) . '</a>';
$storage = Nag_Driver::singleton();
$task = $storage->getByUID($uid);
if ($task instanceof PEAR_Error) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
$task_id = $task->id;
$task_id = Horde_Util::getFormData('task');
$tasklist_id = Horde_Util::getFormData('tasklist');
if (!isset($task_id) || !$tasklist_id) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
/* Get the current task. */
/* If the requested task doesn't exist, display an error message. */
if (!isset($task) || !isset($task->id)) {
$notification->push(_("Task not found."), 'horde.error');
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
/* Load child tasks */
$share = $GLOBALS['nag_shares']->getShare($tasklist_id);
if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
$notification->push(_("You do not have permission to view this tasklist."), 'horde.error');
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
/* Get the task's history. */
}
if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
if (!$task->completed) {
- $links[] = Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($taskurl, 'actionID', 'complete_task')), _("Complete"), 'smallheader', '', '', _("_Complete"));
+ $links[] = Horde::widget(Horde::url(Horde_Util::addParameter($taskurl, 'actionID', 'complete_task')), _("Complete"), 'smallheader', '', '', _("_Complete"));
}
if (!$task->private || $task->owner == $GLOBALS['registry']->getAuth()) {
- $links[] = Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($taskurl, 'actionID', 'modify_task')), _("Edit"), 'smallheader', '', '', _("_Edit"));
+ $links[] = Horde::widget(Horde::url(Horde_Util::addParameter($taskurl, 'actionID', 'modify_task')), _("Edit"), 'smallheader', '', '', _("_Edit"));
}
}
if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
- $links[] = Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($taskurl, 'actionID', 'delete_task')), _("Delete"), 'smallheader', '', $prefs->getValue('delete_opt') ? 'return window.confirm(\'' . addslashes(_("Really delete this task?")) . '\');' : '', _("_Delete"));
+ $links[] = Horde::widget(Horde::url(Horde_Util::addParameter($taskurl, 'actionID', 'delete_task')), _("Delete"), 'smallheader', '', $prefs->getValue('delete_opt') ? 'return window.confirm(\'' . addslashes(_("Really delete this task?")) . '\');' : '', _("_Delete"));
}
require NAG_TEMPLATES . '/common-header.inc';
$id = $news->write_db->nextID($news->prefix);
if ($id instanceof PEAR_Error) {
$notification->push($id);
- Horde::applicationUrl('browse.php')->redirect();
+ Horde::url('browse.php')->redirect();
}
$query = 'INSERT INTO ' . $news->prefix
$result = $news->write_db->query($query, $data);
if ($result instanceof PEAR_Error) {
$notification->push($result->getDebugInfo(), 'horde.error');
- Horde::applicationUrl('edit.php')->redirect();
+ Horde::url('edit.php')->redirect();
}
// Picture
$url = $return;
} elseif (in_array($info['category1'], $allowed_cats) ||
in_array($info['category2'], $allowed_cats)) {
- $url = Horde_Util::addParameter(Horde::applicationUrl('edit.php'), 'id', $id);
+ $url = Horde_Util::addParameter(Horde::url('edit.php'), 'id', $id);
} else {
- $url = Horde::applicationUrl('browse.php');
+ $url = Horde::url('browse.php');
}
if ($info['status'] != News::CONFIRMED && $status_inserted == true) {
require_once NEWS_TEMPLATES . '/menu.inc';
require_once NEWS_TEMPLATES . '/add/before.inc';
-$form->renderActive(null, null, Horde_Util::addParameter(Horde::applicationUrl('add.php'), 'id', $id, false), 'post');
+$form->renderActive(null, null, Horde_Util::addParameter(Horde::url('add.php'), 'id', $id, false), 'post');
require_once $registry->get('templates', 'horde') . '/common-footer.inc';
} else {
$notification->push(_("Category was not deleted."), 'horde.warning');
}
- Horde::applicationUrl('admin/categories/index.php')->redirect();
+ Horde::url('admin/categories/index.php')->redirect();
}
require NEWS_BASE . '/templates/common-header.inc';
$notification->push($result->getMessage() . ': ' . $result->getDebugInfo(), 'horde.error');
} else {
$notification->push(sprintf(_("Category succesfully saved.")));
- Horde::applicationUrl('admin/categories/index.php', true)->redirect();
+ Horde::url('admin/categories/index.php', true)->redirect();
}
}
/* Set up the template fields. */
$title = _("Category Administration");
-$edit_url = Horde::applicationUrl('admin/categories/edit.php');
+$edit_url = Horde::url('admin/categories/edit.php');
$edit_img = Horde::img('edit.png', _("Edit"));
-$delete_url = Horde::applicationUrl('admin/categories/delete.php');
+$delete_url = Horde::url('admin/categories/delete.php');
$delete_img = Horde::img('delete.png', _("Delete"));
foreach ($categories as $category_id => $category) {
} else {
$notification->push(_("Source was not deleted."), 'horde.warning');
}
- Horde::applicationUrl('admin/sources/index.php')->redirect();
+ Horde::url('admin/sources/index.php')->redirect();
}
require NEWS_BASE . '/templates/common-header.inc';
$notification->push($result->getMessage() . ': ' . $result->getDebugInfo(), 'horde.error');
} else {
$notification->push(_("Source saved succesfully."));
- Horde::applicationUrl('admin/sources/index.php')->redirect();
+ Horde::url('admin/sources/index.php')->redirect();
}
}
$sources = array();
}
-$edit_url = Horde::applicationUrl('admin/sources/edit.php');
+$edit_url = Horde::url('admin/sources/edit.php');
$edit_img = Horde::img('edit.png', _("Edit"));
-$delete_url = Horde::applicationUrl('admin/sources/delete.php');
+$delete_url = Horde::url('admin/sources/delete.php');
$delete_img = Horde::img('delete.png', _("Delete"));
-$view_url = Horde::applicationUrl('browse.php');
+$view_url = Horde::url('browse.php');
$view_img = Horde::img('category.png', _("View items"));
foreach ($sources as $source_id => $source) {
$vars = Horde_Variables::getDefaultVariables();
$tabs = new Horde_Core_Ui_Tabs('admin', $vars);
-$tabs->addTab(_("Sources"), Horde::applicationUrl('admin/sources/index.php'), 'sources');
-$tabs->addTab(_("Categories"), Horde::applicationUrl('admin/categories/index.php'), 'categories');
+$tabs->addTab(_("Sources"), Horde::url('admin/sources/index.php'), 'sources');
+$tabs->addTab(_("Categories"), Horde::url('admin/categories/index.php'), 'categories');
$title = _("Browse");
$page = Horde_Util::getGet('news_page', 0);
$per_page = $prefs->getValue('per_page');
-$browse_url = Horde::applicationUrl('browse.php');
+$browse_url = Horde::url('browse.php');
$cid = Horde_Util::getGet('cid');
// Define creteria
// Default layout.
$layout = new Horde_Block_Layout_View(
unserialize($prefs->getValue('news_layout')),
- Horde::applicationUrl('content_edit.php'),
- Horde::applicationUrl('content.php'));
+ Horde::url('content_edit.php'),
+ Horde::url('content.php'));
$layout_html = $layout->toHtml();
$title = $registry->get('name');
require NEWS_TEMPLATES . '/common-header.inc';
require NEWS_TEMPLATES . '/menu.inc';
-echo '<div id="menuBottom"><a href="' . Horde::applicationUrl('content_edit.php') . '">' . _("Add Content") . '</a></div><div class="clear"> </div>';
+echo '<div id="menuBottom"><a href="' . Horde::url('content_edit.php') . '">' . _("Add Content") . '</a></div><div class="clear"> </div>';
echo $layout_html;
require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
if (!$registry->isAdmin(array('permission' => 'news:admin'))) {
$notification->push(_("Only admin can delete a news."));
- Horde::applicationUrl('edit.php')->redirect();
+ Horde::url('edit.php')->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$notification->push(sprintf(_("News %s: %s"), $id, _("not deleted")), 'horde.warning');
}
- Horde::applicationUrl('edit.php')->redirect();
+ Horde::url('edit.php')->redirect();
}
require NEWS_TEMPLATES . '/common-header.inc';
if (!$registry->isAdmin(array('permission' => 'news:admin'))) {
$notification->push(_("Only admin can delete a news."));
- Horde::applicationUrl('edit.php')->redirect();
+ Horde::url('edit.php')->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$allowed_cats = $news_cat->getAllowed(Horde_Perms::DELETE);
if (empty($allowed_cats)) {
$notification->push(_("You have not editor permission on any category."));
- Horde::applicationUrl('add.php')->redirect();
+ Horde::url('add.php')->redirect();
}
$id = (int)Horde_Util::getFormData('id', 0);
$page = (int)Horde_Util::getFormData('page', 0);
-$browse_url = Horde_Util::addParameter(Horde::applicationUrl('edit.php'), array('page' => $page, 'id' => $id), null, false);
-$edit_url = Horde::applicationUrl('add.php');
-$read_url = Horde::applicationUrl('reads.php');
+$browse_url = Horde_Util::addParameter(Horde::url('edit.php'), array('page' => $page, 'id' => $id), null, false);
+$edit_url = Horde::url('add.php');
+$read_url = Horde::url('reads.php');
$has_comments = $registry->hasMethod('forums/doComments');
$actionID = Horde_Util::getFormData('actionID');
{
require_once dirname(__FILE__) . '/../base.php';
- $url = Horde_Util::addParameter(Horde::applicationUrl('browse.php'), 'category', $this->_params['category']);
+ $url = Horde_Util::addParameter(Horde::url('browse.php'), 'category', $this->_params['category']);
$name = $GLOBALS['news_cat']->getName($this->_params['category']);
$html = Horde::link($url, sprintf(_("Last news in %s"), $name), 'header');
$html .= sprintf(_("Last news in %s"), $name) . '</a>';
}
$view = new News_View();
$view->news = $rows;
- $view->moreurl = Horde_Util::addParameter(Horde::applicationUrl('browse.php'), 'category', $this->_params['category']);
+ $view->moreurl = Horde_Util::addParameter(Horde::url('browse.php'), 'category', $this->_params['category']);
return $view->render('/block/news.php');
}
. ' FROM jonah_channels WHERE channel_type = 1 ORDER BY channel_name';
$chanels = $GLOBALS['news']->db->getAll($sql);
- $html .= '<form action="' . Horde::applicationUrl('feed.php') . '" id="feed_select" name="feed_select">'
+ $html .= '<form action="' . Horde::url('feed.php') . '" id="feed_select" name="feed_select">'
. '<select id="feed_id" name="feed_id" onchange="getFeed()">'
. '<option>- - - - - - - </option>';
foreach ($chanels as $chanel) {
function _title()
{
- return Horde::link(Horde::applicationUrl('browse.php'), _("Last news"), 'header') . _("Last news") . '</a>';
+ return Horde::link(Horde::url('browse.php'), _("Last news"), 'header') . _("Last news") . '</a>';
}
function _params()
}
$view = new News_View();
$view->news = $rows;
- $view->moreurl = Horde::applicationUrl('browse.php');
+ $view->moreurl = Horde::url('browse.php');
return $view->render('/block/news.php');
}
$sources = $GLOBALS['news']->getSources();
$html = '';
- $url = Horde::applicationUrl('browse.php');
+ $url = Horde::url('browse.php');
foreach ($sources as $source_id => $source_name) {
$html .= '- '
. Horde::link(Horde_Util::addparameter($url, 'source_id', $source_id), '', '', '_blank')
// prepare add link
if ($have_add_item) {
$add_img = Horde::img('mkdir.png', _("Add New Item"));
- $add_item = Horde::applicationUrl('items/edit.php');
+ $add_item = Horde::url('items/edit.php');
}
foreach ($cats as $cid => $category) {
$i = 0;
$tags = new News_TagCloud();
- $tag_link = Horde::applicationUrl('search.php');
+ $tag_link = Horde::url('search.php');
foreach ($tags_elemets as $tag => $time) {
sort($time);
$tags->addElement($tag, Horde_Util::addParameter($tag_link, array('word' => $tag)),
case 'news':
if (empty($GLOBALS['conf']['urls']['pretty'])) {
- return Horde_Util::addParameter(Horde::applicationUrl('news.php', $full, $append_session), 'id', $data);
+ return Horde_Util::addParameter(Horde::url('news.php', $full, $append_session), 'id', $data);
} else {
- return Horde::applicationUrl('article/' . $data, $full, $append_session);
+ return Horde::url('article/' . $data, $full, $append_session);
}
case 'category':
if (empty($GLOBALS['conf']['urls']['pretty'])) {
- return Horde_Util::addParameter(Horde::applicationUrl('browse.php', $full, $append_session), 'category', $data);
+ return Horde_Util::addParameter(Horde::url('browse.php', $full, $append_session), 'category', $data);
} else {
- return Horde::applicationUrl('category/' . $data, $full, $append_session);
+ return Horde::url('category/' . $data, $full, $append_session);
}
case 'source':
if (empty($GLOBALS['conf']['urls']['pretty'])) {
- return Horde_Util::addParameter(Horde::applicationUrl('browse.php', $full, $append_session), 'source', $data);
+ return Horde_Util::addParameter(Horde::url('browse.php', $full, $append_session), 'source', $data);
} else {
- return Horde::applicationUrl('source/' . $data, $full, $append_session);
+ return Horde::url('source/' . $data, $full, $append_session);
}
}
}
if ($GLOBALS['registry']->isAdmin(array('permission' => 'news:admin'))) {
$delete_img = Horde::img('delete.png', _("Delete"), ' style="width: 16px height: 16px"');
- $delete_url = Horde::applicationUrl('delete_file.php');
+ $delete_url = Horde::url('delete_file.php');
}
$dowload_img = Horde::img('save.png', _("Dowload"), ' style="width: 16px height: 16px"');
$dowload_zip = Horde::img('mime/compressed.png', _("Dowload Zip Compressed"), 'style="width: 16px height: 16px"');
- $view_url = Horde::applicationUrl('files.php');
+ $view_url = Horde::url('files.php');
$html = '<table><tr valign="top"><td>';
$html .= Horde::link(Horde_Util::addParameter($view_url, array('actionID' => 'download_zip_all', 'news_id' => $id)), _("Compress and dowload all files at once")) . $dowload_zip . '</a> ' . "\n";
static public function getImageUrl($id, $view = 'small', $type = 'news')
{
if (empty($GLOBALS['conf']['images']['direct'])) {
- return Horde_Util::addParameter(Horde::applicationUrl('view.php'),
+ return Horde_Util::addParameter(Horde::url('view.php'),
array('type' => $type,
'view' => $view,
'id' => $id),
$img_dir = Horde_Themes::img(null, 'horde');
if ($GLOBALS['prefs']->getValue('news_layout') != '') {
- $menu->add(Horde::applicationUrl('content.php'), _("Overview"), 'layout.png', $img_dir);
+ $menu->add(Horde::url('content.php'), _("Overview"), 'layout.png', $img_dir);
}
- $menu->add(Horde::applicationUrl('browse.php'), _("Archive"), 'info.png', $img_dir);
- $menu->add(Horde::applicationUrl('search.php'), _("Search"), 'search.png', $img_dir);
- $menu->add(Horde::applicationUrl('add.php'), _("Add"), 'edit.png', $img_dir);
+ $menu->add(Horde::url('browse.php'), _("Archive"), 'info.png', $img_dir);
+ $menu->add(Horde::url('search.php'), _("Search"), 'search.png', $img_dir);
+ $menu->add(Horde::url('add.php'), _("Add"), 'edit.png', $img_dir);
if ($GLOBALS['conf']['attributes']['tags']) {
- $menu->add(Horde::applicationUrl('cloud.php'), _("Tag cloud"), 'colorpicker.png', $img_dir);
+ $menu->add(Horde::url('cloud.php'), _("Tag cloud"), 'colorpicker.png', $img_dir);
}
if ($GLOBALS['registry']->isAdmin(array('permission' => 'news:admin'))) {
- $menu->add(Horde::applicationUrl('edit.php'), _("Editorship"), 'config.png', $img_dir);
- $menu->add(Horde::applicationUrl('admin/categories/index.php'), _("Administration"), 'administration.png', $img_dir);
+ $menu->add(Horde::url('edit.php'), _("Editorship"), 'config.png', $img_dir);
+ $menu->add(Horde::url('admin/categories/index.php'), _("Administration"), 'administration.png', $img_dir);
}
return $menu;
}
$html = '';
- $search = Horde::applicationUrl('search.php');
+ $search = Horde::url('search.php');
foreach (explode(' ', $tags) as $tag) {
$html .= '<a href="'
. Horde_Util::addParameter($search, array('word' => $tag))
$row = $news->get($id);
if ($row instanceof PEAR_Error) {
$notification->push($row);
- Horde::applicationUrl('browse.php')->redirect();
+ Horde::url('browse.php')->redirect();
}
/* Error handler */
// check if the news exists
if ($row instanceof PEAR_Error) {
$notification->push($row);
- Horde::applicationUrl('index.php')->redirect();
+ Horde::url('index.php')->redirect();
}
// check if the news exists
$title = $row['title'];
$template_path = News::getTemplatePath($row['category1'], 'news');
-$browse_url = Horde::applicationUrl('browse.php');
+$browse_url = Horde::url('browse.php');
require_once NEWS_TEMPLATES . '/common-header.inc';
require_once NEWS_TEMPLATES . '/menu.inc';
$row = $news->get($id);
if ($row instanceof PEAR_Error) {
$notification->push($row);
- Horde::applicationUrl('browse.php')->redirect();
+ Horde::url('browse.php')->redirect();
}
$body = $row['title'] . "\n\n"
// Check if the news exists
if ($row instanceof PEAR_Error) {
$notification->push($row);
- Horde::applicationUrl('browse.php')->redirect();
+ Horde::url('browse.php')->redirect();
}
// Set up the PDF object.
$id = Horde_Util::getFormData('id', 0);
$actionID = Horde_Util::getFormData('actionID', false);
-$url = Horde::applicationUrl('reads.php');
+$url = Horde::url('reads.php');
$sql = 'SELECT id, user, ip, readdate FROM ' . $news->prefix . '_user_reads WHERE ';
if ($actionID) {
<language>' . str_replace('_', '-', strtolower($registry->preferredLang())) . '</language>
<lastBuildDate>' . date('r') . '</lastBuildDate>
<description>' . htmlspecialchars($title) . '</description>
- <link>' . Horde::applicationUrl('index.php', true, -1) . '</link>
+ <link>' . Horde::url('index.php', true, -1) . '</link>
<generator>' . htmlspecialchars($registry->get('name')) . '</generator>';
foreach ($list as $comment) {
$title = $registry->get('name', 'horde');
- $read_url = Horde::applicationUrl('read.php', true, -1);
+ $read_url = Horde::url('read.php', true, -1);
$rss = '<?xml version="1.0" encoding="' . $GLOBALS['registry']->getCharset() . '" ?>
<rss version="2.0">
<channel>
<language>' . str_replace('_', '-', strtolower($registry->preferredLang())) . '</language>
<lastBuildDate>' . date('r') . '</lastBuildDate>
<description>' . htmlspecialchars($title) . '</description>
- <link>' . Horde::applicationUrl('index.php', true, -1) . '</link>
+ <link>' . Horde::url('index.php', true, -1) . '</link>
<generator>' . htmlspecialchars($registry->get('name')) . '</generator>';
$rss .= '
<item>
<title>' . _("Last news") . ' </title>
- <link>' . Horde::applicationUrl('rss/news.php', true, -1) . '</link>
+ <link>' . Horde::url('rss/news.php', true, -1) . '</link>
</item>';
$rss .= '
<item>
<title>' . _("Last comments") . ' </title>
- <link>' . Horde::applicationUrl('rss/comments.php', true, -1) . '</link>
+ <link>' . Horde::url('rss/comments.php', true, -1) . '</link>
</item>';
$rss .= '
<language>' . str_replace('_', '-', strtolower($registry->preferredLang())) . '</language>
<lastBuildDate>' . date('r', $lastnewstime) . '</lastBuildDate>
<description>' . htmlspecialchars($title) . '</description>
- <link>' . Horde::applicationUrl('index.php', true, -1) . '</link>
+ <link>' . Horde::url('index.php', true, -1) . '</link>
<generator>' . htmlspecialchars($registry->get('name')) . '</generator>';
$rssfooter = '
$title = _("Browse");
$page = Horde_Util::getGet('news_page', 0);
$per_page = $prefs->getValue('per_page');
-$browse_url = Horde::applicationUrl('browse.php');
+$browse_url = Horde::url('browse.php');
$cid = Horde_Util::getGet('cid');
$vars = Horde_Variables::getDefaultVariables();
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
-<link rel="alternate" title="<?php echo _("Last news") ?>" href="<?php echo Horde::applicationUrl('rss/news.php', true, -1) ?>" type="application/rss+xml" />
-<link rel="alternate" title="<?php echo _("Last comments") ?>" href="<?php echo Horde::applicationUrl('rss/comments.php', true, -1) ?>" type="application/rss+xml" />
+<link rel="alternate" title="<?php echo _("Last news") ?>" href="<?php echo Horde::url('rss/news.php', true, -1) ?>" type="application/rss+xml" />
+<link rel="alternate" title="<?php echo _("Last comments") ?>" href="<?php echo Horde::url('rss/comments.php', true, -1) ?>" type="application/rss+xml" />
<?php Horde_Themes::includeStylesheetFiles() ?>
</head>
}
echo _(" by ") . $version['user_uid'] . _(" at ") . $version['created'] . "\n(";
- $url = Horde_Util::addParameter(Horde::applicationUrl('news.php'), array('id' => $id, 'version' => $version['version']));
+ $url = Horde_Util::addParameter(Horde::url('news.php'), array('id' => $id, 'version' => $version['version']));
echo Horde::link($url, _("View"), '', '_blank', '', _("View")) . _("View") . '</a> | ';
- $url = Horde_Util::addParameter(Horde::applicationUrl('edit.php'), array('id' => $id, 'actionID' => 'renew'));
+ $url = Horde_Util::addParameter(Horde::url('edit.php'), array('id' => $id, 'actionID' => 'renew'));
echo Horde::link(Horde_Util::addParameter($url,'version', $version['version']),_("Renew")) . _("Renew") . '</a> | ';
- $url = Horde_Util::addParameter(Horde::applicationUrl('diff.php'), array('id' => $id, 'version' => $version['version']));
+ $url = Horde_Util::addParameter(Horde::url('diff.php'), array('id' => $id, 'version' => $version['version']));
echo Horde::link('#', _("Diff"), '', '', Horde::popupJs($url, array('urlencode' => true)) . 'return false;') . _("Diff") . '</a> ';
echo ')<br />' . "\n";
$url = Horde_Util::addParameter($browse_url, array('page' => $page, 'actionID' => 'activate', 'id' => $row['id']));
echo Horde::link($url,_("Activate")) . Horde::img('tick.png', _("Activate"), '', $img_dir) . '</a> ';
- $url = Horde_Util::addParameter(Horde::applicationUrl('delete.php'), 'id', $row['id']);
+ $url = Horde_Util::addParameter(Horde::url('delete.php'), 'id', $row['id']);
echo Horde::link($url,_("Delete"), '', '', '', _("Delete")) . Horde::img('delete.png', _("Delete"), '', $img_dir) . '</a> ';
if ($row['status'] == News::LOCKED) {
<div id="menu">
<div style="float: right;">
-<form action="<?php echo Horde::applicationUrl('browse.php') ?>" method="get" id="menu_category" name="menu_category">
+<form action="<?php echo Horde::url('browse.php') ?>" method="get" id="menu_category" name="menu_category">
<?php echo _("Category") ?>:
<select id="category" name="category" onchange="document.menu_category.submit()">
<option>- - - - - - - </option>
echo '</ul><br />';
}
-$trackback_url = Horde_Util::addParameter(Horde::applicationUrl('trackback.php', true), 'id', $id);
+$trackback_url = Horde_Util::addParameter(Horde::url('trackback.php', true), 'id', $id);
echo _("Use the following link to trackback from your own site: ") .
'<br> <input value="' . $trackback_url . '" /><br />';
<br />
<div class="header"><?php echo _("Send by mail") ?></div>
-<form id="mail_send" name="mail_send" method="post" action="<?php echo Horde::applicationUrl('mail.php') ?>">
+<form id="mail_send" name="mail_send" method="post" action="<?php echo Horde::url('mail.php') ?>">
<input type="text" name="email" id="email" size="15" />
<input type="hidden" name="id" id="id" value="<?php echo $id ?>" />
<input type="image" src="<?php echo Horde_Themes::img('mail.png') ?>"></a>
echo $img . ' ' . Horde::link('javascript:window.print()') . _("Printer firendly") . '</a><br />';
$img = Horde::img('mime/pdf.png');
-echo $img . ' ' . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('pdf.php'), 'id', $id)) . _("PDF") . '</a><br />';
+echo $img . ' ' . Horde::link(Horde_Util::addParameter(Horde::url('pdf.php'), 'id', $id)) . _("PDF") . '</a><br />';
/* Bookmark link */
if ($registry->hasMethod('bookmarks/getAddUrl')) {
if ($registry->hasInterface('notes')) {
$img = Horde::img(Horde_Themes::img('mnemo.png', 'mnemo'));
- $url = Horde_Util::addParameter(Horde::applicationUrl('note.php', true), 'id', $id);
+ $url = Horde_Util::addParameter(Horde::url('note.php', true), 'id', $id);
echo $img . ' ' . Horde::link($url) . _("Add to notes.") . '</a><br />';
}
require OPERATOR_TEMPLATES . '/common-header.inc';
require OPERATOR_TEMPLATES . '/menu.inc';
$notification->notify();
-$form->renderActive($renderer, $vars, Horde::applicationUrl('export.php'), 'post');;
+$form->renderActive($renderer, $vars, Horde::url('export.php'), 'post');;
require $registry->get('templates', 'horde') . '/common-footer.inc';
global $conf, $registry, $browser, $print_link;
$menu = new Horde_Menu(Horde_Menu::MASK_ALL);
- $menu->add(Horde::applicationUrl('viewgraph.php'), _("_View Graphs"), 'graphs.png', null, null, null, basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
- $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde::url('viewgraph.php'), _("_View Graphs"), 'graphs.png', null, null, null, basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
+ $menu->add(Horde::url('search.php'), _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'));
/* Export */
if ($GLOBALS['conf']['menu']['export']) {
- $menu->add(Horde::applicationUrl('export.php'), _("_Export"), 'data.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde::url('export.php'), _("_Export"), 'data.png', Horde_Themes::img(null, 'horde'));
}
if ($returnType == 'object') {
require OPERATOR_TEMPLATES . '/common-header.inc';
require OPERATOR_TEMPLATES . '/menu.inc';
$notification->notify();
-$form->renderActive($renderer, $vars, Horde::applicationUrl('search.php'), 'post');
+$form->renderActive($renderer, $vars, Horde::url('search.php'), 'post');
$columns = unserialize($prefs->getValue('columns'));
if (!empty($data)) {
$graphs = array();
if (!empty($stats)) {
- $url = Horde::applicationUrl('graphgen.php');
+ $url = Horde::url('graphgen.php');
$graphtypes = Operator::getGraphInfo();
foreach($graphtypes as $type => $info) {
require OPERATOR_TEMPLATES . '/common-header.inc';
require OPERATOR_TEMPLATES . '/menu.inc';
-$form->renderActive($renderer, $vars, Horde::applicationUrl('viewgraph.php'), 'post');
+$form->renderActive($renderer, $vars, Horde::url('viewgraph.php'), 'post');
if (!empty($stats) && !empty($graphs[$curgraph])) {
echo '<br />';
static public function getMenu()
{
$menu = new Horde_Menu(Horde_Menu::MASK_ALL);
- $menu->add(Horde::applicationUrl('paste.php'), _("Paste"), 'pastie.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde::url('paste.php'), _("Paste"), 'pastie.png', Horde_Themes::img(null, 'horde'));
return $menu;
}
require_once PASTIE_BASE . '/lib/Forms/Paste.php';
$vars = Horde_Variables::getDefaultVariables();
-$url = Horde::applicationUrl('paste.php');
+$url = Horde::url('paste.php');
$form = new PasteForm($vars);
$notification->push(sprintf('Paste saved. %s', $uuid), 'horde.success');
- Horde::applicationUrl('uuid/' . $uuid, true)->redirect();
+ Horde::url('uuid/' . $uuid, true)->redirect();
} catch (Exception $e) {
$notification->push($e->getMessage(), 'horde.error');
}
<?php
-$uuid = Horde::applicationUrl('uuid');
+$uuid = Horde::url('uuid');
?>
<div id="recentPastes">
<h2>Recent Pastings</h2>
}
}
-$pasteurl = Horde::applicationUrl('paste.php');
+$pasteurl = Horde::url('paste.php');
$vars = new Horde_Variables($paste);
$form = new PasteForm($vars);
$menus = $shout->storage->getMenus($curaccount['code']);
if (empty($menus)) {
- Horde::applicationUrl('wizard.php', true)->redirect();
+ Horde::url('wizard.php', true)->redirect();
}
switch($action) {
$menus = $shout->storage->getMenus($curaccount['code']);
if (empty($menus)) {
- Horde::applicationUrl('wizard.php', true)->redirect();
+ Horde::url('wizard.php', true)->redirect();
}
-Horde::applicationUrl('dialplan.php', true)->redirect();
+Horde::url('dialplan.php', true)->redirect();
$mask = Horde_Menu::MASK_PROBLEM | Horde_Menu::MASK_LOGIN;
$menu = new Horde_Menu($mask);
- $menu->add(Horde::applicationUrl('dialplan.php'), _("Call Menus"), "dialplan.png");
- $menu->add(Horde::applicationUrl('recordings.php'), _("Recordings"), "recordings.png");
- $menu->add(Horde::applicationUrl('extensions.php'), _("Extensions"), "extension.png");
- $menu->add(Horde::applicationUrl('devices.php'), _("Devices"), "shout.png");
- $menu->add(Horde::applicationUrl('conferences.php'), _("Conferences"), "conference.png");
+ $menu->add(Horde::url('dialplan.php'), _("Call Menus"), "dialplan.png");
+ $menu->add(Horde::url('recordings.php'), _("Recordings"), "recordings.png");
+ $menu->add(Horde::url('extensions.php'), _("Extensions"), "extension.png");
+ $menu->add(Horde::url('devices.php'), _("Devices"), "shout.png");
+ $menu->add(Horde::url('conferences.php'), _("Conferences"), "conference.png");
/* Administration. */
if ($GLOBALS['registry']->isAdmin(array('permission' => 'shout:admin'))) {
- $menu->add(Horde::applicationUrl('admin.php'), _("_Admin"), 'admin.png');
+ $menu->add(Horde::url('admin.php'), _("_Admin"), 'admin.png');
}
if ($returnType == 'object') {
$tabname = Horde_Util::getFormData('view');
$tabs = new Horde_Core_Ui_Tabs('view', Horde_Variables::getDefaultVariables());
$tabs->addTab(_("Telephone Numbers"),
- Horde::applicationUrl('admin/numbers.php'),
+ Horde::url('admin/numbers.php'),
array('view' => 'numbers', id => 'tabnumbers'));
$tabs->addTab(_("Accounts"),
- Horde::applicationUrl('admin/accounts.php'),
+ Horde::url('admin/accounts.php'),
array('view' => 'accounts', id => 'tabaccounts'));
if ($view === null) {
$view = 'numbers';
<?php
-$Form->renderActive($RENDERER, $vars, Horde::applicationUrl('admin/accounts.php'), 'post');
+$Form->renderActive($RENDERER, $vars, Horde::url('admin/accounts.php'), 'post');
if ($vars->get('action') == 'edit') {
- $deleteUrl = Horde::applicationUrl('admin/accounts.php');
+ $deleteUrl = Horde::url('admin/accounts.php');
$params = array ('action' => 'delete',
'account' => $account);
$deleteUrl = Horde_Util::addParameter($deleteUrl, $params);
<td class="uheader">Admin PIN</td>
</tr>
<?php
- $url = Horde::applicationUrl("admin/accounts.php");
+ $url = Horde::url("admin/accounts.php");
$editurl = Horde_Util::addParameter($url, 'action', 'edit');
$deleteurl = Horde_Util::addParameter($url, 'action', 'delete');
foreach ($accounts as $acctinfo) {
<td class="uheader">Menu Name</td>
</tr>
<?php
- $url = Horde::applicationUrl("admin/numbers.php");
+ $url = Horde::url("admin/numbers.php");
$editurl = Horde_Util::addParameter($url, 'action', 'edit');
$deleteurl = Horde_Util::addParameter($url, 'action', 'delete');
foreach ($numbers as $numberinfo) {
<?php
-$Form->renderActive($RENDERER, $vars, Horde::applicationUrl('conferences.php'), 'post');
+$Form->renderActive($RENDERER, $vars, Horde::url('conferences.php'), 'post');
<td class="uheader">Options</td>
</tr>
<?php
- $url = Horde::applicationUrl("conferences.php");
+ $url = Horde::url("conferences.php");
$editurl = Horde_Util::addParameter($url, 'action', 'edit');
$deleteurl = Horde_Util::addParameter($url, 'action', 'delete');
foreach ($conferences as $roomno => $info) {
</div>
<ul id="controls">
<?php
- $addurl = Horde::applicationUrl('conferences.php');
+ $addurl = Horde::url('conferences.php');
$addurl = Horde_Util::addParameter($addurl, 'action', 'add');
?>
<li><a class="button" href="<?php echo $addurl; ?>">
Device: <?php echo $vars->get('devid'); ?><br>
<?php
-$Form->renderActive($RENDERER, $vars, Horde::applicationUrl('devices.php'), 'post');
+$Form->renderActive($RENDERER, $vars, Horde::url('devices.php'), 'post');
?>
<?php
-$Form->renderActive($RENDERER, $vars, Horde::applicationUrl('devices.php'), 'post');
+$Form->renderActive($RENDERER, $vars, Horde::url('devices.php'), 'post');
$line = 0;
foreach ($devices as $devid => $info) {
- $url = Horde::applicationUrl("devices.php");
+ $url = Horde::url("devices.php");
$url = Horde_Util::addParameter($url,
array(
'devid' => $devid,
</div>
<ul id="controls">
<?php
- $addurl = Horde::applicationUrl('devices.php');
+ $addurl = Horde::url('devices.php');
$addurl = Horde_Util::addParameter($addurl, 'action', 'add');
?>
<li><a class="button" href="<?php echo $addurl; ?>">
<?php
-$Form->renderActive(null, $vars, Horde::applicationUrl('dialplan.php'), 'post');
+$Form->renderActive(null, $vars, Horde::url('dialplan.php'), 'post');
<br style="clear:both;">
<ul id="dialplanControls" class="controls">
<?php
- $addurl = Horde::applicationUrl('dialplan.php');
+ $addurl = Horde::url('dialplan.php');
$addurl = Horde_Util::addParameter($addurl, 'action', 'add');
?>
<?php
foreach ($extensions as $extension => $info) {
- $url = Horde::applicationUrl("extensions.php");
+ $url = Horde::url("extensions.php");
$url = Horde_Util::addParameter($url,
array(
'extension' => $extension,
<br />
<ul id="extensionsControls" class="controls">
<?php
- $addurl = Horde::applicationUrl('extensions.php');
+ $addurl = Horde::url('extensions.php');
$addurl = Horde_Util::addParameter($addurl, 'action', 'add');
?>
<li><span class="button" onclick="showExtensionForm()">
<?php
-$Form->renderActive($RENDERER, $vars, Horde::applicationUrl('recordings.php'), 'post');
+$Form->renderActive($RENDERER, $vars, Horde::url('recordings.php'), 'post');
<td class="uheader">Recording ID</td>
</tr>
<?php
- $url = Horde::applicationUrl("recordings.php");
+ $url = Horde::url("recordings.php");
$deleteurl = Horde_Util::addParameter($url, 'action', 'delete');
foreach ($recordings as $info) {
?>
$menus = $shout->storage->getMenus($curaccount['code']);
if (!empty($menus) && !empty($menus[Shout::MAIN_MENU])) {
- Horde::applicationUrl('dialplan.php', true)->redirect();
+ Horde::url('dialplan.php', true)->redirect();
}
// Create the default recording for the main menu
static public function getMenu()
{
$menu = new Horde_Menu(Horde_Menu::MASK_ALL);
- $menu->add(Horde::applicationUrl('list.php'), _("List"), 'user.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde::url('list.php'), _("List"), 'user.png', Horde_Themes::img(null, 'horde'));
return $menu;
}
/* Redirect to create a new class if we don't have access to any class */
if (count(Skoli::listClasses(false, Horde_Perms::EDIT)) == 0 && $GLOBALS['registry']->getAuth()) {
$notification->push(_("Please create a new Class first."), 'horde.message');
- Horde::applicationUrl('classes/create.php', true)->redirect();
+ Horde::url('classes/create.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$notification->push(sprintf(_("The new entry for \"%s\" has been added."), $result), 'horde.success');
}
- Horde::applicationUrl('add.php', true)
+ Horde::url('add.php', true)
->add('class', $vars->get('class_id'))
->redirect();
exit;
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
// Exit if we don't have access to addressbooks.
require_once SKOLI_BASE . '/lib/School.php';
if (!count(Skoli_School::listAddressBooks())) {
$notification->push(_("You don't have access to any valid addressbook."), 'horde.error');
- Horde::applicationUrl('classes/', true)->redirect();
+ Horde::url('classes/', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$prefs->setValue('display_classes', serialize($GLOBALS['display_classes']));
}
- Horde::applicationUrl('classes/', true)->redirect();
+ Horde::url('classes/', true)->redirect();
}
$title = $form->getTitle();
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$class = $skoli_shares->getShare($class_id);
if (is_a($class, 'PEAR_Error')) {
$notification->push($class, 'horde.error');
- Horde::applicationUrl('classes/', true)->redirect();
+ Horde::url('classes/', true)->redirect();
} elseif (!$class->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
$notification->push(_("You are not allowed to delete this class."), 'horde.error');
- Horde::applicationUrl('classes/', true)->redirect();
+ Horde::url('classes/', true)->redirect();
}
$form = new Skoli_DeleteClassForm($vars, $class);
$notification->push(sprintf(_("The class \"%s\" has been deleted."), $class->get('name')), 'horde.success');
}
- Horde::applicationUrl('classes/', true)->redirect();
+ Horde::url('classes/', true)->redirect();
}
$title = $form->getTitle();
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$class = $skoli_shares->getShare($vars->get('c'));
if (is_a($class, 'PEAR_Error')) {
$notification->push($class, 'horde.error');
- Horde::applicationUrl('classes/', true)->redirect();
+ Horde::url('classes/', true)->redirect();
} elseif (!$class->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
$notification->push(_("You are not allowed to change this class."), 'horde.error');
- Horde::applicationUrl('classes/', true)->redirect();
+ Horde::url('classes/', true)->redirect();
}
$vars->set('school', $class->get('school'));
if (!$vars->exists('marks')) {
}
}
- Horde::applicationUrl('classes/', true)->redirect();
+ Horde::url('classes/', true)->redirect();
}
if (!$vars->exists('name')) {
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
-$edit_url_base = Horde::applicationUrl('classes/edit.php');
+$edit_url_base = Horde::url('classes/edit.php');
$perms_url_base = Horde::url($registry->get('webroot', 'horde') . '/services/shares/edit.php?app=skoli', true);
-$delete_url_base = Horde::applicationUrl('classes/delete.php');
+$delete_url_base = Horde::url('classes/delete.php');
$classes = Skoli::listClasses(true);
$sorted_classes = array();
require_once dirname(__FILE__) . '/lib/base.php';
if (!$conf['menu']['export']) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
$classes = Skoli::listClasses();
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- Horde::applicationUrl('list.php', true)->redirect();
+ Horde::url('list.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$entry = $driver->getEntry($vars->get('entry'));
if (is_a($entry, 'PEAR_Error') || !count($entry)) {
$notification->push(_("Entry not found."), 'horde.error');
- Horde::applicationUrl('search.php', true)->redirect();
+ Horde::url('search.php', true)->redirect();
}
$share = $GLOBALS['skoli_shares']->getShare($entry['class_id']);
// Check permissions
if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
$notification->push(_("You are not allowed to view this entry."), 'horde.error');
- Horde::applicationUrl('search.php', true)
+ Horde::url('search.php', true)
->add('actionID', 'search')
->redirect();
}
$notification->push(sprintf(_("Couldn't update this entry: %s"), $result->getMessage()), 'horde.error');
} else {
$notification->push(sprintf(_("The entry for \"%s\" has been saved."), $studentdetails[$conf['addresses']['name_field']]), 'horde.success');
- Horde::applicationUrl('search.php', true)
+ Horde::url('search.php', true)
->add('actionID', 'search')
->redirect();
}
$notification->push(sprintf(_("There was an error deleting this entry: %s"), $deleted->getMessage()), 'horde.error');
} else {
$notification->push(sprintf(_("The entry for \"%s\" has been deleted."), $studentdetails[$conf['addresses']['name_field']]), 'horde.success');
- Horde::applicationUrl('search.php', true)
+ Horde::url('search.php', true)
->add('actionID', 'search')
->redirect();
}
}
// Get tabs.
-$url = Horde_Util::addParameter(Horde::applicationUrl('entry.php'), 'entry', $entry['object_id']);
+$url = Horde_Util::addParameter(Horde::url('entry.php'), 'entry', $entry['object_id']);
$tabs = new Horde_Core_Ui_Tabs('view', $vars);
$tabs->addTab(_("View"), $url, array('tabname' => 'Entry', 'id' => 'tabEntry'));
if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
{
require_once dirname(__FILE__) . '/../base.php';
- $add = Horde::applicationUrl('add.php');
+ $add = Horde::url('add.php');
$add_img = Horde_Themes::img('add.png');
$classes = Skoli::listClasses(false, Horde_Perms::EDIT);
false,
array(
'icon' => Horde_Themes::img('search.png'),
- 'url' => Horde::applicationUrl('search.php')
+ 'url' => Horde::url('search.php')
)
);
}
global $conf, $registry, $browser, $print_link;
$menu = new Horde_Menu(Horde_Menu::MASK_ALL);
- $menu->add(Horde::applicationUrl('list.php'), _("List Classes"), 'skoli.png', null, null, null, basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
+ $menu->add(Horde::url('list.php'), _("List Classes"), 'skoli.png', null, null, null, basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
if (count(Skoli::listClasses(false, Horde_Perms::EDIT))) {
- $menu->add(Horde::applicationUrl('add.php'), _("_New Entry"), 'add.png', null, null, null, Horde_Util::getFormData('entry') ? '__noselection' : null);
+ $menu->add(Horde::url('add.php'), _("_New Entry"), 'add.png', null, null, null, Horde_Util::getFormData('entry') ? '__noselection' : null);
}
/* Search. */
- $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde::url('search.php'), _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'));
/* Import/Export. */
if ($conf['menu']['export']) {
- $menu->add(Horde::applicationUrl('data.php'), _("_Export"), 'data.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde::url('data.php'), _("_Export"), 'data.png', Horde_Themes::img(null, 'horde'));
}
// @TODO Implement an easy form to create timetables in e.g. Kronolith
* Show this item only if an application provides 'calendar/show' and we have permissions to view it.
$app = $registry->hasMethod('calendar/show');
if ($app !== false && $registry->get('status', $app) != 'inactive' && $registry->hasPermission($app, Horde_Perms::EDIT)) {
- $menu->add(Horde::applicationUrl(Horde_Util::addParameter('timetable.php', 'actionID', 'new_timetable')), _("_New Timetable"), 'timetable.png');
+ $menu->add(Horde::url(Horde_Util::addParameter('timetable.php', 'actionID', 'new_timetable')), _("_New Timetable"), 'timetable.png');
}
*/
/* Redirect to create a new class if we don't have access to any class */
if (count(Skoli::listClasses()) == 0 && $GLOBALS['registry']->getAuth()) {
$notification->push(_("Please create a new Class first."), 'horde.message');
- Horde::applicationUrl('classes/create.php', true)->redirect();
+ Horde::url('classes/create.php', true)->redirect();
}
switch ($actionID) {
<title><?php echo htmlspecialchars($page_title) ?></title>
<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
<?php Horde_Themes::includeStylesheetFiles() ?>
-<link href="<?php echo Horde::applicationUrl('themes/categoryCSS.php') ?>" rel="stylesheet" type="text/css" />
+<link href="<?php echo Horde::url('themes/categoryCSS.php') ?>" rel="stylesheet" type="text/css" />
</head>
<body<?php if ($bc) echo ' class="' . $bc . '"' ?>>
-<form method="post" name="skoli_exportform" id="skoli_exportform" action="<?php echo Horde::downloadUrl(_("class.csv"), null, Horde::applicationUrl('data.php')) ?>">
+<form method="post" name="skoli_exportform" id="skoli_exportform" action="<?php echo Horde::downloadUrl(_("class.csv"), null, Horde::url('data.php')) ?>">
<input type="hidden" name="actionID" value="export" />
<h1 class="header">
<?php
if ($class['_edit']) {
$label = _("New Entry");
- echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('add.php'), 'class', $class['_id']), $label) . Horde::img('add.png', $label) . '</a>';
+ echo Horde::link(Horde_Util::addParameter(Horde::url('add.php'), 'class', $class['_id']), $label) . Horde::img('add.png', $label) . '</a>';
}
?>
</td>
<?php
if ($class['_edit']) {
$label = sprintf(_("Edit \"%s\""), $class['name']);
- echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('classes/edit.php'), 'c', $class['_id']), $label) . Horde::img('edit.png', $label) . '</a>';
+ echo Horde::link(Horde_Util::addParameter(Horde::url('classes/edit.php'), 'c', $class['_id']), $label) . Horde::img('edit.png', $label) . '</a>';
}
?>
</td>
'class' => $class['_id'],
'student' => 'all'
);
- echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), $params), $label) . htmlspecialchars($class['name']) . '</a>';
+ echo Horde::link(Horde_Util::addParameter(Horde::url('search.php'), $params), $label) . htmlspecialchars($class['name']) . '</a>';
?>
</td>
<?php if (in_array('lastentry', $student_columns)): ?>
<div class="header leftAlign">
<?php echo htmlspecialchars($title) ?>
- <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search")) ?></a>
+ <a id="quicksearchL" href="<?php echo Horde::url('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search")) ?></a>
<div id="quicksearch" style="display:none">
<input type="text" name="quicksearchT" id="quicksearchT" for="classes-body" empty="classes_empty" />
<small>
</th>
<?php if (in_array('semesterstart', $class_columns)): ?>
<th id="s<?php echo SKOLI_SORT_SEMESTERSTART ?>"<?php if ($sortby_class == SKOLI_SORT_SEMESTERSTART) echo ' class="' . $sortdirclass_class . '"' ?> width="2%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_SEMESTERSTART)), _("Sort by Semester Start Date"), 'sortlink', '', '', _("Semester Start")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_SEMESTERSTART)), _("Sort by Semester Start Date"), 'sortlink', '', '', _("Semester Start")) ?>
</th>
<?php endif; if (in_array('semesterend', $class_columns)): ?>
<th id="s<?php echo SKOLI_SORT_SEMESTEREND ?>"<?php if ($sortby_class == SKOLI_SORT_SEMESTEREND) echo ' class="' . $sortdirclass_class . '"' ?> width="2%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_SEMESTEREND)), _("Sort by Semester End Date"), 'sortlink', '', '', _("Semester End")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_SEMESTEREND)), _("Sort by Semester End Date"), 'sortlink', '', '', _("Semester End")) ?>
</th>
<?php endif; ?>
<th id="s<?php echo SKOLI_SORT_NAME ?>"<?php if ($sortby_class == SKOLI_SORT_NAME) echo ' class="' . $sortdirclass_class . '"' ?>>
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_NAME)), _("Sort by Name"), 'sortlink', '', '', _("Name")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_NAME)), _("Sort by Name"), 'sortlink', '', '', _("Name")) ?>
</th>
<?php if (in_array('lastentry', $student_columns)): ?>
<th id="s<?php echo SKOLI_SORT_LASTENTRY ?>"<?php if ($sortby_student == SKOLI_SORT_LASTENTRY) echo ' class="' . $sortdirclass_student . '"' ?> width="2%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_student', SKOLI_SORT_LASTENTRY)), _("Sort by Last Entry"), 'sortlink', '', '', _("Last Entry")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby_student', SKOLI_SORT_LASTENTRY)), _("Sort by Last Entry"), 'sortlink', '', '', _("Last Entry")) ?>
</th>
<?php endif; if (in_array('summarks', $student_columns)): ?>
<th id="s<?php echo SKOLI_SORT_SUMMARKS ?>"<?php if ($sortby_student == SKOLI_SORT_SUMMARKS) echo ' class="' . $sortdirclass_student . '"' ?> width="2%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_student', SKOLI_SORT_SUMMARKS)), _("Sort by Mark"), 'sortlink', '', '', _("Mark average")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby_student', SKOLI_SORT_SUMMARKS)), _("Sort by Mark"), 'sortlink', '', '', _("Mark average")) ?>
</th>
<?php endif; if (in_array('sumabsences', $student_columns)): ?>
<th id="s<?php echo SKOLI_SORT_SUMABSENCES ?>"<?php if ($sortby_student == SKOLI_SORT_SUMABSENCES) echo ' class="' . $sortdirclass_student . '"' ?> width="2%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_student', SKOLI_SORT_SUMABSENCES)), _("Sort by Absences"), 'sortlink', '', '', _("Absences")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby_student', SKOLI_SORT_SUMABSENCES)), _("Sort by Absences"), 'sortlink', '', '', _("Absences")) ?>
</th>
<?php endif; if (in_array('grade', $class_columns)): ?>
<th id="s<?php echo SKOLI_SORT_GRADE ?>"<?php if ($sortby_class == SKOLI_SORT_GRADE) echo ' class="' . $sortdirclass_class . '"' ?> width="2%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_GRADE)), _("Sort by Grade"), 'sortlink', '', '', _("Grade")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_GRADE)), _("Sort by Grade"), 'sortlink', '', '', _("Grade")) ?>
</th>
<?php endif; if (in_array('semester', $class_columns)): ?>
<th id="s<?php echo SKOLI_SORT_SEMESTER ?>"<?php if ($sortby_class == SKOLI_SORT_SEMESTER) echo ' class="' . $sortdirclass_class . '"' ?> width="2%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_SEMESTER)), _("Sort by Semester"), 'sortlink', '', '', _("Semester")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_SEMESTER)), _("Sort by Semester"), 'sortlink', '', '', _("Semester")) ?>
</th>
<?php endif; if (in_array('location', $class_columns)): ?>
<th id="s<?php echo SKOLI_SORT_LOCATION ?>"<?php if ($sortby_class == SKOLI_SORT_LOCATION) echo ' class="' . $sortdirclass_class . '"' ?> width="2%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_LOCATION)), _("Sort by Location"), 'sortlink', '', '', _("Location")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_LOCATION)), _("Sort by Location"), 'sortlink', '', '', _("Location")) ?>
</th>
<?php endif; if (in_array('category', $class_columns)): ?>
<th id="s<?php echo SKOLI_SORT_CATEGORY ?>"<?php if ($sortby_class == SKOLI_SORT_CATEGORY) echo ' class="' . $sortdirclass_class . '"' ?> width="10%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_CATEGORY)), _("Sort by Category"), 'sortlink', '', '', _("Category")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_CATEGORY)), _("Sort by Category"), 'sortlink', '', '', _("Category")) ?>
<?php
if ($GLOBALS['registry']->getAuth() && (!$GLOBALS['prefs']->isLocked('categories') ||
!$GLOBALS['prefs']->isLocked('category_colors'))) {
<?php
if ($class['_edit']) {
$label = _("New Entry");
- echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('add.php'), array('class'=>$class['_id'], 'student'=>$student['__key'])), $label) . Horde::img('add.png', $label) . '</a>';
+ echo Horde::link(Horde_Util::addParameter(Horde::url('add.php'), array('class'=>$class['_id'], 'student'=>$student['__key'])), $label) . Horde::img('add.png', $label) . '</a>';
}
?>
</td>
'class' => $class['_id'],
'student' => $student['__key']
);
- echo $treeIcon . ' ' . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), $params), $label) . htmlspecialchars($student[$conf['addresses']['name_field']]) . '</a>';
+ echo $treeIcon . ' ' . Horde::link(Horde_Util::addParameter(Horde::url('search.php'), $params), $label) . htmlspecialchars($student[$conf['addresses']['name_field']]) . '</a>';
?>
</td>
<?php if (in_array('lastentry', $student_columns)): ?>
<?php if ($GLOBALS['registry']->getAuth()): ?>
<p>
- <a href="<?php echo Horde::applicationUrl('classes/') ?>"><?php echo _("[Manage Classes]") ?></a>
+ <a href="<?php echo Horde::url('classes/') ?>"><?php echo _("[Manage Classes]") ?></a>
</p>
<?php endif; ?>
'view' => 'EditEntry',
'entry' => $entry['_id']
);
- echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('entry.php'), $params), $label) . Horde::img('edit.png', $label) . '</a>';
+ echo Horde::link(Horde_Util::addParameter(Horde::url('entry.php'), $params), $label) . Horde::img('edit.png', $label) . '</a>';
}
?>
</td>
'view' => 'Entry',
'entry' => $entry['_id']
);
- echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('entry.php'), $params), _("View Entry")) . htmlspecialchars($entry['student']) . '</a> ';
+ echo Horde::link(Horde_Util::addParameter(Horde::url('entry.php'), $params), _("View Entry")) . htmlspecialchars($entry['student']) . '</a> ';
?>
</td>
<td><?php echo htmlspecialchars($entry['date']) ?> </td>
<br />
<div class="header leftAlign">
<?php echo htmlspecialchars(_("Search Result")) ?>
- <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search")) ?></a>
+ <a id="quicksearchL" href="<?php echo Horde::url('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search")) ?></a>
<div id="quicksearch" style="display:none">
<input type="text" name="quicksearchT" id="quicksearchT" for="entries-body" empty="entries_empty" />
<small>
<?php echo Horde::img('edit.png', _("Edit Class")) ?>
</th>
<th id="s<?php echo SKOLI_SORT_CLASS ?>"<?php if ($sortby == SKOLI_SORT_CLASS) echo ' class="' . $sortdir_class . '"' ?> width="2%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', SKOLI_SORT_CLASS)), _("Sort by Class"), 'sortlink', '', '', _("Class")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby', SKOLI_SORT_CLASS)), _("Sort by Class"), 'sortlink', '', '', _("Class")) ?>
</th>
<th id="s<?php echo SKOLI_SORT_STUDENT ?>"<?php if ($sortby == SKOLI_SORT_STUDENT) echo ' class="' . $sortdir_class . '"' ?> width="2%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', SKOLI_SORT_STUDENT)), _("Sort by Student Name"), 'sortlink', '', '', _("Student")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby', SKOLI_SORT_STUDENT)), _("Sort by Student Name"), 'sortlink', '', '', _("Student")) ?>
</th>
<th id="s<?php echo SKOLI_SORT_DATE ?>"<?php if ($sortby == SKOLI_SORT_DATE) echo ' class="' . $sortdir_class . '"' ?> width="2%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', SKOLI_SORT_DATE)), _("Sort by Date"), 'sortlink', '', '', _("Date")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby', SKOLI_SORT_DATE)), _("Sort by Date"), 'sortlink', '', '', _("Date")) ?>
</th>
<th id="s<?php echo SKOLI_SORT_TYPE ?>"<?php if ($sortby == SKOLI_SORT_TYPE) echo ' class="' . $sortdir_class . '"' ?> width="2%">
- <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', SKOLI_SORT_TYPE)), _("Sort by Type"), 'sortlink', '', '', _("Type")) ?>
+ <?php echo Horde::widget(Horde::url(Horde_Util::addParameter($baseurl, 'sortby', SKOLI_SORT_TYPE)), _("Sort by Type"), 'sortlink', '', '', _("Type")) ?>
</th>
<th class="nosort">
<?php echo _("Entry") ?>
$message = Horde::callHook('_perms_hook_denied', array('trean:max_bookmarks'), 'horde', $message);
}
$notification->push($message, 'horde.error', array('content.raw'));
- Horde::applicationUrl('browse.php', true)->redirect();
+ Horde::url('browse.php', true)->redirect();
}
$folderId = Horde_Util::getFormData('f');
require TREAN_TEMPLATES . '/common-header.inc';
$notification->notify();
} else {
- Horde::applicationUrl('browse.php', true)
+ Horde::url('browse.php', true)
->add('f', $folderId)
->redirect();
}
$message = Horde::callHook('_perms_hook_denied', array('trean:max_folders'), 'horde', $message);
}
$notification->push($message, 'horde.error', array('content.raw'));
- Horde::applicationUrl('browse.php', true)
+ Horde::url('browse.php', true)
->add('f', $parent_id)
->redirect();
}
if (is_a($result, 'PEAR_Error')) {
$notification->push(sprintf(_("There was an error adding the folder: %s"), $result->getMessage()), 'horde.error');
} else {
- Horde::applicationUrl('browse.php', true)
+ Horde::url('browse.php', true)
->add('f', $result)
->redirect();
}
if (!is_null($url = Horde_Util::getFormData('nu'))) {
header('Location: ' . $url);
} else {
- Horde::applicationUrl('browse.php', true)
+ Horde::url('browse.php', true)
->add('f', $bookmark->folder)
->redirect();
}
/* Make sure user has permission to view this folder. */
if (!$folder->hasPermission($registry->getAuth(), Horde_Perms::READ)) {
$notification->push(_("You do not have permission to view this folder."), 'horde.error');
- Horde::applicationUrl('browse.php', true)->redirect();
+ Horde::url('browse.php', true)->redirect();
}
}
$notification->push(sprintf(_("%d Folders and %d Bookmarks imported."), $folders, $bookmarks), 'horde.success');
- Horde::applicationUrl('browse.php', true)
+ Horde::url('browse.php', true)
->add('f', $root->getId())
->redirect();
if ($actionID == 'button') {
if (Horde_Util::getFormData('new_bookmark') ||
!is_null(Horde_Util::getFormData('new_bookmark_x'))) {
- Horde::applicationUrl('add.php', true)->add('f', $folderId)->redirect();
+ Horde::url('add.php', true)->add('f', $folderId)->redirect();
}
if (Horde_Util::getFormData('edit_bookmarks')) {
$actionID = null;
$notification->notify();
}
} else {
- Horde::applicationUrl('browse.php', true)
+ Horde::url('browse.php', true)
->add('f', $folderId)
->redirect();
}
}
// Return to the folder listing
- Horde::applicationUrl('browse.php', true)->add('f', $folderId)->redirect();
+ Horde::url('browse.php', true)->add('f', $folderId)->redirect();
case 'move':
$create_folder = Horde_Util::getFormData('create_folder');
}
// Return to the folder listing
- Horde::applicationUrl('browse.php', true)->add('f', $folderId)->redirect();
+ Horde::url('browse.php', true)->add('f', $folderId)->redirect();
case 'copy':
$create_folder = Horde_Util::getFormData('create_folder');
}
// Return to the folder listing
- Horde::applicationUrl('browse.php', true)->add('f', $folderId)->redirect();
+ Horde::url('browse.php', true)->add('f', $folderId)->redirect();
case 'rename':
/* Rename a Bookmark Folder. */
if (is_a($result, 'PEAR_Error')) {
$notification->push(sprintf(_("\"%s\" was not renamed: %s."), $name, $result->getMessage()), 'horde.error');
} else {
- Horde::applicationUrl('browse.php', true)->add('f', $folderId)->redirect();
+ Horde::url('browse.php', true)->add('f', $folderId)->redirect();
}
break;
$folder = &$trean_shares->getFolder($folderId);
if (is_a($folder, 'PEAR_Error')) {
$notification->push($folder->getMessage(), 'horde.error');
- Horde::applicationUrl('browse.php')->redirect();
+ Horde::url('browse.php')->redirect();
}
$parent = $folder->getParent();
} else {
$notification->push(sprintf(_("Deleted the folder \"%s\""), $folder->get('name')), 'horde.success');
}
- Horde::applicationUrl('browse.php', true)->add('f', $folderId)->redirect();
+ Horde::url('browse.php', true)->add('f', $folderId)->redirect();
exit;
case 'cancel':
- Horde::applicationUrl('browse.php', true)->add('f', $folderId)->redirect();
+ Horde::url('browse.php', true)->add('f', $folderId)->redirect();
}
// Return to browse if there is nothing to edit.
if (!count($bookmarks) && !count($folder)) {
$notification->push(_("Nothing to edit."), 'horde.message');
- Horde::applicationUrl('browse.php', true)->add('f', $folderId)->redirect();
+ Horde::url('browse.php', true)->add('f', $folderId)->redirect();
}
$title = _("Edit Bookmark");
$browser = $GLOBALS['injector']->getInstance('Horde_Browser');
if ($browser->hasFeature('javascript')) {
if ($browser->hasFeature('dom')) {
- $addurl = Horde_Util::addParameter(Horde::applicationUrl('add.php', true, -1), 'iframe', 1);
+ $addurl = Horde_Util::addParameter(Horde::url('add.php', true, -1), 'iframe', 1);
$url = "javascript:(function(){o=document.createElement('div');o.id='overlay';o.style.background='#000';o.style.position='absolute';o.style.top=0;o.style.left=0;o.style.width='100%';o.style.height='100%';o.style.zIndex=5000;o.style.opacity=.8;document.body.appendChild(o);i=document.createElement('iframe');i.id='frame';i.style.zIndex=5001;i.style.border='thin solid #000';i.src='$addurl'+'&title=' + encodeURIComponent(document.title) + '&url=' + encodeURIComponent(location.href);i.style.position='absolute';i.style.width='350px';i.style.height='150px';i.style.left='100px';i.style.top='100px';document.body.appendChild(i);l=document.createElement('a');l.style.position='absolute';l.style.background='#ccc';l.style.color='#000';l.style.border='thin solid #000';l.style.display='block';l.style.top='250px';l.style.left='100px';l.style.zIndex=5001;l.style.padding='5px';l.appendChild(document.createTextNode('" . _("Close") . "'));l.onclick=function(){var o=document.getElementById('overlay');o.parentNode.removeChild(o);var i=document.getElementById('frame');i.parentNode.removeChild(i);this.parentNode.removeChild(this);};document.body.appendChild(l);})()";
} else {
- $addurl = Horde::applicationUrl(Horde_Util::addParameter('add.php', 'popup', 1), true, -1);
+ $addurl = Horde::url(Horde_Util::addParameter('add.php', 'popup', 1), true, -1);
$url = "javascript:d = new Date(); w = window.open('$addurl' + '&title=' + encodeURIComponent(document.title) + '&url=' + encodeURIComponent(location.href) + '&d=' + d.getTime(), d.getTime(), 'height=200,width=400'); w.focus();";
}
} else {
// Fallback to a regular URL
- $url = Horde::applicationUrl(Horde_Util::addParameter('add.php', $params), true);
+ $url = Horde::url(Horde_Util::addParameter('add.php', $params), true);
}
return $url;
false,
array(
'icon' => Horde_Themes::img('add.png'),
- 'url' => Horde::applicationUrl('add.php')
+ 'url' => Horde::url('add.php')
)
);
false,
array(
'icon' => Horde_Themes::img('search.png'),
- 'url' => Horde::applicationUrl('search.php')
+ 'url' => Horde::url('search.php')
)
);
$folders = Trean::listFolders();
if (!($folders instanceof PEAR_Error)) {
- $browse = Horde::applicationUrl('browse.php');
+ $browse = Horde::url('browse.php');
foreach ($folders as $folder) {
$parent_id = $folder->getParent();
global $conf, $registry;
$menu = new Horde_Menu();
- $menu->add(Horde::applicationUrl('browse.php'), _("_Browse"), 'trean.png', null, null, null, basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
- $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png');
- $menu->add(Horde::applicationUrl('reports.php'), _("_Reports"), 'reports.png');
+ $menu->add(Horde::url('browse.php'), _("_Browse"), 'trean.png', null, null, null, basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
+ $menu->add(Horde::url('search.php'), _("_Search"), 'search.png');
+ $menu->add(Horde::url('reports.php'), _("_Reports"), 'reports.png');
/* Import/Export. */
if ($conf['menu']['import_export']) {
- $menu->add(Horde::applicationUrl('data.php'), _("_Import/Export"), 'data.png');
+ $menu->add(Horde::url('data.php'), _("_Import/Export"), 'data.png');
}
if ($returnType == 'object') {
$vfs = $GLOBALS['injector']->getInstance('Horde_Vfs');
if ($bookmark->favicon
&& $vfs->exists('.horde/trean/favicons/', $bookmark->favicon)) {
- return Horde_Util::addParameter(Horde::applicationUrl('favicon.php'),
+ return Horde_Util::addParameter(Horde::url('favicon.php'),
'bookmark_id', $bookmark->id);
}
} catch (Exception $e) {
$this->bookmarks = $bookmarks;
}
$this->target = $GLOBALS['prefs']->getValue('show_in_new_window') ? '_blank' : '';
- $this->redirectUrl = Horde::applicationUrl('redirect.php');
+ $this->redirectUrl = Horde::url('redirect.php');
$this->sortby = $GLOBALS['prefs']->getValue('sortby');
$this->sortdir = $GLOBALS['prefs']->getValue('sortdir');
function folder($bookmark)
{
$folder = $GLOBALS['trean_shares']->getFolder($bookmark->folder);
- return Horde::link(Horde_Util::addParameter(Horde::applicationUrl('browse.php'), 'f', $bookmark->folder)) . htmlspecialchars($folder->get('name')) . '</a>';
+ return Horde::link(Horde_Util::addParameter(Horde::url('browse.php'), 'f', $bookmark->folder)) . htmlspecialchars($folder->get('name')) . '</a>';
}
function render()
<?php printf(_("On newer versions of Internet Explorer, you may have to add %s://%s to your Trusted Zone for this to work."), !empty($_SERVER['HTTPS']) ? 'https' : 'http', $conf['server']['name']) ?>
</p>
<?php
-$addurl = Horde::applicationUrl(Horde_Util::addParameter('add.php', 'popup', 1), true, -1);
+$addurl = Horde::url(Horde_Util::addParameter('add.php', 'popup', 1), true, -1);
$url = "javascript:d = new Date(); w = window.open('$addurl' + '&title=' + encodeURIComponent(document.title) + '&url=' + encodeURIComponent(location.href) + '&d=' + d.getTime(), d.getTime(), 'height=200,width=400'); w.focus();";
echo '<p><a href="' . $url . '">' . Horde::img('add.png') . _("Add to Bookmarks") . '</a></p>';
?>
<?php
-$bookmark_url = Horde_Util::addParameter(Horde::applicationUrl('redirect.php'), 'b', $bookmark->id);
+$bookmark_url = Horde_Util::addParameter(Horde::url('redirect.php'), 'b', $bookmark->id);
$target = $GLOBALS['prefs']->getValue('show_in_new_window') ? '_blank' : '';
if ($bookmark->http_status == 'error') {
$status = 'error.png';
<?php
-$bookmark_url = Horde_Util::addParameter(Horde::applicationUrl('redirect.php'), 'b', $bookmark->id);
+$bookmark_url = Horde_Util::addParameter(Horde::url('redirect.php'), 'b', $bookmark->id);
$target = $GLOBALS['prefs']->getValue('show_in_new_window') ? '_blank' : '';
if ($bookmark->http_status == 'error') {
$status = 'error.png';
<?php
$target = $GLOBALS['prefs']->getValue('show_in_new_window') ? '_blank' : '';
-$bookmark_url = Horde_Util::addParameter(Horde::applicationUrl('redirect.php'), 'b', $bookmark->id);
+$bookmark_url = Horde_Util::addParameter(Horde::url('redirect.php'), 'b', $bookmark->id);
if ($bookmark->http_status == 'error') {
$status = 'error.png';
} elseif ($bookmark->http_status == '') {
-<form name="browse" action="<?php echo Horde::applicationURL('add.php'); ?>" method="post">
+<form name="browse" action="<?php echo Horde::url('add.php'); ?>" method="post">
<?php Horde_Util::pformInput() ?>
<input type="hidden" name="actionID" value="" />
<input type="hidden" name="name" value="" />
<input type="hidden" name="f" value="<?php echo htmlspecialchars(Horde_Util::getFormData('f')) ?>" />
</form>
-<form name="edit" action="<?php echo Horde::applicationURL('edit.php'); ?>" method="post">
+<form name="edit" action="<?php echo Horde::url('edit.php'); ?>" method="post">
<?php Horde_Util::pformInput() ?>
<input type="hidden" name="actionID" value="" />
<input type="hidden" name="name" value="" />
<?php if ($GLOBALS['folder']->get('owner') == $GLOBALS['registry']->getAuth()): ?>
<p>
- <?php echo Horde::link(Horde::applicationUrl('perms.php?cid=' . $GLOBALS['folder']->getId()), _("Control access to this folder"), '', '_blank', 'popup(this.href); return false;')
+ <?php echo Horde::link(Horde::url('perms.php?cid=' . $GLOBALS['folder']->getId()), _("Control access to this folder"), '', '_blank', 'popup(this.href); return false;')
. Horde::img('perms.png') . _("Control access to this folder") . '</a>' ?>
</p>
<?php endif; ?>
$f_id = null;
}
$params['class'] = ($tf->getId() == $f_id) ? 'selected' : null;
- $params['url'] = Horde::applicationUrl('browse.php?f=' . $tf->getId());
+ $params['url'] = Horde::url('browse.php?f=' . $tf->getId());
$level = substr_count($tfn, ':');
if ($expand == 'first') {
Horde::outputMetaTags();
Horde::includeScriptFiles();
-$rss = Horde::applicationUrl('rss.php', true, -1);
+$rss = Horde::url('rss.php', true, -1);
if (Horde_Util::getFormData('f')) {
$rss = Horde_Util::addParameter($rss, 'f', Horde_Util::getFormData('f'), false);
}
*/
function star_rating_helper($bookmark)
{
- $edit = Horde::applicationUrl('bookmark.php?b=' . $bookmark->id, true);
+ $edit = Horde::url('bookmark.php?b=' . $bookmark->id, true);
return '
<ol class="star-rating" for="' . htmlspecialchars($edit) . '">
<li class="current-rating" style="width:' . (_STAR_WIDTH * $bookmark->rating) . 'px">' . str_repeat('*', $bookmark->rating) . '</li>
$notification->push(_("There are no writeable address books. None of the available address books are configured to allow you to add new entries to them. If you believe this is an error, please contact your system administrator."), 'horde.error');
$url = $url
? Horde::url($url, true)
- : Horde::applicationUrl('index.php', true);
+ : Horde::url('index.php', true);
$url->redirect();
}
$notification->push($message, 'horde.error', array('content.raw'));
$url = $url
? Horde::url($url, true)
- : Horde::applicationUrl('index.php', true);
+ : Horde::url('index.php', true);
$url->redirect();
}
$title = _("New Contact");
require TURBA_TEMPLATES . '/common-header.inc';
require TURBA_TEMPLATES . '/menu.inc';
-$form->renderActive(new Horde_Form_Renderer(), $vars, Horde::applicationUrl('add.php'), 'post');
+$form->renderActive(new Horde_Form_Renderer(), $vars, Horde::url('add.php'), 'post');
require $registry->get('templates', 'horde') . '/common-footer.inc';
$notification->push(sprintf(_("The address book \"%s\" has been created."), $vars->get('name')), 'horde.success');
}
- Horde::applicationUrl('addressbooks/', true)->redirect();
+ Horde::url('addressbooks/', true)->redirect();
}
$title = $form->getTitle();
require TURBA_TEMPLATES . '/common-header.inc';
require TURBA_TEMPLATES . '/menu.inc';
-echo $form->renderActive($form->getRenderer(), $vars, Horde::applicationUrl('addressbooks/create.php'), 'post');
+echo $form->renderActive($form->getRenderer(), $vars, Horde::url('addressbooks/create.php'), 'post');
require $registry->get('templates', 'horde') . '/common-footer.inc';
$addressbook_id = $vars->get('a');
if ($addressbook_id == $GLOBALS['registry']->getAuth()) {
$notification->push(_("This address book cannot be deleted"), 'horde.warning');
- Horde::applicationUrl('addressbooks/', true)->redirect();
+ Horde::url('addressbooks/', true)->redirect();
}
try {
$addressbook = $turba_shares->getShare($addressbook_id);
} catch (Horde_Share_Exception $e) {
$notification->push($e, 'horde.error');
- Horde::applicationUrl('addressbooks/', true)->redirect();
+ Horde::url('addressbooks/', true)->redirect();
}
if (!$GLOBALS['registry']->getAuth() ||
$addressbook->get('owner') != $GLOBALS['registry']->getAuth()) {
$notification->push(_("You are not allowed to delete this addressbook."), 'horde.error');
- Horde::applicationUrl('addressbooks/', true)->redirect();
+ Horde::url('addressbooks/', true)->redirect();
}
$form = new Turba_Form_DeleteAddressBook($vars, $addressbook);
$notification->push(sprintf(_("The addressbook \"%s\" has been deleted."), $addressbook->get('name')), 'horde.success');
}
- Horde::applicationUrl('addressbooks/', true)->redirect();
+ Horde::url('addressbooks/', true)->redirect();
}
$title = $form->getTitle();
require TURBA_TEMPLATES . '/common-header.inc';
require TURBA_TEMPLATES . '/menu.inc';
-echo $form->renderActive($form->getRenderer(), $vars, Horde::applicationUrl('addressbooks/delete.php'), 'post');
+echo $form->renderActive($form->getRenderer(), $vars, Horde::url('addressbooks/delete.php'), 'post');
require $registry->get('templates', 'horde') . '/common-footer.inc';
$addressbook = $turba_shares->getShare($vars->get('a'));
} catch (Horde_Share_Exception $e) {
$notification->push($e->getMessage(), 'horde.error');
- Horde::applicationUrl('addressbooks/', true)->redirect();
+ Horde::url('addressbooks/', true)->redirect();
}
if (!$GLOBALS['registry']->getAuth() ||
$addressbook->get('owner') != $GLOBALS['registry']->getAuth()) {
$notification->push(_("You are not allowed to change this addressbook."), 'horde.error');
- Horde::applicationUrl('addressbooks/', true)->redirect();
+ Horde::url('addressbooks/', true)->redirect();
}
$form = new Turba_Form_EditAddressBook($vars, $addressbook);
}
}
- Horde::applicationUrl('addressbooks/', true)->redirect();
+ Horde::url('addressbooks/', true)->redirect();
}
$vars->set('name', $addressbook->get('name'));
$title = $form->getTitle();
require TURBA_TEMPLATES . '/common-header.inc';
require TURBA_TEMPLATES . '/menu.inc';
-echo $form->renderActive($form->getRenderer(), $vars, Horde::applicationUrl('edit.php'), 'post');
+echo $form->renderActive($form->getRenderer(), $vars, Horde::url('edit.php'), 'post');
require $registry->get('templates', 'horde') . '/common-footer.inc';
exit;
}
-$browse_url_base = Horde::applicationUrl($browse_source_count ? basename($prefs->getValue('initial_page')) : 'search.php');
-$edit_url_base = Horde::applicationUrl('addressbooks/edit.php');
+$browse_url_base = Horde::url($browse_source_count ? basename($prefs->getValue('initial_page')) : 'search.php');
+$edit_url_base = Horde::url('addressbooks/edit.php');
$perms_url_base = Horde::url($registry->get('webroot', 'horde') . '/services/shares/edit.php?app=turba', true);
-$delete_url_base = Horde::applicationUrl('addressbooks/delete.php');
+$delete_url_base = Horde::url('addressbooks/delete.php');
// Get the shares owned by the current user, and figure out what we will
// display the share name as to the user.
$source = $vars->get('source');
if (!isset($GLOBALS['cfgSources'][$source])) {
$notification->push(_("The contact you requested does not exist."));
- Horde::applicationUrl($prefs->getValue('initial_page'), true)->redirect();
+ Horde::url($prefs->getValue('initial_page'), true)->redirect();
}
/* Set the contact from the key requested. */
$driver = $injector->getInstance('Turba_Driver')->getDriver($source);
} catch (Turba_Exception $e) {
$notification->push($e, 'horde.error');
- Horde::applicationUrl($prefs->getValue('initial_page'), true)->redirect();
+ Horde::url($prefs->getValue('initial_page'), true)->redirect();
}
$contact = null;
$contact = $driver->getObject($vars->get('key'));
} catch (Turba_Exception $e) {
$notification->push($e, 'horde.error');
- Horde::applicationUrl($prefs->getValue('initial_page'), true)->redirect();
+ Horde::url($prefs->getValue('initial_page'), true)->redirect();
}
}
$object->deleteFiles();
} catch (Turba_Exception $e) {
$notification->push($e, 'horde.error');
- Horde::applicationUrl($prefs->getValue('initial_page'), true)->redirect();
+ Horde::url($prefs->getValue('initial_page'), true)->redirect();
}
}
$driver->delete($key);
$url = ($url = Horde_Util::getFormData('url'))
? new Horde_Url($url)
- : Horde::applicationUrl($prefs->getValue('initial_page'), true);
+ : Horde::url($prefs->getValue('initial_page'), true);
$url->redirect();
} catch (Turba_Exception $e) {
$notification->push(sprintf(_("There was an error deleting this contact: %s"), $e->getMessage()), 'horde.error');
$source = Horde_Util::getPost('source');
if ($source === null || !isset($cfgSources[$source])) {
$notification->push(_("Not found"), 'horde.error');
- Horde::applicationUrl($prefs->getValue('initial_page'), true)->redirect();
+ Horde::url($prefs->getValue('initial_page'), true)->redirect();
}
$driver = $injector->getInstance('Turba_Driver')->getDriver($source);
$contact = $driver->getObject(Horde_Util::getPost('key'));
} catch (Turba_Exception $e) {
$notification->push($e, 'horde.error');
- Horde::applicationUrl($prefs->getValue('initial_page'), true)->redirect();
+ Horde::url($prefs->getValue('initial_page'), true)->redirect();
}
if (!$contact->isEditable()) {
$notification->push(_("Permission denied"), 'horde.error');
- Horde::applicationUrl($prefs->getValue('initial_page'), true)->redirect();
+ Horde::url($prefs->getValue('initial_page'), true)->redirect();
}
$file = Horde_Util::getPost('file');
$key = $vars->get('key');
$groupedit = $vars->get('actionID') == 'groupedit';
$objectkeys = $vars->get('objectkeys');
-$url = new Horde_Url(Horde_Util::getFormData('url', Horde::applicationUrl($prefs->getValue('initial_page'), true)));
+$url = new Horde_Url(Horde_Util::getFormData('url', Horde::url($prefs->getValue('initial_page'), true)));
/* Edit the first of a list of contacts? */
if ($groupedit && (!$key || $key == '**search')) {
require TURBA_TEMPLATES . '/common-header.inc';
require TURBA_TEMPLATES . '/menu.inc';
$form->setTitle($title);
-$form->renderActive(new Horde_Form_Renderer(), $vars, Horde::applicationUrl('edit.php'), 'post');
+$form->renderActive(new Horde_Form_Renderer(), $vars, Horde::url('edit.php'), 'post');
require $registry->get('templates', 'horde') . '/common-footer.inc';
public function sidebarCreate(Horde_Tree_Base $tree, $parent = null,
array $params = array())
{
- $add = Horde::applicationUrl('add.php');
- $browse = Horde::applicationUrl('browse.php');
+ $add = Horde::url('add.php');
+ $browse = Horde::url('browse.php');
if ($GLOBALS['addSources']) {
$newimg = Horde_Themes::img('menu/new.png');
false,
array(
'icon' => Horde_Themes::img('search.png'),
- 'url' => Horde::applicationUrl('search.php')
+ 'url' => Horde::url('search.php')
)
);
}
'recurrence' => array('type' => Horde_Date_Recurrence::RECUR_YEARLY_DATE,
'interval' => 1),
'params' => array('source' => $this->_name, 'key' => $key),
- 'link' => Horde::applicationUrl('contact.php', true)->add(array('source' => $this->_name, 'key' => $key))->setRaw(true));
+ 'link' => Horde::url('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)->add(array(
+ $next_page = Horde::url('edit.php', true)->add(array(
'source' => $info['source'],
'original_source' => $info['original_source'],
'objectkeys' => $info['objectkeys'],
*/
function url($view = null, $full = false)
{
- $url = Horde::applicationUrl('contact.php', $full)->add(array(
+ $url = Horde::url('contact.php', $full)->add(array(
'source' => $this->driver->getName(),
'key' => $this->getValue('__key')
));
// Let's see if we can view this one, too.
if ($viewer && !($viewer instanceof Horde_Mime_Viewer_Default)) {
- $url = Horde::applicationUrl('view.php')->add('actionID', 'view_file');
+ $url = Horde::url('view.php')->add('actionID', 'view_file');
$link = Horde::link($url, $file['name'], null, '_blank') . $file['name'] . '</a>';
} else {
$link = $file['name'];
function vfsEditUrl($file)
{
$delform = '<form action="' .
- Horde::applicationUrl('deletefile.php') .
+ Horde::url('deletefile.php') .
'" style="display:inline" method="post">' .
Horde_Util::formInput() .
'<input type="hidden" name="file" value="' . htmlspecialchars($file['name']) . '" />' .
*/
function url($view = null, $full = false)
{
- return Horde::applicationUrl('browse.php', $full)->add(array(
+ return Horde::url('browse.php', $full)->add(array(
'source' => $this->getSource(),
'key' => $this->getValue('__key')
));
$menu = new Horde_Menu();
if (!empty($_SESSION['turba']['has_share'])) {
- $menu->add(Horde::applicationUrl('addressbooks/index.php'), _("_My Address Books"), 'turba.png');
+ $menu->add(Horde::url('addressbooks/index.php'), _("_My Address Books"), 'turba.png');
}
if ($GLOBALS['browse_source_count']) {
- $menu->add(Horde::applicationUrl('browse.php'), _("_Browse"), 'menu/browse.png', null, null, null, (($GLOBALS['prefs']->getValue('initial_page') == 'browse.php' && basename($_SERVER['PHP_SELF']) == 'index.php' && basename(dirname($_SERVER['PHP_SELF'])) != 'addressbooks') || (basename($_SERVER['PHP_SELF']) == 'browse.php' && Horde_Util::getFormData('key') != '**search')) ? 'current' : '__noselection');
+ $menu->add(Horde::url('browse.php'), _("_Browse"), 'menu/browse.png', null, null, null, (($GLOBALS['prefs']->getValue('initial_page') == 'browse.php' && basename($_SERVER['PHP_SELF']) == 'index.php' && basename(dirname($_SERVER['PHP_SELF'])) != 'addressbooks') || (basename($_SERVER['PHP_SELF']) == 'browse.php' && Horde_Util::getFormData('key') != '**search')) ? 'current' : '__noselection');
}
if (count($GLOBALS['addSources'])) {
- $menu->add(Horde::applicationUrl('add.php'), _("_New Contact"), 'menu/new.png');
+ $menu->add(Horde::url('add.php'), _("_New Contact"), 'menu/new.png');
}
- $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'), null, null, (($GLOBALS['prefs']->getValue('initial_page') == 'search.php' && basename($_SERVER['PHP_SELF']) == 'index.php' && strpos($_SERVER['PHP_SELF'], 'addressbooks/index.php') === false) || (basename($_SERVER['PHP_SELF']) == 'browse.php' && Horde_Util::getFormData('key') == '**search')) ? 'current' : null);
+ $menu->add(Horde::url('search.php'), _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'), null, null, (($GLOBALS['prefs']->getValue('initial_page') == 'search.php' && basename($_SERVER['PHP_SELF']) == 'index.php' && strpos($_SERVER['PHP_SELF'], 'addressbooks/index.php') === false) || (basename($_SERVER['PHP_SELF']) == 'browse.php' && Horde_Util::getFormData('key') == '**search')) ? 'current' : null);
/* Import/Export */
if ($GLOBALS['conf']['menu']['import_export']) {
- $menu->add(Horde::applicationUrl('data.php'), _("_Import/Export"), 'data.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde::url('data.php'), _("_Import/Export"), 'data.png', Horde_Themes::img(null, 'horde'));
}
return $menu;
// We might get here from the search page but are not allowed to browse
// the current address book.
if ($actionID && empty($cfgSources[$source]['browse'])) {
- Horde::applicationUrl($prefs->getValue('initial_page'), true)
+ Horde::url($prefs->getValue('initial_page'), true)
->redirect();
}
}
echo '<div id="DeleteContact"' . ($active ? '' : ' style="display:none"') . '>';
?>
- <form action="<?php echo Horde::applicationUrl('delete.php') ?>" method="post">
+ <form action="<?php echo Horde::url('delete.php') ?>" method="post">
<?php echo Horde_Util::formInput() ?>
<input type="hidden" name="url" value="<?php echo htmlspecialchars(Horde_Util::getFormData('url')) ?>" />
<input type="hidden" name="source" value="<?php echo htmlspecialchars($this->contact->driver->getName()) ?>" />
$view->value = $this->_duplicate;
echo $view->render('header');
- $view->contactUrl = Horde::applicationUrl('contact.php');
- $view->mergeUrl = Horde::applicationUrl('merge.php');
+ $view->contactUrl = Horde::url('contact.php');
+ $view->mergeUrl = Horde::url('merge.php');
$view->first = true;
$duplicate = $this->_duplicates[$this->_type][$this->_duplicate];
while ($contact = $duplicate->next()) {
$view->duplicates = $this->_duplicates;
$view->hasDuplicate = (bool)$hasDuplicate;
$view->attributes = $GLOBALS['attributes'];
- $view->link = Horde::applicationUrl('search.php')
+ $view->link = Horde::url('search.php')
->add(array('source' => $this->_driver->getName(),
'search_mode' => 'duplicate'));
echo '<div id="EditContact"' . ($active ? '' : ' style="display:none"') . '>';
$form = &new Turba_Form_EditContact($vars, $this->contact);
- $form->renderActive(new Horde_Form_Renderer, $vars, Horde::applicationUrl('edit.php'), 'post');
+ $form->renderActive(new Horde_Form_Renderer, $vars, Horde::url('edit.php'), 'post');
echo '</div>';
if ($active && $GLOBALS['browser']->hasFeature('dom')) {
list($addToList, $addToListSources) = $this->getAddSources();
- $viewurl = Horde::applicationUrl('browse.php')->add(array(
+ $viewurl = Horde::url('browse.php')->add(array(
'key' => Horde_Util::getFormData('key'),
'url' => Horde::selfUrl(true, false, true)
));
'val' => Horde_Util::getFormData('val'),
'source' => Horde_Util::getFormData('source', $default_source)
));
- $viewurl = Horde::applicationUrl('search.php')->add($params);
+ $viewurl = Horde::url('search.php')->add($params);
$vars = Horde_Variables::getDefaultVariables();
$pager = new Horde_Core_Ui_Pager('page', $vars,
$mail_link = 'mailto:' . urlencode($contact['email']);
}
- echo Horde::link(Horde::applicationUrl($contact['url']),
+ echo Horde::link(Horde::url($contact['url']),
_("View Contact"), '', '_parent')
. Horde::img('contact.png', _("View Contact")) . '</a> '
. '<a href="' . $mail_link . '">'
$vname = Horde_Util::getFormData('vbook_name');
if (empty($vname)) {
$notification->push(_("You must provide a name for virtual address books."), 'horde.error');
- Horde::applicationUrl('search.php', true)->redirect();
+ Horde::url('search.php', true)->redirect();
}
/* Create the vbook. */
$vid = $share->getName();
} catch (Horde_Share_Exception $e) {
$notification->push(sprintf(_("There was a problem creating the virtual address book: %s"), $e->getMessage()), 'horde.error');
- Horde::applicationUrl('search.php', true)->redirect();
+ Horde::url('search.php', true)->redirect();
}
$notification->push(sprintf(_("Successfully created virtual address book \"%s\""), $vname), 'horde.success');
- Horde::applicationUrl('browse.php', true)
+ Horde::url('browse.php', true)
->add('source', $vid)
->redirect();
}
}
/* Build search mode tabs. */
-$sUrl = Horde::applicationUrl('search.php');
+$sUrl = Horde::url('search.php');
$vars = Horde_Variables::getDefaultVariables();
$tabs = new Horde_Core_Ui_Tabs('search_mode', $vars);
$tabs->addTab(_("Basic Search"), $sUrl, 'basic');
</h1>
<div id="addressbook-list-buttons">
-<form method="post" action="<?php echo Horde::applicationUrl('addressbooks/create.php') ?>">
+<form method="post" action="<?php echo Horde::url('addressbooks/create.php') ?>">
<?php echo Horde_Util::formInput() ?>
<input type="submit" class="button" value="<?php echo _("Create a new Address Book") ?>" />
</form>
}
</script>
-<form name="turba_minisearch" action="<?php echo Horde::applicationUrl('minisearch.php') ?>" onsubmit="mini_search();" target="turba_minisearch_iframe">
+<form name="turba_minisearch" action="<?php echo Horde::url('minisearch.php') ?>" onsubmit="mini_search();" target="turba_minisearch_iframe">
<?php Horde_Util::pformInput() ?>
<?php echo Horde::label('search', _("Search for: ")) ?>
<input name="search" id="search" size="35" />
echo Horde::widget('#', $this->getType() == 'list' ? _("Remove from this list") : _("Delete"), 'widget', '', "Submit('delete'); return false;", $this->getType() == 'list' ? _("_Remove from this list") : _("_Delete")) . ' | ';
}
if ($hasEdit) {
- echo Horde::widget('#', _("Edit"), 'widget', '', "document.contacts.action='" . Horde::applicationUrl('edit.php') . "'; Submit('groupedit'); return false;", _("Edit")) . ' | ';
+ echo Horde::widget('#', _("Edit"), 'widget', '', "document.contacts.action='" . Horde::url('edit.php') . "'; Submit('groupedit'); return false;", _("Edit")) . ' | ';
}
?>
<?php if ($hasExport): ?>
- <?php echo Horde::widget('#', _("Export"), 'widget', '', "document.contacts.action='" . Horde::applicationUrl('data.php') . "'; Submit('select'); return false;", _("Export")) . ' | ' ?>
+ <?php echo Horde::widget('#', _("Export"), 'widget', '', "document.contacts.action='" . Horde::url('data.php') . "'; Submit('select'); return false;", _("Export")) . ' | ' ?>
<?php endif; ?>
<?php if (!empty($copymove_source_options)): $id = md5(mt_rand()); ?>
<form style="display:inline" name="f<?php echo $id ?>" action="javascript:void(0);" onsubmit="return false;">
<?php endif; ?>
<?php
-$browse_link = Horde::applicationUrl('browse.php');
+$browse_link = Horde::url('browse.php');
if ($this->getType() == 'directory' &&
!empty($cfgSources[$default_source]['map']['__type'])) {
printf(_("Show %s"), Horde::widget($browse_link->copy()->add('show', 'lists'), _("Show Lists"), 'widget', '', '', _("_Lists")) . ', ' .
-<form method="post" name="contacts" id="contacts" action="<?php echo Horde::applicationUrl('browse.php') ?>">
+<form method="post" name="contacts" id="contacts" action="<?php echo Horde::url('browse.php') ?>">
<input type="hidden" name="source" value="<?php echo htmlspecialchars($GLOBALS['default_source']) ?>" />
<?php echo Horde_Util::formInput() ?>
<table cellspacing="0" width="100%" class="linedRow">
<div class="header">
<?php echo htmlspecialchars($title) ?>
- <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search")) ?></a>
+ <a id="quicksearchL" href="<?php echo Horde::url('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search")) ?></a>
<div id="quicksearch" style="display:none">
<input type="text" name="quicksearchT" id="quicksearchT" for="QuickFinderContacts" empty="QuickFinderEmpty" />
<small>
<a title="<?php echo _("Close Search") ?>" href="#" onclick="$('quicksearch').hide(); $('quicksearchT').value = ''; QuickFinder.filter($('quicksearchT')); $('quicksearchL').show(); return false;">X</a>
- <?php echo Horde::link(Horde::applicationUrl('search.php')) . _("More Options...") ?></a>
+ <?php echo Horde::link(Horde::url('search.php')) . _("More Options...") ?></a>
</small>
</div>
</div>
$edit_url = $vcard_url = ' ';
if ($ob->hasValue('__key')) {
- $vcard_url = Horde::applicationUrl('vcard.php')->add(array(
+ $vcard_url = Horde::url('vcard.php')->add(array(
'source' => $ob->getSource(),
'key' => $ob->getValue('__key')
));
- $vcard_url = Horde::link(Horde::applicationUrl($vcard_url),
+ $vcard_url = Horde::link(Horde::url($vcard_url),
_("Download vCard"))
. Horde::img('mime/vcard.png', _("Download vCard"))
. '</a>';
$cell = Horde::link($ob->url()) . $link_text . '</a>';
if ($ob->hasPermission(Horde_Perms::EDIT)) {
- $edit_url = Horde::applicationUrl('contact.php')->add(array(
+ $edit_url = Horde::url('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"))
+ $edit_url = Horde::link(Horde::url($edit_url), _("Edit"))
. Horde::img('edit.png', _("Edit"))
. '</a>';
}
-<form method="post" name="export" action="<?php echo Horde::downloadUrl(_("contacts.csv"), null, Horde::applicationUrl('data.php')) ?>">
+<form method="post" name="export" action="<?php echo Horde::downloadUrl(_("contacts.csv"), null, Horde::url('data.php')) ?>">
<?php echo Horde_Util::formInput() ?>
<input type="hidden" name="actionID" value="export" />
-<form method="post" name="import_form" enctype="multipart/form-data" action="<?php echo Horde::applicationUrl('data.php') ?>">
+<form method="post" name="import_form" enctype="multipart/form-data" action="<?php echo Horde::url('data.php') ?>">
<?php Horde_Util::pformInput() ?>
<input type="hidden" name="actionID" value="<?php echo htmlspecialchars($next_step) ?>" />
<input type="hidden" name="import_step" value="<?php echo (int)$import_step ?>" />
if ($currentPage == '*') {
echo '<strong>(' . _("All") . ')</strong> ';
} else {
- echo Horde::applicationUrl($viewurl)->add(array('page' => '*', 'show' => $show))->link() . _("All") . '</a> ';
+ echo Horde::url($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 {
- echo Horde::applicationUrl($viewurl)->add(array('page' => $a, 'show' => $show))->link() . $a . '</a> ';
+ echo Horde::url($viewurl)->add(array('page' => $a, 'show' => $show))->link() . $a . '</a> ';
}
}
?>
-<form name="directory_list" action="<?php echo Horde::applicationUrl('browse.php') ?>" method="post">
+<form name="directory_list" action="<?php echo Horde::url('browse.php') ?>" method="post">
<?php echo Horde_Util::formInput() ?>
<div id="menu">
<?php if ($browse_source_count > 1): ?>
<div class="text" style="padding:1em">
-<form name="directory_search" action="<?php echo Horde::applicationUrl('search.php') ?>" method="post" onsubmit="RedBox.loading(); return true;">
+<form name="directory_search" action="<?php echo Horde::url('search.php') ?>" method="post" onsubmit="RedBox.loading(); return true;">
<?php echo Horde_Util::formInput() ?>
<?php if ($this->uniqueSource): ?>
<input type="hidden" id="turbaSearchSource" name="source" value="<?php echo $this->uniqueSource ?>" />
$source = Horde_Util::getFormData('source');
if (!isset($cfgSources[$source])) {
$notification->push(_("The contact you requested does not exist."), 'horde.error');
- Horde::applicationUrl($prefs->getValue('initial_page'), true)->redirect();
+ Horde::url($prefs->getValue('initial_page'), true)->redirect();
}
$driver = $injector->getInstance('Turba_Driver')->getDriver($source);
$object = $driver->getObject(Horde_Util::getFormData('key'));
} catch (Turba_Exception $e) {
$notification->push($e, 'horde.error');
- Horde::applicationUrl($prefs->getValue('initial_page'), true)->redirect();
+ Horde::url($prefs->getValue('initial_page'), true)->redirect();
}
/* Check permissions on this contact. */
if (!$object->hasPermission(Horde_Perms::READ)) {
$notification->push(_("You do not have permission to view this object."), 'horde.error');
- Horde::applicationUrl($prefs->getValue('initial_page'), true)->redirect();
+ Horde::url($prefs->getValue('initial_page'), true)->redirect();
}
$filename = str_replace(' ', '_', $object->getValue('name'));
$notification->push(sprintf(_("Error deleting domain. %s."), $delete->getMessage()), 'horde.error');
} else {
$notification->push(_("Domain deleted."), 'horde.success');
- Horde::applicationUrl('domains/index.php', true)->redirect();
+ Horde::url('domains/index.php', true)->redirect();
}
}
} elseif ($vars->get('submitbutton') == _("Do not delete")) {
$notification->push(_("Domain not deleted."), 'horde.message');
- Horde::applicationUrl('domains/index.php', true)->redirect();
+ Horde::url('domains/index.php', true)->redirect();
}
/* Render the form. */
$notification->push(sprintf(_("Error saving domain: %s."), $domain_id->getMessage()), 'horde.error');
} else {
$notification->push(_("Domain saved."), 'horde.success');
- Horde::applicationUrl('domains/index.php', true)->redirect();
+ Horde::url('domains/index.php', true)->redirect();
}
}
$domains = array();
}
foreach ($domains as $id => $domain) {
- $url = Horde::applicationUrl('domains/edit.php');
+ $url = Horde::url('domains/edit.php');
$domains[$id]['edit_url'] = Horde_Util::addParameter($url, 'domain_id', $domain['domain_id']);
- $url = Horde::applicationUrl('domains/delete.php');
+ $url = Horde::url('domains/delete.php');
$domains[$id]['del_url'] = Horde_Util::addParameter($url, 'domain_id', $domain['domain_id']);
- $url = Horde::applicationUrl('users/index.php');
+ $url = Horde::url('users/index.php');
$domains[$id]['view_url'] = Horde_Util::addParameter($url, 'domain_id', $domain['domain_id']);
}
*/
function getUserMgrTabs(&$vars)
{
- $url = Horde::applicationUrl('users/index.php');
+ $url = Horde::url('users/index.php');
$tabs = new Horde_Core_Ui_Tabs('section', $vars);
foreach (Vilma::getUserMgrTypes() as $section => $desc) {
$tabs->addTab($desc['plural'], $url, $section);
{
$menu = new Horde_Menu();
- $menu->add(Horde::applicationUrl('domains/index.php'), _("_Domains"), 'domain.png');
+ $menu->add(Horde::url('domains/index.php'), _("_Domains"), 'domain.png');
if (Vilma::getCurDomain()) {
$domain = $_SESSION['vilma']['domain'];
- $url = Horde::applicationUrl('users/index.php');
+ $url = Horde::url('users/index.php');
$tmp = Horde_Util::addParameter($url, 'domain_id', $domain['domain_id']);
- $menu->add(Horde::applicationUrl($tmp), _($domain['domain_name']), 'domain.png');
- $menu->add(Horde::applicationUrl('users/edit.php'), _("New _Address"), 'user.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde::url($tmp), _($domain['domain_name']), 'domain.png');
+ $menu->add(Horde::url('users/edit.php'), _("New _Address"), 'user.png', Horde_Themes::img(null, 'horde'));
} else {
- $menu->add(Horde::applicationUrl('domains/edit.php'), _("_New Domain"), 'domain.png');
+ $menu->add(Horde::url('domains/edit.php'), _("_New Domain"), 'domain.png');
}
if ($returnType == 'object') {
} else {
$notification->push(_("Alias deleted."), 'horde.success');
}
- Horde::applicationUrl('users/index.php')
+ Horde::url('users/index.php')
->add('domain_id', $domain['id'])
->redirect();
}
} else {
$notification->push(_("Forward deleted."), 'horde.success');
}
- Horde::applicationUrl('users/index.php')
+ Horde::url('users/index.php')
->add('domain_id', $domain['id'])
->redirect();
}
} else {
$notification->push(_("$type deleted."), 'horde.success');
}
- Horde::applicationUrl('users/index.php')
+ Horde::url('users/index.php')
->add('domain_id', $domain['id'])
->redirect();
}
}
} elseif ($vars->get('submitbutton') == _("Do not delete")) {
$notification->push(_("User not deleted."), 'horde.message');
- Horde::applicationUrl('users/index.php')
+ Horde::url('users/index.php')
->add('domain_id', $domain['id'])
->redirect();
}
$virtuals = $vilma->driver->getVirtuals($info['name']);
if (count($virtuals)) {
//User has virtual email addresses set up.
- $url = Horde::applicationUrl('users/index.php', true);
+ $url = Horde::url('users/index.php', true);
header('Location: ' . (Vilma::hasPermission($domain) ? $url : Horde_Util::addParameter($url, 'domain', $domain, false)));
} else {
//User does not have any virtual email addresses set up.
$notification->push(_("No virtual email address set up for this user. You should set up at least one virtual email address if this user is to receive any emails."), 'horde.warning');
- $url = Horde::applicationUrl('virtuals/edit.php', true);
+ $url = Horde::url('virtuals/edit.php', true);
$url = Horde_Util::addParameter($url, array('domain' => $domain, 'stripped_email' => Vilma::stripUser($info['name']), 'virtual_destination' => $info['name']), null, false);
header('Location: ' . (Vilma::hasPermission($domain) ? $url : Horde_Util::addParameter($url, 'domain', $domain, false)));
}
}
} else {
$notification->push(_("Alias saved."), 'horde.success');
- Horde::applicationUrl('users/index.php')
+ Horde::url('users/index.php')
->add('domain_id', $domain['id'])
->redirect();
}
$addresses = $vilma->driver->getAddresses($curdomain['domain_name'], $section);
if (is_a($addresses, 'PEAR_Error')) {
$notification->push($addresses);
- Horde::applicationUrl('index.php')->redirect();
+ Horde::url('index.php')->redirect();
}
// Page results
$id = $address['id'];
if($type === 'alias') {
- $url = Horde::applicationUrl('users/editAlias.php');
+ $url = Horde::url('users/editAlias.php');
$url = Util::addParameter($url, 'alias', $id);
$url = Util::addParameter($url, 'section', $section);
$addresses[$i]['edit_url'] = $url;
$addresses[$i]['add_alias_url'] = false;
$addresses[$i]['add_forward_url'] = false;
} elseif($type === 'forward') {
- $url = Horde::applicationUrl('users/editForward.php');
+ $url = Horde::url('users/editForward.php');
$url = Util::addParameter($url, 'forward', $id);
$url = Util::addParameter($url, 'section', $section);
$addresses[$i]['edit_url'] = $url;
$addresses[$i]['add_alias_url'] = false;
$addresses[$i]['add_forward_url'] = false;
} else {
- $url = Horde::applicationUrl('users/edit.php');
+ $url = Horde::url('users/edit.php');
$url = Util::addParameter($url, 'address', $id);
$url = Util::addParameter($url, 'section', $section);
$addresses[$i]['edit_url'] = $url;
- $url = Horde::applicationURL('users/editAlias.php');
+ $url = Horde::url('users/editAlias.php');
$url = Util::addParameter($url, 'address', $id);
$url = Util::addParameter($url, 'section', $section);
$addresses[$i]['add_alias_url'] = $url;
- $url = Horde::applicationURL('users/editForward.php');
+ $url = Horde::url('users/editForward.php');
$url = Util::addParameter($url, 'address', $id);
$url = Util::addParameter($url, 'section', $section);
$addresses[$i]['add_forward_url'] = $url;
}
- $url = Horde::applicationUrl('users/delete.php');
+ $url = Horde::url('users/delete.php');
$currentAddress = $address['address'];
if(!isset($currentAddress) || empty($currentAddress)) {
$currentAddress = $address['user_name'] . $address['domain'];
$url = Horde_Util::addParameter($url, 'address', $currentAddress);
//$addresses[$i]['del_url'] = Horde_Util::addParameter($url, 'address', $id);
$addresses[$i]['del_url'] = Horde_Util::addParameter($url, 'section', $section);
- //$url = Horde::applicationUrl('users/edit.php');
+ //$url = Horde::url('users/edit.php');
//$addresses[$i]['view_url'] = Horde_Util::addParameter($url, 'address', $address['user_name']);
if($type === 'alias') {
- $url = Horde::applicationUrl('users/editAlias.php');
+ $url = Horde::url('users/editAlias.php');
$url = Util::addParameter($url, 'alias', $id);
$url = Util::addParameter($url, 'section', $section);
$addresses[$i]['view_url'] = $url;
} elseif ($type === 'forward') {
- $url = Horde::applicationUrl('users/editForward.php');
+ $url = Horde::url('users/editForward.php');
$url = Util::addParameter($url, 'forward', $id);
$url = Util::addParameter($url, 'section', $section);
$addresses[$i]['view_url'] = $url;
} else {
- $url = Horde::applicationUrl('users/edit.php');
+ $url = Horde::url('users/edit.php');
$url = Util::addParameter($url, 'address', $id);
$url = Util::addParameter($url, 'section', $section);
$addresses[$i]['view_url'] = $url;
/* Set up the template action links. */
if ($vilma->driver->isBelowMaxUsers($curdomain['domain_name'])) {
- $url = Horde::applicationUrl('users/edit.php');
+ $url = Horde::url('users/edit.php');
$maxusers = '';
} else {
$maxusers = _("Maximum Users");
}
-$url = Horde::applicationUrl('virtuals/edit.php');
+$url = Horde::url('virtuals/edit.php');
/* Set up the template fields. */
$template->set('addresses', $addresses, true);
$notification->push(sprintf(_("Error deleting virtual email. %s."), $delete->getMessage()), 'horde.error');
} else {
$notification->push(_("Virtual email deleted."), 'horde.success');
- Horde::applicationUrl('virtuals/index.php')
+ Horde::url('virtuals/index.php')
->add('domain_id', $domain['domain_id'])
->redirect();
}
}
} elseif ($vars->get('submitbutton') == _("Do not delete")) {
$notification->push(_("Virtual email not deleted."), 'horde.message');
- Horde::applicationUrl('virtuals/index.php')
+ Horde::url('virtuals/index.php')
->add('domain_id', $domain['domain_id'])
->redirect();
}
$notification->push(sprintf(_("Error saving virtual email. %s."), $virtual_id->getMessage()), 'horde.error');
} else {
$notification->push(_("Virtual email saved."), 'horde.success');
- Horde::applicationUrl('virtuals/index.php')
+ Horde::url('virtuals/index.php')
->add('user', $info['virtual_destination'])
->redirect();
}
if (is_a($virtuals, 'PEAR_Error')) {
$notification->push($virtuals);
- Horde::applicationUrl('index.php')->redirect();
+ Horde::url('index.php')->redirect();
}
foreach ($virtuals as $id => $virtual) {
- $url = Horde::applicationUrl('virtuals/edit.php');
+ $url = Horde::url('virtuals/edit.php');
$virtuals[$id]['edit_url'] = Horde_Util::addParameter($url, 'virtual_id', $virtual['virtual_id']);
- $url = Horde::applicationUrl('virtuals/delete.php');
+ $url = Horde::url('virtuals/delete.php');
$virtuals[$id]['del_url'] = Horde_Util::addParameter($url, 'virtual_id', $virtual['virtual_id']);
}
/* Set up the template action links. */
$actions = array();
-$url = Horde::applicationUrl('virtuals/edit.php');
+$url = Horde::url('virtuals/edit.php');
$actions['new_url'] = (Vilma::isDomainAdmin() ? $url : Horde_Util::addParameter($url, 'domain', $domain));
$actions['new_text'] = _("New Virtual Email");
-$url = Horde::applicationUrl('users/index.php');
+$url = Horde::url('users/index.php');
$actions['users_url'] = (Vilma::isDomainAdmin() ? $url : Horde_Util::addParameter($url, 'domain', $domain));
$actions['users_text'] = _("Users");
$template->set('actions', $actions);
$notification->push(sprintf(_("Successfully Cloned %s to %s."),
$type['name'], $vars->get('name')),
'horde.success');
- Horde::applicationUrl('admin/?action=type', true)->redirect();
+ Horde::url('admin/?action=type', true)->redirect();
} else {
_open();
$form->renderActive($renderer, $vars, $adminurl, 'post');
_open();
$queues = $whups_driver->getQueues();
$types = $whups_driver->getAllTypes();
- $tlink = Horde::applicationUrl('admin/?formname=edittypeform');
- $mlink = Horde::applicationUrl('admin/?formname=editqueueform');
+ $tlink = Horde::url('admin/?formname=edittypeform');
+ $mlink = Horde::url('admin/?formname=editqueueform');
require WHUPS_TEMPLATES . '/admin/mtmatrix.inc';
break;
require WHUPS_BASE . '/config/templates.php';
if (!$GLOBALS['registry']->getAuth()) {
- Horde::applicationUrl('search.php', true)->redirect();
+ Horde::url('search.php', true)->redirect();
}
$tpl = Horde_Util::getFormData('template');
false,
array(
'icon' => Horde_Themes::img('create.png'),
- 'url' => Horde::applicationUrl('ticket/create.php')
+ 'url' => Horde::url('ticket/create.php')
)
);
false,
array(
'icon' => Horde_Themes::img('search.png'),
- 'url' => Horde::applicationUrl('search.php')
+ 'url' => Horde::url('search.php')
)
);
}
$this->addVariable(
_("Queue Slug"), 'slug', 'text', false, false,
sprintf(_("Slugs allows direct access to this queue's open tickets by visiting: %s. <br /> Slug names may contain only letters, numbers or the _ (underscore) character."),
- Horde::applicationUrl('queue/slugname', true)),
+ Horde::url('queue/slugname', true)),
array('/^[a-zA-Z1-9_]*$/'));
$this->addVariable(_("Queue Email"), 'email', 'email', false, false,
_("This email address will be used when sending notifications for any queue tickets."));
if ($registry->hasMethod('tickets/listVersions') == $registry->getApp()) {
$versionlink = array(
'text' => _("Edit the versions for this queue"),
- 'url' => Horde_Util::addParameter(Horde::applicationUrl('admin/?formname=editversionstep1form'), 'queue', $queue));
+ 'url' => Horde_Util::addParameter(Horde::url('admin/?formname=editversionstep1form'), 'queue', $queue));
$this->addVariable('', 'link', 'link', false, true, null,
array($versionlink));
}
$musers->setDefault($whups_driver->getQueueUsers($queue));
$userlink = array(
'text' => _("Edit the users responsible for this queue"),
- 'url' => Horde_Util::addParameter(Horde::applicationUrl('admin/?formname=edituserform'), 'queue', $queue));
+ 'url' => Horde_Util::addParameter(Horde::url('admin/?formname=edituserform'), 'queue', $queue));
$this->addVariable('', 'link', 'link', false, true, null,
array($userlink));
$tstates->setDefault(array_keys($states));
$statelink = array(
array('text' => _("Edit States"),
- 'url' => Horde::applicationUrl('admin/?formname=editstatestep1form&type=' . $type)));
+ 'url' => Horde::url('admin/?formname=editstatestep1form&type=' . $type)));
if (!count($states)) {
$statelink[] = array(
'text' => _("Create Default States"),
- 'url' => Horde::applicationUrl('admin/?formname=createdefaultstates&type=' . $type));
+ 'url' => Horde::url('admin/?formname=createdefaultstates&type=' . $type));
}
$this->addVariable('', 'link', 'link', false, true, null,
array($statelink));
$tpriorities->setDefault(array_keys($priorities));
$prioritylink = array(
array('text' => _("Edit Priorities"),
- 'url' => Horde::applicationUrl('admin/?formname=editprioritystep1form&type=' . $type)));
+ 'url' => Horde::url('admin/?formname=editprioritystep1form&type=' . $type)));
if (!count($priorities)) {
$prioritylink[] = array(
'text' => _("Create Default Priorities"),
- 'url' => Horde::applicationUrl('admin/?formname=createdefaultpriorities&type=' . $type));
+ 'url' => Horde::url('admin/?formname=createdefaultpriorities&type=' . $type));
}
$this->addVariable('', 'link', 'link', false, true, null,
array($prioritylink));
$tattributes->setDefault(array_keys($attributes));
$attributelink = array(
'text' => _("Edit Attributes"),
- 'url' => Horde::applicationUrl('admin/?formname=editattributedescstep1form&type=' . $type));
+ 'url' => Horde::url('admin/?formname=editattributedescstep1form&type=' . $type));
$this->addVariable('', 'link', 'link', false, true, null,
array($attributelink));
$treplies->setDefault(array_keys($replies));
$replylink = array(
'text' => _("Edit Form Replies"),
- 'url' => Horde::applicationUrl('admin/?formname=editreplystep1form&type=' . $type));
+ 'url' => Horde::url('admin/?formname=editreplystep1form&type=' . $type));
$this->addVariable('', 'link', 'link', false, true, null,
array($replylink));
}
($val['method'] == 0x0))) {
$mime_part = $this->_mimepart;
$mime_part->setName(basename($name));
- $val['name'] = str_replace($name, Horde::applicationUrl('view.php')->add(array('actionID' => 'view_file', 'type' => Horde_Util::getFormData('type'), 'file' => Horde_Util::getFormData('file'), 'ticket' => Horde_Util::getFormData('ticket'), 'zip_attachment' => $key + 1))->link() . $name . '</a>', $val['name']);
+ $val['name'] = str_replace($name, Horde::url('view.php')->add(array('actionID' => 'view_file', 'type' => Horde_Util::getFormData('type'), 'file' => Horde_Util::getFormData('file'), 'ticket' => Horde_Util::getFormData('ticket'), 'zip_attachment' => $key + 1))->link() . $name . '</a>', $val['name']);
}
return $val;
function getTabs($vars)
{
// Create a few variables that are reused.
- $queryurl = Horde::applicationUrl('query/index.php');
+ $queryurl = Horde::url('query/index.php');
$edit = $this->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT);
$delete = $this->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE);
'onclick' => 'popup(\'' . $permsurl . '\'); return false;',
'target' => '_blank'));
}
- $tabs->addTab(_("E_xecute Query"), Horde::applicationUrl('query/run.php'), 'run');
+ $tabs->addTab(_("E_xecute Query"), Horde::url('query/run.php'), 'run');
$tabs->addTab(_("_Load Query"), $queryurl, 'load');
if ((!$this->id && $GLOBALS['registry']->getAuth()) ||
($this->id && $edit)) {
if ($comment) {
$reply =
Horde::link(
- Horde::applicationUrl(
+ Horde::url(
Horde_Util::addParameter(
$canUpdate ? 'ticket/update.php' : 'ticket/comment.php',
array('id' => $vars->get('ticket_id'),
// Admins can delete entries.
$delete_link = '';
if (Whups::hasPermission($vars->get('queue'), 'queue', Horde_Perms::DELETE)) {
- $delete_link = Horde::applicationUrl('ticket/delete_history.php')
+ $delete_link = Horde::url('ticket/delete_history.php')
->add(array('transaction' => $transaction,
'id' => $vars->get('ticket_id'),
'url' => Whups::urlFor('ticket', $vars->get('ticket_id'), true)))
} else {
$slug = (int)$data;
}
- return Horde::applicationUrl('queue/' . $slug, $full, $append_session);
+ return Horde::url('queue/' . $slug, $full, $append_session);
} else {
if (is_array($data)) {
$id = $data['id'];
} else {
$id = $data;
}
- return Horde::applicationUrl('queue/?id=' . $id, $full, $append_session);
+ return Horde::url('queue/?id=' . $id, $full, $append_session);
}
break;
case 'ticket':
$id = (int)$data;
if ($rewrite) {
- return Horde::applicationUrl('ticket/' . $id, $full, $append_session);
+ return Horde::url('ticket/' . $id, $full, $append_session);
} else {
- return Horde::applicationUrl('ticket/?id=' . $id, $full, $append_session);
+ return Horde::url('ticket/?id=' . $id, $full, $append_session);
}
break;
case 'ticket_rss':
$id = (int)$data;
if ($rewrite) {
- return Horde::applicationUrl('ticket/' . $id . '/rss', $full, $append_session);
+ return Horde::url('ticket/' . $id . '/rss', $full, $append_session);
} else {
- return Horde::applicationUrl('ticket/rss.php?id=' . $id, $full, $append_session);
+ return Horde::url('ticket/rss.php?id=' . $id, $full, $append_session);
}
break;
case 'ticket_action':
list($controller, $id) = $data;
if ($rewrite) {
- return Horde::applicationUrl('ticket/' . $id . '/' . $controller, $full, $append_session = 0);
+ return Horde::url('ticket/' . $id . '/' . $controller, $full, $append_session = 0);
} else {
- return Horde::applicationUrl('ticket/' . $controller . '.php?id=' . $id, $full, $append_session = 0);
+ return Horde::url('ticket/' . $controller . '.php?id=' . $id, $full, $append_session = 0);
}
case 'query':
if ($controller == 'query_rss') {
$url .= '/rss';
}
- return Horde::applicationUrl($url, $full, $append_session);
+ return Horde::url($url, $full, $append_session);
} else {
if (is_array($data)) {
if (isset($data['slug'])) {
}
$url = $controller == 'query' ? 'query/run.php' : 'query/rss.php';
$url = Horde_Util::addParameter($url, $param);
- return Horde::applicationUrl($url, $full, $append_session);
+ return Horde::url($url, $full, $append_session);
}
break;
}
$id = preg_replace('|\D|', '', Horde_Util::getFormData('id'));
if (!$id) {
$GLOBALS['notification']->push(_("Invalid Ticket Id"), 'horde.error');
- Horde::applicationUrl($GLOBALS['prefs']->getValue('whups_default_view') . '.php', true)
+ Horde::url($GLOBALS['prefs']->getValue('whups_default_view') . '.php', true)
->redirect();
}
} else {
$GLOBALS['notification']->push($ticket->getMessage(), 'horde.error');
}
- Horde::applicationUrl($GLOBALS['prefs']->getValue('whups_default_view') . '.php', true)
+ Horde::url($GLOBALS['prefs']->getValue('whups_default_view') . '.php', true)
->redirect();
}
$menu = new Horde_Menu();
if ($GLOBALS['registry']->getAuth()) {
- $menu->add(Horde::applicationUrl('mybugs.php'), sprintf(_("_My %s"), $GLOBALS['registry']->get('name')), 'whups.png', null, null, null, $GLOBALS['prefs']->getValue('whups_default_view') == 'mybugs' && strpos($_SERVER['PHP_SELF'], $GLOBALS['registry']->get('webroot') . '/index.php') !== false ? 'current' : null);
+ $menu->add(Horde::url('mybugs.php'), sprintf(_("_My %s"), $GLOBALS['registry']->get('name')), 'whups.png', null, null, null, $GLOBALS['prefs']->getValue('whups_default_view') == 'mybugs' && strpos($_SERVER['PHP_SELF'], $GLOBALS['registry']->get('webroot') . '/index.php') !== false ? 'current' : null);
}
- $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', null, null, null, $GLOBALS['prefs']->getValue('whups_default_view') == 'search' && strpos($_SERVER['PHP_SELF'], $GLOBALS['registry']->get('webroot') . '/index.php') !== false ? 'current' : null);
- $menu->add(Horde::applicationUrl('ticket/create.php'), _("_New Ticket"), 'create.png', null, null, null, $GLOBALS['prefs']->getValue('whups_default_view') == 'ticket/create' && basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
- $menu->add(Horde::applicationUrl('query/index.php'), _("_Query Builder"), 'query.png');
- $menu->add(Horde::applicationUrl('reports.php'), _("_Reports"), 'reports.png');
+ $menu->add(Horde::url('search.php'), _("_Search"), 'search.png', null, null, null, $GLOBALS['prefs']->getValue('whups_default_view') == 'search' && strpos($_SERVER['PHP_SELF'], $GLOBALS['registry']->get('webroot') . '/index.php') !== false ? 'current' : null);
+ $menu->add(Horde::url('ticket/create.php'), _("_New Ticket"), 'create.png', null, null, null, $GLOBALS['prefs']->getValue('whups_default_view') == 'ticket/create' && basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
+ $menu->add(Horde::url('query/index.php'), _("_Query Builder"), 'query.png');
+ $menu->add(Horde::url('reports.php'), _("_Reports"), 'reports.png');
/* Administration. */
if ($GLOBALS['registry']->isAdmin(array('permission' => 'whups:admin'))) {
- $menu->add(Horde::applicationUrl('admin/'), _("_Admin"), 'admin.png');
+ $menu->add(Horde::url('admin/'), _("_Admin"), 'admin.png');
}
if ($returnType == 'object') {
$mime_part->setType(Horde_Mime_Magic::extToMime($file['type']));
$viewer = $GLOBALS['injector']->getInstance('Horde_Mime_Viewer')->getViewer($mime_part);
if ($viewer && !($viewer instanceof Horde_Mime_Viewer_Default)) {
- $url = Horde_Util::addParameter(Horde::applicationUrl('view.php'),
+ $url = Horde_Util::addParameter(Horde::url('view.php'),
array('actionID' => 'view_file',
'type' => $file['type'],
'file' => $file['name'],
// Admins can delete attachments.
if (Whups::hasPermission($queue, 'queue', Horde_Perms::DELETE)) {
$url = Horde_Util::addParameter(
- Horde::applicationUrl('ticket/delete_attachment.php'),
+ Horde::url('ticket/delete_attachment.php'),
array('file' => $file['name'],
'id' => $ticket,
'url' => Horde::selfUrl(true, false, true)));
if ($browser->hasFeature('xmlhttpreq')) {
Horde::addScriptFile('prototype.js', 'horde', true);
} else {
- Horde::metaRefresh($r_time, Horde::applicationUrl('mybugs.php'));
+ Horde::metaRefresh($r_time, Horde::url('mybugs.php'));
}
}
}
$layout = new Horde_Block_Layout_View(
$mybugs_layout,
- Horde::applicationUrl('mybugs_edit.php'),
- Horde::applicationUrl('mybugs.php', true));
+ Horde::url('mybugs_edit.php'),
+ Horde::url('mybugs.php', true));
$layout_html = $layout->toHtml();
$title = sprintf(_("My %s"), $registry->get('name'));
-$menuBottom = '<div id="menuBottom"><a href="' . Horde::applicationUrl('mybugs_edit.php') . '">' . _("Add Content") . '</a></div><div class="clear"> </div>';
+$menuBottom = '<div id="menuBottom"><a href="' . Horde::url('mybugs_edit.php') . '">' . _("Add Content") . '</a></div><div class="clear"> </div>';
require WHUPS_TEMPLATES . '/common-header.inc';
require WHUPS_TEMPLATES . '/menu.inc';
echo $layout_html;
Horde_Registry::appInit('whups');
// Url.
-$url = Horde::applicationUrl('', true);
+$url = Horde::url('', true);
// Name.
$name = $registry->get('name', 'whups') . ' (' . $url . ')';
$whups_query = unserialize($_SESSION['whups']['query']);
if (!$whups_query->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
$notification->push(_("Permission denied."), 'horde.error');
- Horde::applicationUrl($prefs->getValue('whups_default_view') . '.php', true)
+ Horde::url($prefs->getValue('whups_default_view') . '.php', true)
->redirect();
}
} else {
$queryTabs = $whups_query->getTabs($vars);
// Criterion form types.
-$queryurl = Horde::applicationUrl('query/index.php');
+$queryurl = Horde::url('query/index.php');
$vars->set('action', $_SESSION['whups']['query_form']);
$criteriaTabs = new Horde_Core_Ui_Tabs('action', $vars);
$criteriaTabs->preserve('path', $vars->get('path'));
} elseif (isset($whups_query)) {
$notification->push(_("Permission denied."), 'horde.error');
}
- Horde::applicationUrl($prefs->getValue('whups_default_view') . '.php', true)
+ Horde::url($prefs->getValue('whups_default_view') . '.php', true)
->redirect();
}
if ($isvalid) {
$tickets = $whups_driver->executeQuery($whups_query, $vars);
- $_SESSION['whups']['last_search'] = Horde::applicationUrl('query/run.php');
+ $_SESSION['whups']['last_search'] = Horde::url('query/run.php');
}
$title = $whups_query->name ? $whups_query->name : _("Query Results");
'results' => $tickets,
'extra' => $subscription,
'values' => Whups::getSearchResultColumns(),
- 'url' => Horde::applicationUrl('query/run.php')));
+ 'url' => Horde::url('query/run.php')));
$results->html();
} else {
if (!$id || is_a($queue, 'PEAR_Error')) {
$notification->push(_("Invalid queue"), 'horde.error');
- Horde::applicationUrl($prefs->getValue('whups_default_view') . '.php', true)
+ Horde::url($prefs->getValue('whups_default_view') . '.php', true)
->redirect();
}
$template->set('title', htmlspecialchars($rss_title));
$template->set('items', $items, true);
$template->set('url',
- Horde_Util::addParameter(Horde::applicationUrl('queue/', true, -1),
+ Horde_Util::addParameter(Horde::url('queue/', true, -1),
'id', $id));
$template->set('rss_url',
- Horde_Util::addParameter(Horde::applicationUrl('rss.php', true, -1),
+ Horde_Util::addParameter(Horde::url('rss.php', true, -1),
'id', $id));
if (isset($queue['name'])) {
$description = sprintf(_("Open tickets in %s"), $queue['name']);
}
}
$_SESSION['whups']['query'] = serialize($whups_query);
- Horde::applicationUrl('query/index.php', true)
+ Horde::url('query/index.php', true)
->add('action', 'save')
->redirect();
}
} else {
Whups::sortTickets($tickets);
- $_SESSION['whups']['last_search'] = Horde::applicationUrl('search.php?' . _getSearchUrl($vars));
+ $_SESSION['whups']['last_search'] = Horde::url('search.php?' . _getSearchUrl($vars));
$results = Whups_View::factory(
'Results',
array('title' => _("Search Results"),
$template->set('pubDate', htmlspecialchars(date('r')));
$template->set('title', _("Search Results"));
$template->set('items', $items, true);
-$template->set('url', Horde::applicationUrl('search.php'));
+$template->set('url', Horde::url('search.php'));
$template->set('rss_url', Horde::selfUrl());
$template->set('description', _("Search Results"));
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
-<link href="<?php echo Horde::applicationUrl('opensearch.php', true, -1) ?>" rel="search" type="application/opensearchdescription+xml" title="<?php echo $registry->get('name') . ' (' . Horde::applicationUrl('', true) . ')' ?>" />
+<link href="<?php echo Horde::url('opensearch.php', true, -1) ?>" rel="search" type="application/opensearchdescription+xml" title="<?php echo $registry->get('name') . ' (' . Horde::url('', true) . ')' ?>" />
<?php Horde_Themes::includeStylesheetFiles() ?>
</head>
-<form name="tjump" method="get" action="<?php echo Horde::applicationUrl('ticket/', false, -1) ?>">
+<form name="tjump" method="get" action="<?php echo Horde::url('ticket/', false, -1) ?>">
<?php echo Horde_Util::formInput() ?>
<div id="menu">
<span class="rightFloat">
<table width="100%" cellspacing="0">
<tr>
<td class="smallheader nowrap">
- <form action="<?php echo Horde::downloadUrl('report.html', null, Horde::applicationUrl('data.php')) ?>" method="post" name="datagen">
+ <form action="<?php echo Horde::downloadUrl('report.html', null, Horde::url('data.php')) ?>" method="post" name="datagen">
<?php Horde_Util::pformInput() ?>
<input type="hidden" name="ids" value="<?php echo implode(',', $ids) ?>" />
<?php echo _("Download these results as: ") ?>
$notification->push(sprintf(_("Adding your ticket failed: %s."),
$ticket->getMessage()),
'horde.error');
- Horde::applicationUrl('ticket/create.php', true)->redirect();
+ Horde::url('ticket/create.php', true)->redirect();
}
$notification->push(sprintf(_("Your ticket ID is %s. An appropriate person has been notified of this request."), $ticket->getId()), 'horde.success');
$ticket->show();
$details = $ticket->getDetails();
if (!Whups::hasPermission($details['queue'], 'queue', Horde_Perms::DELETE)) {
$notification->push(_("Permission Denied"), 'horde.error');
- Horde::applicationUrl($prefs->getValue('whups_default_view') . '.php', true)
+ Horde::url($prefs->getValue('whups_default_view') . '.php', true)
->redirect();
}
if (!is_a($result, 'PEAR_Error')) {
$notification->push(sprintf(_("Ticket %d has been deleted."), $info['id']), 'horde.success');
- Horde::applicationUrl($prefs->getValue('whups_default_view') . '.php', true)
+ Horde::url($prefs->getValue('whups_default_view') . '.php', true)
->redirect();
}
$notification->push(_("There was an error deleting the ticket:") . ' ' . $result->getMessage(), 'horde.error');
$ticket = Whups::getCurrentTicket();
if (!Whups::hasPermission($ticket->get('queue'), 'queue', Horde_Perms::DELETE)) {
$notification->push(_("Permission Denied"), 'horde.error');
- Horde::applicationUrl($prefs->getValue('whups_default_view') . '.php', true)
+ Horde::url($prefs->getValue('whups_default_view') . '.php', true)
->redirect();
}
if ($url = Horde_Util::getFormData('url')) {
header('Location: ' . $url);
} else {
- Horde::applicationUrl($prefs->getValue('whups_default_view') . '.php', true)
+ Horde::url($prefs->getValue('whups_default_view') . '.php', true)
->redirect();
}
$ticket = Whups::getCurrentTicket();
if (!Whups::hasPermission($ticket->get('queue'), 'queue', Horde_Perms::DELETE)) {
$notification->push(_("Permission Denied"), 'horde.error');
- Horde::applicationUrl($prefs->getValue('whups_default_view') . '.php', true)
+ Horde::url($prefs->getValue('whups_default_view') . '.php', true)
->redirect();
}
if ($url = Horde_Util::getFormData('url')) {
header('Location: ' . $url);
} else {
- Horde::applicationUrl($prefs->getValue('whups_default_view') . '.php', true)
+ Horde::url($prefs->getValue('whups_default_view') . '.php', true)
->redirect();
}
// Check permissions on this ticket.
if (!Whups::hasPermission($ticket->get('queue'), 'queue', Horde_Perms::DELETE)) {
$notification->push(_("Permission Denied"), 'horde.error');
- Horde::applicationUrl($prefs->getValue('whups_default_view') . '.php', true)
+ Horde::url($prefs->getValue('whups_default_view') . '.php', true)
->redirect();
}
$details = $ticket->getDetails();
if (!Whups::hasPermission($details['queue'], 'queue', 'update')) {
$notification->push(_("Permission Denied"), 'horde.error');
- Horde::applicationUrl($prefs->getValue('whups_default_view') . '.php', true)
+ Horde::url($prefs->getValue('whups_default_view') . '.php', true)
->redirect();
}
if (!Whups::hasPermission($ticket->get('queue'), 'queue', 'update')) {
$notification->push(_("Permission Denied"), 'horde.error');
- Horde::applicationUrl($prefs->getValue('whups_default_view') . '.php', true)
+ Horde::url($prefs->getValue('whups_default_view') . '.php', true)
->redirect();
}
/* Bail out if we didn't get any versions - at least one of these has
* to be non-empty. */
if (!$v1 && !$v2) {
- Horde::applicationUrl('history.php', true)
+ Horde::url('history.php', true)
->add('page', Horde_Util::getFormData('page'))
->redirect();
}
case 'history':
if ($page->allows(WICKED_MODE_HISTORY)) {
/* Redirect to history page. */
- Horde::applicationUrl('history.php')
+ Horde::url('history.php')
->add('page', $page->pageName())
->redirect();
}
$url = Wicked::url($this->pageName());
unset($params['page']);
} else {
- $url = Horde::applicationUrl($linkpage);
+ $url = Horde::url($linkpage);
}
return Horde_Util::addParameter($url, $params);
$version_url = Horde_Util::addParameter($page->pageUrl(), 'version',
$page->version());
- $diff_url = Horde_Util::addParameter(Horde::applicationUrl('diff.php'),
+ $diff_url = Horde_Util::addParameter(Horde::url('diff.php'),
array('page' => $page->pageName(),
'v1' => '?',
'v2' => $page->version()));
$params = array('page' => $page,
'mime' => '1',
'file' => $options['src']);
- $options['src'] = Horde_Util::addParameter(Horde::applicationUrl('view.php', true),
+ $options['src'] = Horde_Util::addParameter(Horde::url('view.php', true),
$params, null, false);
}
} else {
$script = Horde_Util::addParameter('display.php', 'page', $page);
}
- return Horde::applicationUrl($script, $full, $append_session);
+ return Horde::url($script, $full, $append_session);
}
/**
$registry->pushApp('wicked');
// Url.
-$url = Horde::applicationUrl('', true);
+$url = Horde::url('', true);
// Name.
$name = $registry->get('name', 'wicked') . ' (' . $url . ')';
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
-<link href="<?php echo Horde::applicationUrl('opensearch.php', true, -1) ?>" rel="search" type="application/opensearchdescription+xml" title="<?php echo $registry->get('name') . ' (' . Horde::applicationUrl('', true) . ')' ?>" />
+<link href="<?php echo Horde::url('opensearch.php', true, -1) ?>" rel="search" type="application/opensearchdescription+xml" title="<?php echo $registry->get('name') . ' (' . Horde::url('', true) . ')' ?>" />
<?php Horde_Themes::includeStylesheetFiles() ?>
</head>
$v = $this->version();
if (!is_a($v, 'PEAR_Error') && $this->allows(WICKED_MODE_DIFF)) {
- $diff_url = Horde_Util::addParameter(Horde::applicationUrl('diff.php'),
+ $diff_url = Horde_Util::addParameter(Horde::url('diff.php'),
array('page' => $this->pageName(),
'v1' => '?',
'v2' => $v));