mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 06:57:03 +03:00
Add copy message functionality to drag&drop (drag + shift) [#42]
+ Update jquery to 1.10.2
This commit is contained in:
parent
74af8f793a
commit
f22b90dbe3
16 changed files with 318 additions and 201 deletions
|
|
@ -4316,6 +4316,40 @@ class Actions
|
|||
'' === $sHash ? false : array($sFromFolder, $sHash));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*
|
||||
* @throws \MailSo\Base\Exceptions\Exception
|
||||
*/
|
||||
public function DoMessageCopy()
|
||||
{
|
||||
$this->initMailClientConnection();
|
||||
|
||||
$sFromFolder = $this->GetActionParam('FromFolder', '');
|
||||
$sToFolder = $this->GetActionParam('ToFolder', '');
|
||||
$aUids = explode(',', (string) $this->GetActionParam('Uids', ''));
|
||||
|
||||
$aFilteredUids = array_filter($aUids, function (&$mUid) {
|
||||
$mUid = (int) trim($mUid);
|
||||
return 0 < $mUid;
|
||||
});
|
||||
|
||||
try
|
||||
{
|
||||
$this->MailClient()->MessageCopy($sFromFolder, $sToFolder,
|
||||
$aFilteredUids, true);
|
||||
|
||||
$sHash = $this->MailClient()->FolderHash($sFromFolder);
|
||||
}
|
||||
catch (\Exception $oException)
|
||||
{
|
||||
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantCopyMessage, $oException);
|
||||
}
|
||||
|
||||
return $this->DefaultResponse(__FUNCTION__,
|
||||
'' === $sHash ? false : array($sFromFolder, $sHash));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sFileName
|
||||
* @param string $sContentType
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue