mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 11:50:30 +02:00
Fixes #5091 Fixes PHP Notices/Warnings and sends some cron execution errors to error_log.
This commit is contained in:
@@ -698,7 +698,7 @@ define('SITETAG', $tp->toHTML($pref['sitetag'], false, 'emotes_off,defs'));
|
||||
define('SITEADMIN', $pref['siteadmin']);
|
||||
define('SITEADMINEMAIL', $pref['siteadminemail']);
|
||||
define('SITEDISCLAIMER', $tp->toHTML($pref['sitedisclaimer'], '', 'emotes_off,defs'));
|
||||
define('SITECONTACTINFO', $tp->toHTML($pref['sitecontactinfo'], true, 'emotes_off,defs'));
|
||||
define('SITECONTACTINFO', (!empty($pref['sitecontactinfo']) ? $tp->toHTML($pref['sitecontactinfo'], true, 'emotes_off,defs') : ''));
|
||||
define('SITEEMAIL', vartrue($pref['replyto_email'],$pref['siteadminemail']));
|
||||
define('USER_REGISTRATION', vartrue($pref['user_reg'],false)); // User Registration System Active or Not.
|
||||
define('e_DEVELOPER', $developerMode);
|
||||
|
@@ -1080,10 +1080,18 @@ class cronScheduler
|
||||
|
||||
if(!$valid)
|
||||
{
|
||||
if($this->debug)
|
||||
{
|
||||
error_log('e107: Invalid token used for cron class');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@file_put_contents(e_CACHE . 'cronLastLoad.php', time());
|
||||
if(!@file_put_contents(e_CACHE . 'cronLastLoad.php', time()))
|
||||
{
|
||||
error_log('e107: Unable to write to: '.e_CACHE . 'cronLastLoad.php. Permissions issue?');
|
||||
}
|
||||
|
||||
|
||||
// Get active cron jobs.
|
||||
$cron_jobs = $this->getCronJobs(true);
|
||||
@@ -1260,6 +1268,11 @@ class cronScheduler
|
||||
$pwd = str_replace('token=', '', $pwd);
|
||||
}
|
||||
|
||||
if($this->debug)
|
||||
{
|
||||
error_log("Cron Token: ".$pwd, E_NOTICE);
|
||||
}
|
||||
|
||||
if(empty($this->pref['e_cron_pwd']) || (varset($this->pref['e_cron_pwd']) != $pwd))
|
||||
{
|
||||
if(!empty($pwd))
|
||||
|
@@ -5027,7 +5027,14 @@ class e107
|
||||
|
||||
$path = dirname(self::getRelativePath(getcwd(), $target_path)) . "/";
|
||||
|
||||
$http_path = dirname($_SERVER['SCRIPT_NAME']);
|
||||
$SCRIPT_NAME = !empty($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : '';
|
||||
|
||||
if(empty($SCRIPT_NAME) && !empty($_SERVER['_']))
|
||||
{
|
||||
$SCRIPT_NAME = $_SERVER['_'];
|
||||
}
|
||||
|
||||
$http_path = dirname($SCRIPT_NAME);
|
||||
$http_path = explode("/", $http_path);
|
||||
for ($i = 0; $i < substr_count($path, "../"); $i ++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user