From 9e6c8ab21752a3783e23c67131351507d0b40391 Mon Sep 17 00:00:00 2001 From: lkehresman Date: Thu, 27 Jan 2000 15:15:02 +0000 Subject: [PATCH] fixed some bugs in the way it got the folder separator git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@183 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/functions/imap.php b/functions/imap.php index a1876c77..190df98f 100644 --- a/functions/imap.php +++ b/functions/imap.php @@ -61,12 +61,17 @@ fputs($imapConnection, ". list \"\" \"\"\n"); $read = fgets($imapConnection, 1024); - $pos = strrpos($read, "\""); - $read = substr($read, 0, $pos); - - $pos = strrpos($read, "\""); - $read = substr($read, 0, $pos); + if (strrpos($read, "\"") == strlen($read)) { + $pos = strrpos($read, "\""); + $read = substr($read, 0, $pos); + $pos = strrpos($read, "\""); + $read = substr($read, 0, $pos); + } else { + $pos = strrpos($read, " "); + $read = substr($read, 0, $pos); + } + $pos = strrpos($read, "\""); $read = substr($read, 0, $pos); -- 2.25.1