diff --git a/customer_email.php b/customer_email.php index 2bfd1786..cb233425 100644 --- a/customer_email.php +++ b/customer_email.php @@ -143,7 +143,6 @@ if ($page == 'overview') { if ($result['popaccountid'] != 0) { // Free the Quota used by the email account - if ($settings['system']['mail_quota_enabled'] == 1) { $stmt = Database::prepare("SELECT `quota` FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid`= :customerid @@ -167,7 +166,8 @@ if ($page == 'overview') { } if (isset($_POST['delete_userfiles']) - && (int)$_POST['delete_userfiles'] == 1) { + && (int)$_POST['delete_userfiles'] == 1 + ) { inserttask('7', $userinfo['loginname'], $result['email_full']); } @@ -188,7 +188,7 @@ if ($page == 'overview') { $log->logAction(USR_ACTION, LOG_INFO, "deleted email address '" . $result['email'] . "'"); redirectTo($filename, array('page' => $page, 's' => $s)); } else { - if (maildirExists($result)) { + if ($result['popaccountid'] != '0') { $show_checkbox = true; } else { $show_checkbox = false; diff --git a/lib/functions/filedir/function.maildirExists.php b/lib/functions/filedir/function.maildirExists.php deleted file mode 100644 index b6153c5b..00000000 --- a/lib/functions/filedir/function.maildirExists.php +++ /dev/null @@ -1,49 +0,0 @@ - (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * - */ - -/** - * check whether a maildir exists on the filesystem - * - * @param array $result all mail-info of customer - * - * @return boolean - */ -function maildirExists($result = null) -{ - global $settings; - - if(is_array($result)) - { - $loginname = getCustomerDetail($result['customerid'], 'loginname'); - if($loginname !== false) { - $email_user=substr($result['email_full'],0,strrpos($result['email_full'],"@")); - $email_domain=substr($result['email_full'],strrpos($result['email_full'],"@")+1); - $maildirname=trim($settings['system']['vmail_maildirname']); - $maildir = makeCorrectDir($settings['system']['vmail_homedir'] .'/'. $loginname .'/'. $email_domain .'/'. $email_user . (!empty($maildirname)?'/'.$maildirname:'')); - if(@file_exists($maildir)) { - return true; - } else { - // backward-compatibility for old folder-structure - $maildir_old = makeCorrectDir($settings['system']['vmail_homedir'] .'/'. $loginname .'/'. $email_user); - if (@file_exists($maildir_old)) { - return true; - } - } - } - } - return false; -}