From 2f1647ddda091ccbba198a61d5d3fb10e59f08cb Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Mon, 10 Aug 2009 13:13:01 +0000 Subject: [PATCH] fixing a problem regarding the display of folders reported as subscribed, but no longer existing --- felamimail/inc/class.bofelamimail.inc.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/felamimail/inc/class.bofelamimail.inc.php b/felamimail/inc/class.bofelamimail.inc.php index 86dbb816b0..a1789d39ce 100644 --- a/felamimail/inc/class.bofelamimail.inc.php +++ b/felamimail/inc/class.bofelamimail.inc.php @@ -1494,11 +1494,22 @@ if( !PEAR::isError($foldersNameSpace[$type]['all'])) $listOfFolders = $foldersNameSpace[$type]['all']; } foreach((array)$listOfFolders as $folderName) { - #echo "
FolderToCheck:$folderName
"; + //echo "
FolderToCheck:$folderName
"; if($_subscribedOnly && !in_array($folderName, $foldersNameSpace[$type]['all'])) { #echo "$folderName failed to be here
"; continue; } + if (!self::folderExists($folderName)) { + echo("eMail Folder $folderName failed to exist; should be unsubscribed; Trying ..."); + error_log(__METHOD__."-> $folderName failed to be here; should be unsubscribed"); + if (self::subscribe($folderName, false)) + { + echo " success."."
" ; + } else { + echo " failed."."
"; + } + continue; + } $folderParts = explode($delimiter, $folderName); $shortName = array_pop($folderParts);