Changeset 6155 for sandbox/webservice/api
- Timestamp:
- 05/10/12 11:20:41 (12 years ago)
- Location:
- sandbox/webservice/api
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/webservice/api/Errors.php
r6150 r6155 28 28 29 29 30 const CATALOG_MIN_ARGUMENT_SEARCH = "1001"; 31 const MAIL_NOT_SENT = "1002"; 32 const MAIL_TRASH_NOT_CLEANED = "1003"; 33 const MAIL_MESSAGE_NOT_FOUND = "1004"; 30 const CATALOG_MIN_ARGUMENT_SEARCH = "1001"; 31 const MAIL_NOT_SENT = "1002"; 32 const MAIL_TRASH_NOT_CLEANED = "1003"; 33 const MAIL_MESSAGE_NOT_FOUND = "1004"; 34 const MAIL_INVALID_NEW_FOLDER_NAME = "1005"; 35 const MAIL_INVALID_OLD_FOLDER = "1006"; 36 const MAIL_INVALID_FOLDER = "1007"; 37 const MAIL_CANNOT_DEL_DEFAULT_FOLDER = "1008"; 38 const MAIL_FOLDER_NOT_EMPTY = "1009"; 39 const MAIL_FOLDER_NOT_RENAMED = "1010"; 40 const MAIL_FOLDER_NOT_ADDED = "1011"; 41 const MAIL_FOLDER_NOT_DELETED = "1012"; 34 42 35 43 static private $reservedErrors = array ( … … 47 55 static private $applicationErrors = array( 48 56 49 self::LOGIN_SUCCESS_LOGOUT => "You have been successfully logged out", 50 self::LOGIN_SESSION_EXPIRED => "Sorry, your login has expired", 51 self::LOGIN_NOT_LOGGED_IN => "You are not logged in", 52 self::LOGIN_COOKIES_REQUIRED => "Cookies are required to login to this site.", 53 self::LOGIN_BADLOGIN => "bad login or password", 54 self::LOGIN_PASSWORD_EXPIRED => "Your password has expired, and you do not have access to change it", 55 self::LOGIN_AUTH_INVALID => "Your auth is invalid", 56 self::LOGIN_SESSION_NOT_VERIFIED => "Your session could not be verified.", 57 self::LOGIN_ACCOUNT_EXPIRED => "Account is expired", 58 self::LOGIN_LOGIN_BLOCKED => "Blocked, too many attempts!", 59 self::LOGIN_INVALID_LOGIN => "Bad login or password", 60 self::CATALOG_MIN_ARGUMENT_SEARCH => "Your search argument must be longer than %1 characters.", 61 self::MAIL_NOT_SENT => "Your mail could not be sent.", 62 self::MAIL_TRASH_NOT_CLEANED => "Your trash folder could not be cleaned.", 63 self::MAIL_MESSAGE_NOT_FOUND => "Message not found in folder %1." 57 self::LOGIN_SUCCESS_LOGOUT => "You have been successfully logged out", 58 self::LOGIN_SESSION_EXPIRED => "Sorry, your login has expired", 59 self::LOGIN_NOT_LOGGED_IN => "You are not logged in", 60 self::LOGIN_COOKIES_REQUIRED => "Cookies are required to login to this site.", 61 self::LOGIN_BADLOGIN => "bad login or password", 62 self::LOGIN_PASSWORD_EXPIRED => "Your password has expired, and you do not have access to change it", 63 self::LOGIN_AUTH_INVALID => "Your auth is invalid", 64 self::LOGIN_SESSION_NOT_VERIFIED => "Your session could not be verified.", 65 self::LOGIN_ACCOUNT_EXPIRED => "Account is expired", 66 self::LOGIN_LOGIN_BLOCKED => "Blocked, too many attempts!", 67 self::LOGIN_INVALID_LOGIN => "Bad login or password", 68 self::CATALOG_MIN_ARGUMENT_SEARCH => "Your search argument must be longer than %1 characters.", 69 self::MAIL_NOT_SENT => "Your mail could not be sent.", 70 self::MAIL_TRASH_NOT_CLEANED => "Your trash folder could not be cleaned.", 71 self::MAIL_MESSAGE_NOT_FOUND => "Message not found in folder %1.", 72 self::MAIL_INVALID_NEW_FOLDER_NAME => "Invalid folder name.", 73 self::MAIL_INVALID_OLD_FOLDER => "Invalid old folder.", 74 self::MAIL_INVALID_FOLDER => "Invalid folder.", 75 self::MAIL_CANNOT_DEL_DEFAULT_FOLDER => "Cannot delete a default folder.", 76 self::MAIL_FOLDER_NOT_EMPTY => "The folder is not empty.", 77 self::MAIL_FOLDER_NOT_RENAMED => "The folder could not be renamed.", 78 self::MAIL_FOLDER_NOT_ADDED => "The folder could not be added.", 79 self::MAIL_FOLDER_NOT_DELETED => "The folder could not be deleted." 64 80 ); 65 81 … … 89 105 $error = Errors::get($code); 90 106 $message = ($responseException->getMessage() ? $responseException->getMessage() : $error['message']); 91 $body['error'] = array("code" => $code, "message" => $message);107 $body['error'] = array("code" => "$code", "message" => $message); 92 108 $response->body = json_encode($body); 93 109 return $response; -
sandbox/webservice/api/config/Tonic.srv
r6091 r6155 10 10 [/Mail/Folders] 11 11 FoldersResource = /mail/FoldersResource.php 12 13 [/Mail/RenameFolder] 14 RenameFolderResource = /mail/RenameFolderResource.php 15 16 [/Mail/AddFolder] 17 AddFolderResource = /mail/AddFolderResource.php 18 19 [/Mail/DelFolder] 20 DelFolderResource = /mail/DelFolderResource.php 12 21 13 22 [/Mail/Messages] -
sandbox/webservice/api/rest/dispatch.php
r6149 r6155 16 16 require_once(__DIR__."/mail/FoldersResource.php"); 17 17 require_once(__DIR__."/mail/MessagesResource.php"); 18 require_once(__DIR__."/mail/AddFolderResource.php"); 19 require_once(__DIR__."/mail/DelFolderResource.php"); 20 require_once(__DIR__."/mail/RenameFolderResource.php"); 18 21 require_once(__DIR__."/mail/CleanTrashResource.php"); 19 22 require_once(__DIR__."/mail/SendSupportFeedbackResource.php");
Note: See TracChangeset
for help on using the changeset viewer.