* @param boolean $force_ssl Ignore $conf['use_ssl'] and force creation
* of a SSL URL?
*
- * @return string The requested URI.
+ * @return Horde_Url The requested URL.
*/
static public function selfUrl($script_params = false, $nocache = true,
$full = false, $force_ssl = false)
require_once dirname(__FILE__) . '/lib/Application.php';
new IMP_Application(array('init' => array('authentication' => 'none', 'session_control' => 'none')));
-$self_url = Horde::selfUrl(false, true, true);
-
// Lets see if we are even able to send the user an attachment.
if (!$conf['compose']['link_attachments']) {
throw new IMP_Exception(_("Linked attachments are forbidden."));
/* If the attachments cache is not empty, we must reload this page
* and delete the attachments. */
if ($imp_compose->numberOfAttachments()) {
- $cancel_url = new Horde_Url(Horde::selfUrl(), true);
- $cancel_url->add(array(
+ $cancel_url = Horde::selfUrl()->setRaw(true)->add(array(
'actionID' => 'cancel_compose',
'composeCache' => $composeCacheID,
'popup' => 1
/* If the attachments cache is not empty, we must reload this page and
delete the attachments. */
if ($imp_compose->numberOfAttachments()) {
- $cancel_url = _mailboxReturnURL(new Horde_Url(Horde::selfUrl(), true))->add(array(
+ $cancel_url = _mailboxReturnURL(Horde::selfUrl()->setRaw(true))->add(array(
'actionID' => 'cancel_compose',
'composeCache' => $composeCacheID
));
($id != 0) &&
(intval($id) != 1) &&
(strpos($id, '.') === false)) {
- $url = new Horde_Url(Horde::selfUrl(true));
- $url->remove(array('actionID', 'imapid', 'uid'))->add(array('actionID' => 'strip_attachment', 'imapid' => $id, 'uid' => $this->_uid, 'message_token' => Horde::getRequestToken('imp.impcontents')));
+ $url = Horde::selfUrl(true)->remove(array('actionID', 'imapid', 'uid'))->add(array('actionID' => 'strip_attachment', 'imapid' => $id, 'uid' => $this->_uid, 'message_token' => Horde::getRequestToken('imp.impcontents')));
$part['strip'] = Horde::link($url, _("Strip Attachment"), 'deleteImg', null, "return window.confirm('" . addslashes(_("Are you sure you wish to PERMANENTLY delete this attachment?")) . "');") . '</a>';
}
static public function selfUrl()
{
return self::$newUrl
- ? clone self::$newUrl
- : new Horde_Url(Horde::selfUrl(true));
+ ? self::$newUrl->copy()
+ : Horde::selfUrl(true);
}
/**
if (count($inlineout['display_ids']) > 2) {
$a_template->set('download_all', Horde::widget($imp_contents->urlView($imp_contents->getMIMEMessage(), 'download_all'), _("Download All Attachments (in .zip file)"), 'widget', '', '', _("Download All Attachments (in .zip file)"), true));
if ($strip_atc) {
- $strip_url = new Horde_Url(Horde::selfUrl(true));
- $a_template->set('strip_all', Horde::widget($strip_url->remove(array('actionID'))->add(array('actionID' => 'strip_all', 'message_token' => $message_token)), _("Strip All Attachments"), 'widget', '', "return window.confirm('" . addslashes(_("Are you sure you wish to PERMANENTLY delete all attachments?")) . "');", _("Strip All Attachments"), true));
+ $a_template->set('strip_all', Horde::widget(Horde::selfUrl(true)->remove(array('actionID'))->add(array('actionID' => 'strip_all', 'message_token' => $message_token)), _("Strip All Attachments"), 'widget', '', "return window.confirm('" . addslashes(_("Are you sure you wish to PERMANENTLY delete all attachments?")) . "');", _("Strip All Attachments"), true));
}
}
/* Get headers for the message. */
$curr_msg['date'] = $imp_ui->getLocalTime($envelope['date']);
- $selfurl = new Horde_Url(Horde::selfUrl(true));
-
if (IMP::isSpecialFolder($mbox)) {
$curr_msg['addr_to'] = true;
- $curr_msg['addr'] = _("To:") . ' ' . $imp_ui->buildAddressLinks($envelope['to'], $selfurl);
+ $curr_msg['addr'] = _("To:") . ' ' . $imp_ui->buildAddressLinks($envelope['to'], Horde::selfUrl(true));
$addr = _("To:") . ' ' . htmlspecialchars(Horde_Mime_Address::addrObject2String(reset($envelope['to'])), ENT_COMPAT, $charset);
} else {
$curr_msg['addr_to'] = false;
- $curr_msg['addr'] = $imp_ui->buildAddressLinks($envelope['from'], $selfurl);
+ $curr_msg['addr'] = $imp_ui->buildAddressLinks($envelope['from'], Horde::selfUrl(true));
$addr = htmlspecialchars(Horde_Mime_Address::addrObject2String(reset($envelope['from'])), ENT_COMPAT, $charset);
}