summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBogomil Shopov <bogomil@efb.bg>2011-05-11 11:34:29 (GMT)
committerBogomil Shopov <bogomil@efb.bg>2011-05-11 11:34:29 (GMT)
commit327962055608c278c6d2bb449f8d0b5afc0437b1 (patch)
treed0d0ddede3a10f1aaa4116aa55afd6aa2f0830a6
parente5a23d13eb59edcd6c0d1e98ae131d6c219d718a (diff)
downloadkolab-webadmin-327962055608c278c6d2bb449f8d0b5afc0437b1.tar.gz
Fixing subfolders issue: https://bugzilla.kolabsys.com/show_bug.cgi?id=98
-rwxr-xr-xwww/admin/user/activesync.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/www/admin/user/activesync.php b/www/admin/user/activesync.php
index dfc25a8..ebce78a 100755
--- a/www/admin/user/activesync.php
+++ b/www/admin/user/activesync.php
@@ -215,16 +215,22 @@ function __construct()
//remove Inbox/ part from the name
$folder_chunk=explode("/",$folder);
- //if if only inbox/ show it
- if($folder_chunk[1]!=""){
+ //if it's only inbox/ show it
+
+
+ if($folder_chunk[1]!="" and count($folder_chunk)==2 and $folder_chunk[0]=="INBOX"){
//else is inbox/somepart - show only somepart
$folder=$folder_chunk[1];
- }if($folder_chunk[2]!="")
+ }if($folder_chunk[2]!="" and count($folder_chunk)==3 and $folder_chunk[0]=="user")
{
//user folder
- $folder="(".$folder_chunk[1].") ".$folder_chunk[2];
- }
+ $folder="(".$folder_chunk[1].") ".$folder_chunk[2];
+ }else
+ {
+ $folder= preg_replace(array('/INBOX\//','/\//'),array('','/'),$folder);
+
+ }
//for saving annot
$part_folder[]=$folders[$i]['realname'];