mirror of
https://github.com/e107inc/e107.git
synced 2025-08-10 16:46:50 +02:00
Removed old deprecated global $e107_debug. Cleaned up debug_handler.php (e107_debug class)
This commit is contained in:
@@ -113,34 +113,34 @@ function deftrue($str, $default='')
|
||||
|
||||
function e107_include($fname)
|
||||
{
|
||||
global $e107_debug, $_E107;
|
||||
$ret = (($e107_debug || isset($_E107['debug']) || deftrue('e_DEBUG')) ? include($fname) : @include($fname));
|
||||
global $_E107;
|
||||
$ret = (isset($_E107['debug']) || deftrue('e_DEBUG')) ? include($fname) : @include($fname);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
function e107_include_once($fname)
|
||||
{
|
||||
global $e107_debug, $_E107;
|
||||
global $_E107;
|
||||
if(is_readable($fname))
|
||||
{
|
||||
$ret = ($e107_debug || isset($_E107['debug']) || deftrue('e_DEBUG')) ? include_once($fname) : @include_once($fname);
|
||||
$ret = (isset($_E107['debug']) || deftrue('e_DEBUG')) ? include_once($fname) : @include_once($fname);
|
||||
}
|
||||
return (isset($ret)) ? $ret : '';
|
||||
}
|
||||
|
||||
function e107_require_once($fname)
|
||||
{
|
||||
global $e107_debug, $_E107;
|
||||
global $_E107;
|
||||
|
||||
$ret = (($e107_debug || isset($_E107['debug']) || deftrue('e_DEBUG')) ? require_once($fname) : @require_once($fname));
|
||||
$ret = ((isset($_E107['debug']) || deftrue('e_DEBUG')) ? require_once($fname) : @require_once($fname));
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
function e107_require($fname)
|
||||
{
|
||||
global $e107_debug, $_E107;
|
||||
$ret = (($e107_debug || isset($_E107['debug']) || deftrue('e_DEBUG')) ? require($fname) : @require($fname));
|
||||
global $_E107;
|
||||
$ret = ((isset($_E107['debug']) || deftrue('e_DEBUG')) ? require($fname) : @require($fname));
|
||||
return $ret;
|
||||
}
|
||||
|
||||
@@ -539,14 +539,13 @@ class e_array {
|
||||
@eval($ArrayData);
|
||||
if (!isset($data) || !is_array($data))
|
||||
{
|
||||
trigger_error("Bad stored array data - <br /><br />".htmlentities($ArrayData), E_USER_ERROR);
|
||||
|
||||
if(e_DEBUG === true)
|
||||
{
|
||||
file_put_contents(e_LOG.'unserializeError_'.time().'.log', $sourceArrayData);
|
||||
}
|
||||
|
||||
return false;
|
||||
trigger_error("Bad stored array data - <br /><br />".htmlentities($ArrayData), E_USER_ERROR);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -653,16 +652,17 @@ class e_array {
|
||||
|
||||
return $this->read($content);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serialize and store data to a local file inside SYSTEM folder
|
||||
* @example e107::getArrayStorage()->store($arrayData, 'import/somefile'); // -> e_SYSTEM/import/somefile.php
|
||||
* @example e107::getArrayStorage()->store($arrayData, 'somefile', 'weird'); // -> e_SYSTEM/somefile.weird
|
||||
*
|
||||
* @param string $systemLocationFile relative to e_SYSTEM file path (without the extension)
|
||||
* @param string $extension [optional] file extension, default is 'php'
|
||||
* @return array|false when file not found (or on error)
|
||||
*/
|
||||
|
||||
/**
|
||||
* Serialize and store data to a local file inside SYSTEM folder
|
||||
* @example e107::getArrayStorage()->store($arrayData, 'import/somefile'); // -> e_SYSTEM/import/somefile.php
|
||||
* @example e107::getArrayStorage()->store($arrayData, 'somefile', 'weird'); // -> e_SYSTEM/somefile.weird
|
||||
*
|
||||
* @param array $array
|
||||
* @param string $systemLocationFile relative to e_SYSTEM file path (without the extension)
|
||||
* @param string $extension [optional] file extension, default is 'php'
|
||||
* @return array|false when file not found (or on error)
|
||||
*/
|
||||
public function store($array, $systemLocationFile, $extension = 'php')
|
||||
{
|
||||
if($extension) $extension = '.'.$extension;
|
||||
|
Reference in New Issue
Block a user