From: Michael M Slusarz Date: Wed, 3 Jun 2009 03:28:42 +0000 (-0600) Subject: Clean up createFolder API call X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=8d0e368e6f5d24173fef4347e25de53c3e4f7087;p=horde.git Clean up createFolder API call --- 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; } /**