fixing a problem regarding the display of folders reported as subscribed, but no longer existing

This commit is contained in:
Klaus Leithoff 2009-08-10 13:13:01 +00:00
parent ac11d6a39c
commit 2f1647ddda

View File

@ -1494,11 +1494,22 @@
if( !PEAR::isError($foldersNameSpace[$type]['all'])) $listOfFolders = $foldersNameSpace[$type]['all'];
}
foreach((array)$listOfFolders as $folderName) {
#echo "<br>FolderToCheck:$folderName<br>";
//echo "<br>FolderToCheck:$folderName<br>";
if($_subscribedOnly && !in_array($folderName, $foldersNameSpace[$type]['all'])) {
#echo "$folderName failed to be here <br>";
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."."<br>" ;
} else {
echo " failed."."<br>";
}
continue;
}
$folderParts = explode($delimiter, $folderName);
$shortName = array_pop($folderParts);