mirror of
https://github.com/e107inc/e107.git
synced 2025-07-09 17:16:20 +02:00
Issue #5096 Cron tweaks
This commit is contained in:
8
cron.php
8
cron.php
@ -34,10 +34,12 @@ $_E107['no_menus'] = true;
|
|||||||
$_E107['allow_guest'] = true; // allow crons to run while in members-only mode.
|
$_E107['allow_guest'] = true; // allow crons to run while in members-only mode.
|
||||||
$_E107['no_maintenance'] = true;
|
$_E107['no_maintenance'] = true;
|
||||||
|
|
||||||
if ((PHP_SAPI === "apache" || PHP_SAPI === "litespeed") && $_E107['debug'] === false)
|
if ((PHP_SAPI === "apache" || PHP_SAPI === "litespeed"))
|
||||||
{
|
{
|
||||||
error_log("e107: cron.php was blocked from executing with PHP_SAPI: ".php_sapi_name(), E_USER_NOTICE);
|
if($_E107['debug'])
|
||||||
header('HTTP/1.0 403 Forbidden');
|
{
|
||||||
|
error_log("e107: cron.php was blocked from executing with PHP_SAPI: ".php_sapi_name());
|
||||||
|
}
|
||||||
echo "<h1>Access Denied</h1>";
|
echo "<h1>Access Denied</h1>";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ class cron_admin_ui extends e_admin_ui
|
|||||||
'cron_function' => array('title'=> LAN_CRON_2, 'type' => 'text', 'data'=>'str', 'width' => 'auto', 'thclass' => 'left first', 'readonly' => 1),
|
'cron_function' => array('title'=> LAN_CRON_2, 'type' => 'text', 'data'=>'str', 'width' => 'auto', 'thclass' => 'left first', 'readonly' => 1),
|
||||||
'cron_tab' => array('title'=> LAN_CRON_3, 'type' => 'method', 'width' => 'auto'), // Display name
|
'cron_tab' => array('title'=> LAN_CRON_3, 'type' => 'method', 'width' => 'auto'), // Display name
|
||||||
'cron_lastrun' => array('title'=> LAN_CRON_4, 'type' => 'datestamp', 'data' => 'int', 'width' => 'auto', 'readonly' => 2, 'readParms'=>['mask'=>'dd M yyyy hh:ii:ss']),
|
'cron_lastrun' => array('title'=> LAN_CRON_4, 'type' => 'datestamp', 'data' => 'int', 'width' => 'auto', 'readonly' => 2, 'readParms'=>['mask'=>'dd M yyyy hh:ii:ss']),
|
||||||
'cron_active' => array('title'=> LAN_ACTIVE, 'type' => 'boolean', 'data'=> 'int', 'thclass' => 'center', 'class'=>'center', 'filter' => true, 'batch' => true, 'width' => 'auto'),
|
'cron_active' => array('title'=> LAN_ACTIVE, 'type' => 'boolean', 'data'=> 'int', 'thclass' => 'center', 'class'=>'center', 'inline'=>true, 'filter' => true, 'batch' => true, 'width' => 'auto'),
|
||||||
'options' => array('title'=> LAN_OPTIONS, 'type' => 'method', 'data'=> null, 'noedit'=>TRUE, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'right')
|
'options' => array('title'=> LAN_OPTIONS, 'type' => 'method', 'data'=> null, 'noedit'=>TRUE, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'right')
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -412,7 +412,7 @@ class cron_admin_ui extends e_admin_ui
|
|||||||
$setpwd_message .= "<div style='margin-top:10px'><a rel='external' class='btn btn-primary' href='".e_HTTP."cpanel'>".LAN_CRON_60."</a></div>";
|
$setpwd_message .= "<div style='margin-top:10px'><a rel='external' class='btn btn-primary' href='".e_HTTP."cpanel'>".LAN_CRON_60."</a></div>";
|
||||||
|
|
||||||
}
|
}
|
||||||
$setpwd_message .= "<br /><br />".$frm->admin_button('generate_pwd', 1, 'delete', LAN_CRON_61 ,array('class'=>'btn btn-small'));
|
$setpwd_message .= "<br /><br />".$frm->admin_button('generate_pwd', 1, 'delete', LAN_CRON_61 ,array('class'=>'btn btn-sm'));
|
||||||
$setpwd_message .= $frm->close();
|
$setpwd_message .= $frm->close();
|
||||||
|
|
||||||
$mes->add($setpwd_message, E_MESSAGE_INFO);
|
$mes->add($setpwd_message, E_MESSAGE_INFO);
|
||||||
|
Reference in New Issue
Block a user