Fixed folder names hash function (Closes #348)

This commit is contained in:
RainLoop Team 2014-10-10 18:40:41 +04:00
parent 14e2f1705a
commit c923a23e4d

View file

@ -7207,15 +7207,7 @@ class Actions
{ {
return \in_array(\strtolower($sFolderFullName), array('inbox', 'sent', 'send', 'drafts', return \in_array(\strtolower($sFolderFullName), array('inbox', 'sent', 'send', 'drafts',
'spam', 'junk', 'bin', 'trash', 'archive', 'allmail')) ? 'spam', 'junk', 'bin', 'trash', 'archive', 'allmail')) ?
\ucfirst(\strtolower($sFolderFullName)) : \md5($sFolderFullName); $sFolderFullName : \md5($sFolderFullName);
// return \in_array(\strtolower($sFolderFullName), array('inbox', 'sent', 'send', 'drafts', 'spam', 'junk', 'bin', 'trash')) ?
// \ucfirst(\strtolower($sFolderFullName)) :
// \RainLoop\Utils::CustomBaseConvert(\sprintf('%u', \crc32(md5($sFolderFullName).$sFolderFullName)), '0123456789',
// '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');
// return \preg_match('/^[a-zA-Z0-9]+$/', $sFolderFullName) ? $sFolderFullName : \md5($sFolderFullName);
// return \preg_match('/^[a-zA-Z0-9]+$/', $sFolderFullName) ? $sFolderFullName : \rtrim(\base_convert(\md5($sFolderFullName), 16, 32), '0');
// return 'INBOX' === $sFolderFullName ? $sFolderFullName : \base_convert(\sprintf('%u', \crc32(\md5($sFolderFullName))), 10, 32);
} }
/** /**