mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 17:04:14 +01:00
fixed creation of new folders with special chars
fixed renaming of folders
This commit is contained in:
parent
d9cb5ab88c
commit
e64c9f8545
@ -18,6 +18,7 @@
|
||||
function defaultimap($_profileData)
|
||||
{
|
||||
$this->profileData = $_profileData;
|
||||
if (function_exists('mb_convert_encoding')) $this->mbAvailable = TRUE;
|
||||
}
|
||||
|
||||
function addAccount($_hookValues)
|
||||
|
@ -51,13 +51,11 @@
|
||||
function listFolder()
|
||||
{
|
||||
// rename a mailbox
|
||||
if(isset($GLOBALS['HTTP_POST_VARS']['newMailboxName']))
|
||||
if(isset($_POST['newMailboxName']))
|
||||
{
|
||||
#print "rename to: ".$GLOBALS['HTTP_POST_VARS']['newMailboxName'];
|
||||
$oldMailboxName = $this->bofelamimail->sessionData['preferences']['mailbox'];
|
||||
$newMailboxName = $_POST['newMailboxName'];
|
||||
|
||||
$oldMailboxName = $this->selectedFolder;
|
||||
$newMailboxName = $GLOBALS['HTTP_POST_VARS']['newMailboxName'];
|
||||
|
||||
if($position = strrpos($oldMailboxName,'.'))
|
||||
{
|
||||
$newMailboxName = substr($oldMailboxName,0,$position+1).$newMailboxName;
|
||||
@ -73,7 +71,7 @@
|
||||
}
|
||||
|
||||
// delete a Folder
|
||||
if(isset($GLOBALS['HTTP_POST_VARS']['deleteFolder']) && $this->bofelamimail->sessionData['preferences']['mailbox'] != 'INBOX')
|
||||
if(isset($_POST['deleteFolder']) && $this->bofelamimail->sessionData['preferences']['mailbox'] != 'INBOX')
|
||||
{
|
||||
if($this->bofelamimail->imap_deletemailbox($this->bofelamimail->sessionData['preferences']['mailbox']))
|
||||
{
|
||||
@ -84,11 +82,11 @@
|
||||
}
|
||||
|
||||
// create a new Mailbox
|
||||
if(isset($GLOBALS['HTTP_POST_VARS']['newSubFolder']))
|
||||
if(isset($_POST['newSubFolder']))
|
||||
{
|
||||
$oldMailboxName = $this->bofelamimail->sessionData['preferences']['mailbox'].'.';
|
||||
$oldMailboxName = ($oldMailboxName == '--topfolderselected--.') ? '' : $oldMailboxName;
|
||||
$newMailboxName = $oldMailboxName.$GLOBALS['HTTP_POST_VARS']['newSubFolder'];
|
||||
$newMailboxName = $oldMailboxName.$_POST['newSubFolder'];
|
||||
|
||||
$this->bofelamimail->imap_createmailbox($newMailboxName,True);
|
||||
}
|
||||
@ -110,9 +108,9 @@
|
||||
$this->selectedFolder = $this->bofelamimail->sessionData['preferences']['mailbox'];
|
||||
|
||||
// (un)subscribe to a folder??
|
||||
if(isset($GLOBALS['HTTP_POST_VARS']['folderStatus']))
|
||||
if(isset($_POST['folderStatus']))
|
||||
{
|
||||
$this->bofelamimail->subscribe($this->selectedFolder,$GLOBALS['HTTP_POST_VARS']['folderStatus']);
|
||||
$this->bofelamimail->subscribe($this->selectedFolder,$_POST['folderStatus']);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user