mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 08:23:12 +01:00
* email: fix for Stylite Ticket#608: folders with umlauts (specialchars) did not display the count of unread mail
This commit is contained in:
parent
e3d1c3faa0
commit
88e8907cfe
@ -1,21 +1,22 @@
|
||||
<?php
|
||||
/***************************************************************************\
|
||||
* eGroupWare - FeLaMiMail *
|
||||
* http://www.linux-at-work.de *
|
||||
* http://www.phpgw.de *
|
||||
* http://www.egroupware.org *
|
||||
* Written by : Lars Kneschke [lkneschke@linux-at-work.de] *
|
||||
* maintained by Klaus Leithoff *
|
||||
* ------------------------------------------------- *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU General Public License as published by the *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\***************************************************************************/
|
||||
/**
|
||||
* EGroupware - FeLaMiMail - xajax actions
|
||||
*
|
||||
* @link http://www.egroupware.org
|
||||
* @package felamimail
|
||||
* @author Lars Kneschke [lkneschke@linux-at-work.de]
|
||||
* @author Klaus Leithoff [kl@stylite.de]
|
||||
* @copyright (c) 2004 by Lars Kneschke <lkneschke-AT-linux-at-work.de>
|
||||
* @copyright (c) 2009-10 by Klaus Leithoff <kl-AT-stylite.de>
|
||||
* @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', '<b>". $folderStatus['shortDisplayName'] ." (". $folderStatus['unseen'] .")</b>');");
|
||||
@ -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', '<b>". $folderStatus['shortDisplayName'] ." (". $folderStatus['unseen'] .")</b>');");
|
||||
$response->addScript("tree.setItemText('".@htmlspecialchars($folderName,ENT_QUOTES, bofelamimail::$displayCharset,false)."', '<b>". $folderStatus['shortDisplayName'] ." (". $folderStatus['unseen'] .")</b>');");
|
||||
} 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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user