From dd71c53a4dad41d582f0c8caaceefb2ea24fd080 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sun, 11 Nov 2007 02:54:36 +0000 Subject: [PATCH] allowing textcollector for non-admins in CLI-mode (needed for auto-updating) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44574 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/i18n.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/i18n.php b/core/i18n.php index 08f698cfd..df2f75f50 100755 --- a/core/i18n.php +++ b/core/i18n.php @@ -1268,8 +1268,11 @@ class i18n extends Controller { * and write the resultant files in the lang folder of each module. */ public function textcollector() { - - if (!Permission::check("ADMIN")) user_error("You must be an admin to enable text collector mode", E_USER_ERROR); + // allows textcollector to run in CLI without admin-check + if(!Permission::check("ADMIN") && !Director::is_cli()) { + user_error("You must be an admin or use CLI-mode to enable text collector", E_USER_ERROR); + } + echo "Collecting text...

"; //Calculate base directory