mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-24 02:12:17 +00:00
Merge branch 'ci' of https://github.com/FH-Complete/FHC-Core into ci
This commit is contained in:
@@ -508,14 +508,10 @@ $config['proxy_ips'] = '';
|
||||
| Autoload Custom Controllers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
Don't work so sometime delete this*/
|
||||
function __autoload($class)
|
||||
{
|
||||
| It's working, so don't delete this :D
|
||||
*/
|
||||
spl_autoload_register(function ($class) {
|
||||
if (substr($class,0,3) !== 'CI_' && substr($class,0,4) !== 'FHC_')
|
||||
{
|
||||
if (file_exists($file = APPPATH . 'core/' . $class . '.php'))
|
||||
{
|
||||
require_once $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (file_exists($file = APPPATH . 'core/' . $class . '.php'))
|
||||
require_once $file;
|
||||
});
|
||||
|
||||
@@ -1,6 +1,24 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR 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
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| File and Directory Modes
|
||||
@@ -75,6 +93,7 @@ define('SHOW_DEBUG_BACKTRACE', TRUE);
|
||||
*/
|
||||
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
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
|
||||
$config['fhc_version'] = '3.2';
|
||||
|
||||
|
||||
// status return message codes
|
||||
define('FHC_SUCCESS', 0);
|
||||
define('FHC_ERR_GENERAL', 1);
|
||||
$config['fhc_acl'] = array
|
||||
(
|
||||
'public.tbl_person' => 'basis/person',
|
||||
'public.tbl_prestudent' => 'basis/person',
|
||||
'public.tbl_organisationseinheit' => 'basis/organisationseinheit'
|
||||
,
|
||||
'public.tbl_sprache' => 'admin'
|
||||
);
|
||||
|
||||
@@ -119,7 +119,8 @@ $config['rest_auth'] = 'basic';
|
||||
|
|
||||
| Is login required and if so, the user store to use
|
||||
|
|
||||
| '' Use config based users or wildcard testing
|
||||
| '' Use config based users or wildcard testing, only for testing purpose
|
||||
| it would be very unsecure to let unset in a production environment
|
||||
| 'ldap' Use LDAP authentication
|
||||
| 'library' Use a authentication library
|
||||
|
|
||||
@@ -139,13 +140,16 @@ $config['auth_source'] = 'library';
|
||||
| In other cases override the function _perform_library_auth in your controller
|
||||
|
|
||||
| For digest authentication the library function should return already a stored
|
||||
| md5(username:restrealm:password) for that username
|
||||
|
|
||||
| e.g: md5('admin:REST API:1234') = '1e957ebc35631ab22d5bd6526bd14ea2'
|
||||
| password for that username, even if it is hashed
|
||||
|
|
||||
*/
|
||||
$config['auth_library_class'] = 'FHC_Auth';
|
||||
$config['auth_library_function'] = 'auth';
|
||||
|
||||
// rest_auth is basic
|
||||
$config['auth_library_function'] = 'basicAuthentication';
|
||||
|
||||
// rest_auth is digest
|
||||
//$config['auth_library_function'] = 'digestAuthentication';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -211,7 +215,7 @@ $config['auth_override_class_method_http']['Kontakt']['kontaktPerson']['get'] =
|
||||
| Array of usernames and passwords for login, if ldap (even library) is configured this is ignored
|
||||
|
|
||||
*/
|
||||
$config['rest_valid_logins'] = ['admin' => '1234', 'test' => 'test'];
|
||||
//$config['rest_valid_logins'] = ['admin' => '1234', 'test' => 'test'];
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -228,7 +232,7 @@ $config['rest_valid_logins'] = ['admin' => '1234', 'test' => 'test'];
|
||||
| restrict certain methods to IPs in your whitelist
|
||||
|
|
||||
*/
|
||||
$config['rest_ip_whitelist_enabled'] = TRUE;
|
||||
$config['rest_ip_whitelist_enabled'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Template configuration
|
||||
|--------------------------------------------------------------------------
|
||||
| This file will contain the settings for the template library.
|
||||
|
|
||||
| 'parser' = if you want your main template file to be parsed, set to TRUE
|
||||
| 'template' = the filename of the default template file
|
||||
| 'cache_ttl' = the time all partials should be cache in seconds, 0 means no global caching
|
||||
*/
|
||||
|
||||
$config['parser'] = FALSE;
|
||||
$config['template'] = 'template';
|
||||
$config['cache_ttl'] = 0;
|
||||
Reference in New Issue
Block a user