Esempio n. 1
0
 /**
  * @return array
  */
 public function AjaxFolderRename()
 {
     $sPrevFolderFullNameRaw = (string) $this->getParamValue('PrevFolderFullNameRaw', '');
     $sNewFolderNameInUtf8 = trim($this->getParamValue('NewFolderNameInUtf8', ''));
     if (0 === strlen($sPrevFolderFullNameRaw) || 0 === strlen($sNewFolderNameInUtf8)) {
         throw new \ProjectCore\Exceptions\ClientException(\ProjectCore\Notifications::InvalidInputParameter);
     }
     $oAccount = $this->getAccountFromParam();
     $mResult = $this->oApiMail->renameFolder($oAccount, $sPrevFolderFullNameRaw, $sNewFolderNameInUtf8);
     return $this->DefaultResponse($oAccount, __FUNCTION__, 0 < strlen($mResult) ? array('FullName' => $mResult, 'FullNameHash' => md5($mResult)) : false);
 }