From 71326abec1e65747d5765d8beaf1cf4be14f881c Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Sun, 20 May 2007 20:05:52 +0000 Subject: [PATCH] Armor maintenance script by testing for CLI. git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1080 48356398-32a2-884e-a903-53898d9a118a --- maintenance/generate-entity-file.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maintenance/generate-entity-file.php b/maintenance/generate-entity-file.php index 283650cd..8bf34a31 100644 --- a/maintenance/generate-entity-file.php +++ b/maintenance/generate-entity-file.php @@ -6,6 +6,11 @@ * writes the whole kaboodle to a file. The resulting file should be versioned. */ +if (php_sapi_name() != 'cli') { + echo 'Script cannot be called from web-browser.'; + exit; +} + chdir( dirname(__FILE__) ); // here's where the entity files are located, assuming working directory