diff --git a/felamimail/inc/class.ajaxfelamimail.inc.php b/felamimail/inc/class.ajaxfelamimail.inc.php index a960bb476a..b43ca98f47 100644 --- a/felamimail/inc/class.ajaxfelamimail.inc.php +++ b/felamimail/inc/class.ajaxfelamimail.inc.php @@ -1,21 +1,22 @@ + * @copyright (c) 2009-10 by Klaus Leithoff + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ - /* $Id$ */ - - class ajaxfelamimail { +/** + * a class containing / implementing the xajax actions triggered by javascript + */ +class ajaxfelamimail +{ // which profile to use(currently only 0 is supported) var $imapServerID=0; @@ -768,7 +769,7 @@ if ($this->_connectionStatus === true) { $folderName = $this->sessionData['mailbox']; - + //error_log(array2string($this->bofelamimail->getFolderStatus($folderName))); if ($folderStatus = $this->bofelamimail->getFolderStatus($folderName)) { if ($folderStatus['unseen'] > 0) { $response->addScript("tree.setItemText('$folderName', '". $folderStatus['shortDisplayName'] ." (". $folderStatus['unseen'] .")');"); @@ -790,30 +791,30 @@ $response = new xajaxResponse(); if(!($this->_connectionStatus === true)) $this->_connectionStatus = $this->bofelamimail->openConnection(); if($this->_connectionStatus === true) { - #error_log("connected"); + //error_log("connected"); if (is_array($activeFolders)) { foreach ($activeFolders as $key => $name) { - #error_log($key."=>".$name); + //error_log($key."=>".$name); switch($name) { case "0": break; case "--topfolder--": break; default: - $folders[$name] = $name; - #error_log("check folder $name"); + $folders[html_entity_decode($name,ENT_COMPAT)] = $name; + //error_log("check folder $name"); } } if (!(is_array($folders) && count($folders)>0)) $folders = $this->bofelamimail->getFolderObjects(true); } else { - #error_log("check/get all folders"); + //error_log("check/get all folders"); $folders = $this->bofelamimail->getFolderObjects(true); } foreach($folders as $folderName => $folderData) { - #error_log("checking $folderName"); + //error_log(__METHOD__.__LINE__."checking $folderName -> ".array2string($this->bofelamimail->getFolderStatus($folderName))); if($folderStatus = $this->bofelamimail->getFolderStatus($folderName)) { if($folderStatus['unseen'] > 0) { - $response->addScript("tree.setItemText('$folderName', '". $folderStatus['shortDisplayName'] ." (". $folderStatus['unseen'] .")');"); + $response->addScript("tree.setItemText('".@htmlspecialchars($folderName,ENT_QUOTES, bofelamimail::$displayCharset,false)."', '". $folderStatus['shortDisplayName'] ." (". $folderStatus['unseen'] .")');"); } else { - $response->addScript("tree.setItemText('$folderName', '". $folderStatus['shortDisplayName'] ."');"); + $response->addScript("tree.setItemText('".@htmlspecialchars($folderName,ENT_QUOTES, bofelamimail::$displayCharset,false)."', '". $folderStatus['shortDisplayName'] ."');"); } } } @@ -1201,5 +1202,5 @@ return str_replace($search, $replace, $folderName); } - } +} ?> diff --git a/felamimail/inc/class.uiwidgets.inc.php b/felamimail/inc/class.uiwidgets.inc.php index 875fdde022..81cca5fc80 100644 --- a/felamimail/inc/class.uiwidgets.inc.php +++ b/felamimail/inc/class.uiwidgets.inc.php @@ -45,8 +45,8 @@ * @copyright Lars Kneschke 2004 * @license http://www.opensource.org/licenses/bsd-license.php BSD */ - class uiwidgets - { +class uiwidgets +{ var $charset; var $bofelamimail; /** @@ -192,9 +192,9 @@ if($_useDisplayCharset == true) { $folderName = $GLOBALS['egw']->translation->convert($obj->folderName, 'UTF7-IMAP', $this->charset); - $folderName = @htmlspecialchars($folderName, ENT_QUOTES, $this->charset); + $folderName = @htmlspecialchars($folderName, ENT_QUOTES, $this->charset,false); } else { - $folderName = @htmlspecialchars($obj->folderName, ENT_QUOTES, $this->charset); + $folderName = @htmlspecialchars($obj->folderName, ENT_QUOTES, $this->charset,false); } // give INBOX a special foldericon if ($folderName == 'INBOX') { @@ -1047,5 +1047,5 @@ $this->t->parse('out','quota_block'); return $this->t->get('out','quota_block'); } - } +} ?>