- Changed helper and language autoload

- Changed language config
- Removed never used constants
- Changed rest_language in rest config file
- Adapted models that where extending FHC_Model
- Adapted code to load hlp_return_object
- Adapted code to use exit status codes constants
This commit is contained in:
Paolo
2019-04-25 12:09:31 +02:00
parent 1fe9a95236
commit 699aca74d1
18 changed files with 97 additions and 144 deletions
+11 -47
View File
@@ -2,47 +2,23 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| FH-Complete constants
|--------------------------------------------------------------------------
|
| These constants are used for internal messages. It are also be used
| and translated in the language files.
|
*/
define('FHC_SUCCESS', 0); // General Success Message
define('FHC_ERROR', 1); // General Error Message
define('FHC_MODEL_ERROR', 2); // Model Error
define('FHC_DB_ERROR', 3); // Database Error
define('FHC_NODBTABLE', 4); // No DB-Table is set
define('FHC_NORIGHT', 5); // No rights
define('FHC_INVALIDID', 6); // Invalid or no ID (key)
define('FHC_NOPK', 7); // No primary key
/*
|--------------------------------------------------------------------------
| Exit status codes
|--------------------------------------------------------------------------
|
| Used to indicate the conditions under which the script is exit()ing.
| While there is no universal standard for error codes, there are some
| broad conventions. Three such conventions are mentioned below, for
| those who wish to make use of them. The CodeIgniter defaults were
| chosen for the least overlap with these conventions, while still
| leaving room for others to be defined in future versions and user
| applications.
|
*/
define('EXIT_SUCCESS', 0); // no errors
define('EXIT_ERROR', 1); // generic error
define('EXIT_MODEL', 2); // model error
define('EXIT_CONFIG', 3); // configuration error
define('EXIT_UNKNOWN_FILE', 4); // file not found
define('EXIT_UNKNOWN_CLASS', 5); // unknown class
define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
define('EXIT_USER_INPUT', 7); // invalid user input
define('EXIT_DATABASE', 8); // database error
define('EXIT_SUCCESS', 0); // no errors
define('EXIT_ERROR', 1); // generic error
define('EXIT_MODEL', 2); // model error
define('EXIT_CONFIG', 3); // configuration error
define('EXIT_UNKNOWN_FILE', 4); // file not found
define('EXIT_UNKNOWN_CLASS', 5); // unknown class
define('EXIT_UNKNOWN_METHOD', 6); // unknown class method
define('EXIT_USER_INPUT', 7); // invalid user input
define('EXIT_DATABASE', 8); // database error
define('EXIT_VALIDATION_UDF', 10); // UDF validation has been failed
define('EXIT_VALIDATION_UDF_MIN_VALUE', 11); // UDF validation has been failed -> MIN VALUE
define('EXIT_VALIDATION_UDF_MAX_VALUE', 12); // UDF validation has been failed -> MAX VALUE
@@ -52,8 +28,8 @@ define('EXIT_VALIDATION_UDF_REGEX', 15); // UDF validation has been failed ->
define('EXIT_VALIDATION_UDF_REQUIRED', 16); // UDF validation has been failed -> REQUIRED
define('EXIT_VALIDATION_UDF_NOT_VALID_VAL', 17); // UDF validation has been failed -> Not valid value, object or array
define('EXIT_AUTO_MIN', 1000); // lowest automatically-assigned error code
define('EXIT_AUTO_MAX', 2000); // highest automatically-assigned error code
define('EXIT_AUTO_MIN', 1000); // lowest automatically-assigned error code
define('EXIT_AUTO_MAX', 2000); // highest automatically-assigned error code
/*
|--------------------------------------------------------------------------
@@ -158,18 +134,6 @@ define('PRIORITY_NORMAL', 2);
define('PRIORITY_HIGH', 3);
define('PRIORITY_URGENT', 4);
// Status return message codes
define('MSG_SUCCESS', 0);
define('MSG_ERROR', 1);
define('MSG_MESSAGE_SENT', 10);
define('MSG_STATUS_UPDATE', 11);
define('MSG_PARTICIPANT_ADDED', 30);
define('MSG_ERR_PARTICIPANT_EXISTS', 31);
define('MSG_ERR_PARTICIPANT_NONSYSTEM', 32);
define('MSG_PARTICIPANT_REMOVED', 33);
define('MSG_ERR_SUBJECT_EMPTY', 40);
define('MSG_ERR_BODY_EMPTY', 41);
define('MSG_ERR_TEMPLATE_NOT_FOUND', 42);