- Timestamp:
- 05/11/12 10:38:02 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/webservice/api/rest/mail/RenameFolderResource.php
r6155 r6165 12 12 13 13 if(!$this->getImap()->folder_exists($old_id)) 14 throw new ResponseException("",Errors::MAIL_INVALID_OLD_FOLDER);14 Errors::runException("MAIL_INVALID_OLD_FOLDER"); 15 15 16 16 $default_folders = array_keys($this->defaultFolders); 17 17 if(in_array($old_id, $default_folders)) 18 throw new ResponseException("",Errors::MAIL_INVALID_OLD_FOLDER);18 Errors::runException("MAIL_INVALID_OLD_FOLDER"); 19 19 20 20 if(empty($new_name) || preg_match('/[\/\\\!\@\#\$\%\&\*\(\)]/', $new_name)) 21 throw new ResponseException("",Errors::MAIL_INVALID_NEW_FOLDER_NAME);21 Errors::runException("MAIL_INVALID_NEW_FOLDER_NAME"); 22 22 23 23 $old_id_arr = explode($this->getImap()->imap_delimiter, $old_id); … … 30 30 $result = $this->getImap()->ren_mailbox($params); 31 31 if($result != 'Ok') 32 throw new ResponseException("",Errors::MAIL_FOLDER_NOT_RENAMED);32 Errors::runException("MAIL_FOLDER_NOT_RENAMED"); 33 33 } 34 34
Note: See TracChangeset
for help on using the changeset viewer.