mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Prevent direct access to cron.php on CLI
This commit is contained in:
parent
9734473b49
commit
5e4b48f19b
1 changed files with 6 additions and 2 deletions
|
|
@ -4,14 +4,18 @@
|
||||||
* This script runs the task queue.
|
* This script runs the task queue.
|
||||||
*
|
*
|
||||||
* Unlike other scripts provided with Rhymix, it can be called
|
* Unlike other scripts provided with Rhymix, it can be called
|
||||||
* both on the command line and over the network.
|
* both on the CLI (through index.php) and over the network (directly).
|
||||||
*/
|
*/
|
||||||
define('RXQUEUE_CRON', true);
|
define('RXQUEUE_CRON', true);
|
||||||
|
|
||||||
// If called on the CLI, run additional checks.
|
// If called on the CLI, run additional checks.
|
||||||
if (PHP_SAPI === 'cli')
|
if (PHP_SAPI === 'cli')
|
||||||
{
|
{
|
||||||
require_once __DIR__ . '/common.php';
|
if (!defined('RX_VERSION'))
|
||||||
|
{
|
||||||
|
echo "Error: This script must not be called directly.\n";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue