From 8d0e368e6f5d24173fef4347e25de53c3e4f7087 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 2 Jun 2009 21:28:42 -0600 Subject: [PATCH] Clean up createFolder API call --- imp/lib/api.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/imp/lib/api.php b/imp/lib/api.php index a18ada84e..3e8cc5bb3 100644 --- a/imp/lib/api.php +++ b/imp/lib/api.php @@ -234,22 +234,19 @@ function _imp_folderlist() * * @param string $folder The name of the folder to create (UTF7-IMAP). * - * @return string The full folder name created on success, an empty string - * on failure. + * @return string The full folder name created or false on failure. */ function _imp_createFolder($folder) { $GLOBALS['authentication'] = 'none'; require_once dirname(__FILE__) . '/base.php'; - $result = false; - if (IMP::checkAuthentication(true)) { $imp_folder = &IMP_Folder::singleton(); - $result = $imp_folder->create(IMP::appendNamespace($folder), $GLOBALS['prefs']->getValue('subscribe')); + return $imp_folder->create(IMP::appendNamespace($folder), $GLOBALS['prefs']->getValue('subscribe')); } - return (empty($result)) ? '' : $folder; + return false; } /** -- 2.11.0