function getFolders($iUserId) { $aFList = KTrss::getFolderList($iUserId); if ($aFList) { foreach ($aFList as $folder_id) { $folder = KTrss::getOneFolder($folder_id); if ($folder) { $aFolders[] = $folder; } } } if (PEAR::isError($aFolders)) { // XXX: log error return false; } if ($aFolders) { return $aFolders; } }