From: Michael M Slusarz Date: Sat, 25 Jul 2009 23:03:34 +0000 (-0600) Subject: Move constants into IMP::. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=94dc108a4de738511ecff1b26002a1869bb26bd8;p=horde.git Move constants into IMP::. --- diff --git a/imp/lib/IMP.php b/imp/lib/IMP.php index 9f4cedd00..dc308d707 100644 --- a/imp/lib/IMP.php +++ b/imp/lib/IMP.php @@ -34,6 +34,10 @@ class IMP /* IMP internal string used to separate indexes. */ const IDX_SEP = '\0'; + /* Preferences constants. */ + const PREF_NO_FOLDER = '\0nofolder'; + const PREF_VTRASH = '\0vtrash'; + /* Storage place for an altered version of the current URL. */ static public $newUrl = null; diff --git a/imp/lib/prefs.php b/imp/lib/prefs.php index 6454b7bf9..6e800c8f8 100644 --- a/imp/lib/prefs.php +++ b/imp/lib/prefs.php @@ -8,9 +8,6 @@ * @package Horde_Prefs */ -define('IMP_PREF_NO_FOLDER', '%nofolder'); -define('IMP_PREF_VTRASH', '%vtrash'); - function handle_sentmailselect($updated) { global $conf, $prefs, $identity; @@ -46,7 +43,7 @@ function handlefolders($updated, $pref, $folder, $new) $folder = Horde_Util::getFormData($folder); if (isset($folder) && !$prefs->isLocked($pref)) { $new = Horde_String::convertCharset(Horde_Util::getFormData($new), Horde_Nls::getCharset(), 'UTF7-IMAP'); - if ($folder == IMP_PREF_NO_FOLDER) { + if ($folder == IMP::PREF_NO_FOLDER) { $prefs->setValue($pref, ''); } else { if (empty($folder) && !empty($new)) { @@ -77,7 +74,7 @@ function handle_trashselect($updated) global $prefs; $ret = true; - if (Horde_Util::getFormData('trash') == IMP_PREF_VTRASH) { + if (Horde_Util::getFormData('trash') == IMP::PREF_VTRASH) { if ($prefs->isLocked('use_vtrash')) { $ret = false; } else { diff --git a/imp/templates/prefs/draftsselect.inc b/imp/templates/prefs/draftsselect.inc index c13f8a397..0afc1b4e5 100644 --- a/imp/templates/prefs/draftsselect.inc +++ b/imp/templates/prefs/draftsselect.inc @@ -20,7 +20,7 @@ function newDraftsFolderName()

diff --git a/imp/templates/prefs/spamselect.inc b/imp/templates/prefs/spamselect.inc index a8e46e10f..44e16ac38 100644 --- a/imp/templates/prefs/spamselect.inc +++ b/imp/templates/prefs/spamselect.inc @@ -18,6 +18,6 @@ function newSpamFolderName()
- + diff --git a/imp/templates/prefs/trashselect.inc b/imp/templates/prefs/trashselect.inc index 5b9beed73..9f6d074b7 100644 --- a/imp/templates/prefs/trashselect.inc +++ b/imp/templates/prefs/trashselect.inc @@ -21,7 +21,7 @@ function newTrashFolderName() getValue('use_vtrash'); echo '' . - '' . + '' . IMP::flistSelect(array('heading' => _("Create a new trash folder"), 'filter' => array('INBOX'), 'selected' => ($use_vtrash ? null : IMP::folderPref($prefs->getValue('trash_folder'), true)), 'new_folder' => true)); ?>