From 845166729a72279ab352601309e6bf5cd0c804ca Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Sat, 28 Jul 2012 15:01:40 -0500 Subject: [PATCH] Disabled admin scripts in main/cron/ to avoid excess load --- main/cron/img/list_used_img.php | 2 +- main/cron/lang/langstats.php | 1 + main/cron/lang/list_undefined_langvars.php | 2 +- main/cron/lang/list_unused_langvars.php | 2 +- main/cron/notification.php | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/main/cron/img/list_used_img.php b/main/cron/img/list_used_img.php index 5daf2d52c6..33d0413a31 100644 --- a/main/cron/img/list_used_img.php +++ b/main/cron/img/list_used_img.php @@ -6,7 +6,7 @@ /** * Includes and declarations */ -//if (PHP_SAPI!='cli') { die('Run this script through the command line or comment this line in the code'); } +if (PHP_SAPI!='cli') { die('Run this script through the command line or comment this line in the code'); } require_once '../../inc/global.inc.php'; $path = api_get_path(SYS_CODE_PATH).'img/'; ini_set('memory_limit','128M'); diff --git a/main/cron/lang/langstats.php b/main/cron/lang/langstats.php index 3bcb4c7682..95005cb1cc 100644 --- a/main/cron/lang/langstats.php +++ b/main/cron/lang/langstats.php @@ -9,6 +9,7 @@ /** * Requires */ +die(); require_once '../../inc/global.inc.php'; require_once 'langstats.class.php'; /** diff --git a/main/cron/lang/list_undefined_langvars.php b/main/cron/lang/list_undefined_langvars.php index d3a62d5af6..b0d12e977f 100644 --- a/main/cron/lang/list_undefined_langvars.php +++ b/main/cron/lang/list_undefined_langvars.php @@ -6,7 +6,7 @@ /** * Includes and declarations */ -//if (PHP_SAPI!='cli') { die('Run this script through the command line or comment this line in the code'); } +die(); require_once '../../inc/global.inc.php'; require_once api_get_path(SYS_CODE_PATH).'admin/sub_language.class.php'; $path = api_get_path(SYS_LANG_PATH).'english'; diff --git a/main/cron/lang/list_unused_langvars.php b/main/cron/lang/list_unused_langvars.php index adacc62749..0b816661cc 100644 --- a/main/cron/lang/list_unused_langvars.php +++ b/main/cron/lang/list_unused_langvars.php @@ -6,7 +6,7 @@ /** * Includes and declarations */ -//if (PHP_SAPI!='cli') { die('Run this script through the command line or comment this line in the code'); } +die(); require_once '../../inc/global.inc.php'; require_once api_get_path(SYS_CODE_PATH).'admin/sub_language.class.php'; $path = api_get_path(SYS_LANG_PATH).'english'; diff --git a/main/cron/notification.php b/main/cron/notification.php index 8be52f691e..bf479b736e 100644 --- a/main/cron/notification.php +++ b/main/cron/notification.php @@ -7,6 +7,7 @@ /** * Initialization */ +if (PHP_SAPI!='cli') { die('Run this script through the command line or comment this line in the code'); } $language_file = array('userInfo'); require_once '../inc/global.inc.php';