forked from ictinnovations/ictcore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
51 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ | |
* Mail : [email protected] * | ||
* *************************************************************** */ | ||
|
||
use ICT\Core\Corelog; | ||
|
||
$filename = $_GET["name"]; | ||
$path = "file/document/"; | ||
$pathThumbs = $path . "thumbs/"; | ||
|
@@ -29,5 +27,5 @@ | |
$images->clear(); | ||
$images->destroy(); | ||
} catch (Exception $e) { | ||
Corelog::log($e->getMessage(), Corelog::ERROR); | ||
echo $e->getMessage(); | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,32 +9,34 @@ | |
* Mail : [email protected] * | ||
* *************************************************************** */ | ||
|
||
use Exception; | ||
use ICT\Core\Conf; | ||
use ICT\Core\CoreException; | ||
use ICT\Core\Corelog; | ||
|
||
class Conffile extends Conf | ||
/* | ||
* NOTE: no log in following file, cos this file will be executed before log setup | ||
*/ | ||
|
||
class File extends Conf | ||
{ | ||
|
||
public static function load($file_path) | ||
public static $config_file = '/etc/ictcore.conf'; | ||
|
||
public static function load($file_path = NULL) | ||
{ | ||
global $path_etc; | ||
$configSource = is_file($file_path) ? $file_path : self::$config_file; | ||
|
||
//reading configuration file. | ||
//in success result is $ict_conf array. | ||
$configSource = is_file($file_path) ? $file_path : $path_etc . '/ictcore.conf'; | ||
|
||
if (is_file($configSource)) { | ||
$configuration = parse_ini_file($configSource, TRUE); | ||
Corelog::log("configuration file loaded", Corelog::DEBUG, $configuration); | ||
if (!is_array($configuration)) { | ||
throw new CoreException('500', "Bad configuration file: $configSource"); | ||
throw new Exception("Bad configuration file: $configSource", '500'); | ||
} | ||
} else { | ||
throw new CoreException('500', "No configuration file found: $configSource"); | ||
throw new Exception("No configuration file found: $configSource", '500'); | ||
} | ||
|
||
parent::load($configuration); | ||
self::$config_file = $configSource; | ||
parent::merge($configuration); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ | |
* Mail : [email protected] * | ||
* *************************************************************** */ | ||
|
||
use ICT\Core\Conf\File as ConfFile; | ||
use ICT\Core\Conf\System as SystemConfiguration; | ||
|
||
global $path_lib, $path_core, $path_root, $path_www, $path_etc, $path_log, $path_data, $website_log; | ||
|
||
// following lines will allow to include files from both core and lib directories | ||
|
@@ -26,18 +29,15 @@ | |
// For Classes | ||
$loader = require dirname($path_core) . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; | ||
|
||
/* Include all required libraries | ||
These library will responsible to provide commonly requrired functions | ||
/* Include required libraries | ||
These library will be responsible to provide commonly requrired functions | ||
*/ | ||
include_once "common.php"; // common functions | ||
include_once "Corelog.php"; // library for logging (order is important) | ||
include_once "conf.php"; // library for gui / framework configuration | ||
include_once "config.php"; // library for gateway / backend configuration | ||
include_once "db.php"; // library for database management | ||
include_once "session.php"; // library for session management | ||
include_once "CoreException.php"; // library for error | ||
// include_once "CoreThread.php"; // Multi Threading support for selected functions | ||
|
||
// Read database and other basic configuration from configuration file | ||
ConfFile::load('/etc/ictcore.conf'); | ||
|
||
// Corelog will be our default error handler | ||
set_error_handler(array('ICT\\Core\\Corelog', 'error_handler'), E_ALL); | ||
|
||
$website_host = Conf::get('website:host', '127.0.0.1'); | ||
|
@@ -50,7 +50,7 @@ | |
date_default_timezone_set('UTC'); // required to bypass server timezone settings | ||
|
||
/* Connecting, selecting database */ | ||
$ict_db_link = DB::connect(); | ||
DB::connect(); | ||
|
||
/* load default system configuration from database */ | ||
conf_system_load(); | ||
SystemConfiguration::load(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters