opensupports/server/data/ERRORS.php

225 lines
6.7 KiB
PHP
Raw Normal View History

<?php
2017-04-20 05:55:38 +02:00
/**
* @apiDefine INVALID_CREDENTIALS
* @apiError {String} INVALID_CREDENTIALS Login credentials does not match.
*/
/**
* @apiDefine SESSION_EXISTS
* @apiError {String} SESSION_EXISTS The session already exists.
*/
/**
* @apiDefine USER_EXISTS
* @apiError {String} USER_EXISTS The user already exists.
*/
/**
* @apiDefine NO_PERMISSION
* @apiError {String} NO_PERMISSION You have no permission to perform this operation.
*/
/**
* @apiDefine INVALID_TITLE
* @apiError {String} INVALID_TITLE The title is invalid, probably too short.
*/
/**
* @apiDefine INVALID_CONTENT
* @apiError {String} INVALID_CONTENT The content is invalid, probably to short.
*/
/**
* @apiDefine INVALID_EMAIL
* @apiError {String} INVALID_EMAIL The email is invalid or already exists.
*/
/**
* @apiDefine INVALID_PASSWORD
* @apiError {String} INVALID_PASSWORD The password is invalid, probably too short.
*/
/**
* @apiDefine INVALID_NAME
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_NAME The name is invalid, probably too short.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_SETTING
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_SETTING The setting are invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_DEPARTMENT
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_DEPARTMENT The dapartment is invalid, probably too short.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_TICKET
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_TICKET The ticket is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INIT_SETTINGS_DONE
2017-04-21 05:34:20 +02:00
* @apiError {String} INIT_SETTINGS_DONE The init settings are already done.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_OLD_PASSWORD
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_OLD_PASSWORD The old password is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_CAPTCHA
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_CAPTCHA The captcha is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_TICKET_EVENT
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_TICKET_EVENT The ticket event is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_LANGUAGE
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_LANGUAGE The language is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine TICKET_ALREADY_ASSIGNED
2017-04-21 05:34:20 +02:00
* @apiError {String} TICKET_ALREADY_ASSIGNED The ticket is already assigned.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_PRIORITY
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_PRIORITY The priority is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_PAGE
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_PAGE The page is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_QUERY
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_QUERY The query is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_TOPIC
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_TOPIC The topic is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_SEARCH
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_SEARCH The search is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_ORDER
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_ORDER The order is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_USER
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_USER The user is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine ALREADY_BANNED
2017-04-21 05:34:20 +02:00
* @apiError {String} ALREADY_BANNED It's already banned.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_LEVEL
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_LEVEL The level is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine ALREADY_A_STAFF
2017-04-21 05:34:20 +02:00
* @apiError {String} ALREADY_A_STAFF It's already a staff.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_STAFF
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_STAFF The staff is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine SAME_DEPARTMENT
2017-04-21 05:34:20 +02:00
* @apiError {String} SAME_DEPARTMENT It's the same department.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_TOKEN
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_TOKEN The token is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine UNVERIFIED_USER
2017-04-21 05:34:20 +02:00
* @apiError {String} UNVERIFIED_USER The user is not verified.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_TEMPLATE
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_TEMPLATE The template is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_SUBJECT
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_SUBJECT The subject is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_BODY
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_BODY The body is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine USER_SYSTEM_DISABLED
2017-04-21 05:34:20 +02:00
* @apiError {String} USER_SYSTEM_DISABLED The user system is disabled.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine SYSTEM_USER_IS_ALREADY_DISABLED
2017-04-21 05:34:20 +02:00
* @apiError {String} SYSTEM_USER_IS_ALREADY_DISABLED The system user is already disabled.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine SYSTEM_USER_IS_ALREADY_ENABLED
2017-04-21 05:34:20 +02:00
* @apiError {String} SYSTEM_USER_IS_ALREADY_ENABLED The system user is already enabled.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_PERIOD
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_PERIOD The period is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine NAME_ALREADY_USED
2017-04-21 05:34:20 +02:00
* @apiError {String} NAME_ALREADY_USED The name is already used.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_FILE
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_FILE The file is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine DATABASE_CONNECTION
2017-04-21 05:34:20 +02:00
* @apiError {String} DATABASE_CONNECTION It's a database connection error.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine DATABASE_CREATION
2017-04-21 05:34:20 +02:00
* @apiError {String} DATABASE_CREATION It's a database creation error.
2017-04-20 05:55:38 +02:00
*/
2017-06-10 09:17:54 +02:00
/**
* @apiDefine SMTP_CONNECTION
* @apiError {String} SMTP_CONNECTION Could not connect with SMTP server.
*/
2017-04-20 05:55:38 +02:00
class ERRORS {
const INVALID_CREDENTIALS = 'INVALID_CREDENTIALS';
const SESSION_EXISTS = 'SESSION_EXISTS';
const USER_EXISTS = 'USER_EXISTS';
const NO_PERMISSION = 'NO_PERMISSION';
const INVALID_TITLE = 'INVALID_TITLE';
const INVALID_CONTENT = 'INVALID_CONTENT';
const INVALID_EMAIL = 'INVALID_EMAIL';
const INVALID_PASSWORD = 'INVALID_PASSWORD';
const INVALID_NAME = 'INVALID_NAME';
const INVALID_SETTING = 'INVALID_SETTING';
const INVALID_DEPARTMENT = 'INVALID_DEPARTMENT';
const INVALID_TICKET = 'INVALID_TICKET';
const INIT_SETTINGS_DONE = 'INIT_SETTINGS_DONE';
const INVALID_OLD_PASSWORD = 'INVALID_OLD_PASSWORD';
const INVALID_CAPTCHA = 'INVALID_CAPTCHA';
2016-09-29 19:34:20 +02:00
const INVALID_TICKET_EVENT = 'INVALID_TICKET_EVENT';
const INVALID_LANGUAGE = 'INVALID_LANGUAGE';
const TICKET_ALREADY_ASSIGNED = 'TICKET_ALREADY_ASSIGNED';
const INVALID_PRIORITY = 'INVALID_PRIORITY';
const INVALID_PAGE = 'INVALID_PAGE';
const INVALID_QUERY = 'INVALID_QUERY';
2016-11-23 02:27:05 +01:00
const INVALID_TOPIC = 'INVALID_TOPIC';
2016-11-30 07:33:46 +01:00
const INVALID_SEARCH = 'INVALID_SEARCH';
const INVALID_ORDER = 'INVALID_ORDER';
2016-11-30 18:13:57 +01:00
const INVALID_USER = 'INVALID_USER';
const ALREADY_BANNED = 'ALREADY_BANNED';
2016-12-06 03:17:18 +01:00
const INVALID_LEVEL = 'INVALID_LEVEL';
const ALREADY_A_STAFF = 'ALREADY_A_STAFF';
2016-12-07 21:24:42 +01:00
const INVALID_STAFF = 'INVALID_STAFF';
const SAME_DEPARTMENT = 'SAME_DEPARTMENT';
const INVALID_TOKEN = 'INVALID_TOKEN';
const UNVERIFIED_USER = 'UNVERIFIED_USER';
const INVALID_TEMPLATE = 'INVALID_TEMPLATE';
const INVALID_SUBJECT = 'INVALID_SUBJECT';
const INVALID_BODY = 'INVALID_BODY';
const USER_SYSTEM_DISABLED = 'USER_SYSTEM_DISABLED';
const SYSTEM_USER_IS_ALREADY_DISABLED = 'SYSTEM_USER_IS_ALREADY_DISABLED';
const SYSTEM_USER_IS_ALREADY_ENABLED = 'SYSTEM_USER_IS_ALREADY_ENABLED';
const INVALID_PERIOD = 'INVALID_PERIOD';
const NAME_ALREADY_USED = 'NAME_ALREADY_USED';
const INVALID_FILE = 'INVALID_FILE';
const DATABASE_CONNECTION = 'DATABASE_CONNECTION';
const DATABASE_CREATION = 'DATABASE_CREATION';
2017-06-10 09:17:54 +02:00
const SMTP_CONNECTION = 'SMTP_CONNECTION';
}