- Fix problem with numeric folder names (#1485527)

release-0.6
alecpl 16 years ago
parent fee8c6ceab
commit 8498dce502

@ -1,6 +1,10 @@
CHANGELOG RoundCube Webmail CHANGELOG RoundCube Webmail
--------------------------- ---------------------------
2008/10/29 (alec)
----------
- Fix problem with numeric folder names (#1485527)
2008/10/27 (alec) 2008/10/27 (alec)
---------- ----------
- Fix unread message unintentionally marked as read if read_when_deleted=true (#1485409) - Fix unread message unintentionally marked as read if read_when_deleted=true (#1485409)

@ -2670,12 +2670,14 @@ class rcube_imap
// subfolders of default folders to their place... // subfolders of default folders to their place...
// ...also do this for the rest of folders because // ...also do this for the rest of folders because
// asort() is not properly sorting case sensitive names // asort() is not properly sorting case sensitive names
// set the type of folder name variable (#1485527)
while (list($key, $folder) = each($folders)) { while (list($key, $folder) = each($folders)) {
$a_out[] = $folder; $a_out[] = (string) $folder;
unset($folders[$key]); unset($folders[$key]);
foreach ($folders as $idx => $f) { foreach ($folders as $idx => $f) {
if (strpos($f, $folder.$delimiter) === 0) { if (strpos($f, $folder.$delimiter) === 0) {
$a_out[] = $f; $a_out[] = (string) $f;
unset($folders[$idx]); unset($folders[$idx]);
} }
} }

@ -179,7 +179,7 @@ function json_serialize($var)
return $brackets{0} . implode(',', $pairs) . $brackets{1}; return $brackets{0} . implode(',', $pairs) . $brackets{1};
} }
} }
else if (is_numeric($var) && strval(intval($var)) === strval($var)) else if (!is_string($var) && strval(intval($var)) === strval($var))
return $var; return $var;
else if (is_bool($var)) else if (is_bool($var))
return $var ? '1' : '0'; return $var ? '1' : '0';

Loading…
Cancel
Save