Commit 46661f44 authored by mku's avatar mku

ZP-329 #comment Merge contribution - BackendIMAP - special chars in folder...

ZP-329 #comment Merge contribution - BackendIMAP - special chars in folder name, optimized code  #time 20m

git-svn-id: https://z-push.org/svn/z-push/trunk@1566 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent d12061c5
...@@ -681,10 +681,11 @@ class BackendIMAP extends BackendDiff { ...@@ -681,10 +681,11 @@ class BackendIMAP extends BackendDiff {
/* BEGIN fmbiete's contribution r1527, ZP-319 */ /* BEGIN fmbiete's contribution r1527, ZP-319 */
// don't return the excluded folders // don't return the excluded folders
$notExcluded = true; $notExcluded = true;
for ($i = 0; $notExcluded && $i < count($this->excludedFolders); $i++) { for ($i = 0, $cnt = count($this->excludedFolders); $notExcluded && $i < $cnt; $i++) { // expr1, expr2 modified by mku ZP-329
if (strpos(strtolower($val->name), strtolower($this->excludedFolders[$i])) !== false) { // fix exclude folders with special chars by mku ZP-329
if (strpos(strtolower($val->name), strtolower(Utils::Utf7_iconv_encode(Utils::Utf8_to_utf7($this->excludedFolders[$i])))) !== false) {
$notExcluded = false; $notExcluded = false;
ZLog::Write(LOGLEVEL_DEBUG, "Pattern: <" . $this->excludedFolders[$i] . "> found, excluding folder: " . $val->name); ZLog::Write(LOGLEVEL_DEBUG, sprintf("Pattern: <%s> found, excluding folder: '%s'", $this->excludedFolders[$i], $val->name)); // sprintf added by mku ZP-329
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment