From 74d6a87b472e4c92f451df68a7bb6640a60f7b6c Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 29 Jul 2009 12:59:41 -0600 Subject: [PATCH] Remove IMP::prefsURL() --- imp/acl.php | 2 +- imp/fetchmailprefs.php | 2 +- imp/filterprefs.php | 2 +- imp/lib/IMP.php | 12 ------------ imp/pgp.php | 2 +- imp/smime.php | 2 +- 6 files changed, 5 insertions(+), 17 deletions(-) diff --git a/imp/acl.php b/imp/acl.php index cd75a8ca4..91bbe5783 100644 --- a/imp/acl.php +++ b/imp/acl.php @@ -15,7 +15,7 @@ require_once dirname(__FILE__) . '/lib/base.php'; /* Redirect back to the options screen if ACL is not enabled. */ -$prefs_url = IMP::prefsURL(true); +$prefs_url = Horde::getServiceLink('options', 'imp'); if ($prefs->isLocked('acl') || empty($_SESSION['imp']['acl'])) { $notification->push(_("Folder sharing is not enabled."), 'horde.error'); header('Location: ' . $prefs_url); diff --git a/imp/fetchmailprefs.php b/imp/fetchmailprefs.php index 6eeceb5ba..3de6c80fd 100644 --- a/imp/fetchmailprefs.php +++ b/imp/fetchmailprefs.php @@ -17,7 +17,7 @@ $fm_account = new IMP_Fetchmail_Account(); $driver = Horde_Util::getFormData('fm_driver'); $fetch_url = Horde::applicationUrl('fetchmailprefs.php'); -$prefs_url = Horde_Util::addParameter(IMP::prefsURL(true), 'group', 'fetchmail', false); +$prefs_url = Horde_Util::addParameter(Horde::getServiceLink('options', 'imp'), array('group' => 'fetchmail'), null, false); $to_edit = null; /* Handle clients without javascript. */ diff --git a/imp/filterprefs.php b/imp/filterprefs.php index 02a1d713c..38159a4a6 100644 --- a/imp/filterprefs.php +++ b/imp/filterprefs.php @@ -52,7 +52,7 @@ Prefs_UI::generateHeader(null, $chunk); $t = new Horde_Template(); $t->setOption('gettext', true); $t->set('navcell', Horde_Util::bufferOutput(array('Prefs_UI', 'generateNavigationCell'), 'filters')); -$t->set('prefsurl', IMP::prefsURL(true)); +$t->set('prefsurl', Horde::getServiceLink('options', 'imp')); $t->set('return_text', _("Return to Options")); /* Get filter links. */ diff --git a/imp/lib/IMP.php b/imp/lib/IMP.php index 674cfe983..b61f111bc 100644 --- a/imp/lib/IMP.php +++ b/imp/lib/IMP.php @@ -774,18 +774,6 @@ class IMP } /** - * Generates the URL to the prefs page. - * - * @param boolean $full Generate full URL? - * - * @return string The URL to the IMP prefs page. - */ - static public function prefsURL($full = false) - { - return Horde_Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/prefs.php', $full), array('app' => 'imp')); - } - - /** * Get message indices list. * * @param mixed $indices The following inputs are allowed: diff --git a/imp/pgp.php b/imp/pgp.php index 069af6b47..67adb0eca 100644 --- a/imp/pgp.php +++ b/imp/pgp.php @@ -389,7 +389,7 @@ if ($prefs->getValue('use_pgp')) { $t->set('use_pgp_help', Horde_Help::link('imp', 'pgp-overview')); } } -$t->set('prefsurl', IMP::prefsURL(true)); +$t->set('prefsurl', Horde::getServiceLink('options', 'imp')); echo $t->fetch(IMP_TEMPLATES . '/pgp/pgp.html'); if (!$chunk) { diff --git a/imp/smime.php b/imp/smime.php index 17268953d..d767c258b 100644 --- a/imp/smime.php +++ b/imp/smime.php @@ -292,7 +292,7 @@ if ($openssl_check && $prefs->getValue('use_smime')) { $t->set('use_smime_label', Horde::label('use_smime', _("Enable S/MIME functionality?"))); } } -$t->set('prefsurl', IMP::prefsURL(true)); +$t->set('prefsurl', Horde::getServiceLink('options', 'imp')); echo $t->fetch(IMP_TEMPLATES . '/smime/smime.html'); if (!$chunk) { -- 2.11.0