BUGFIX: SSViewer now allows cli to do a flush on non-dev environments

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@102300 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Mark Stephens 2010-04-11 21:24:47 +00:00 committed by Sam Minnee
parent b305efe172
commit 4568ac057d

View File

@ -121,7 +121,7 @@ class SSViewer {
// flush template manifest cache if requested
if (isset($_GET['flush']) && $_GET['flush'] == 'all') {
if(Director::isDev() || Permission::check('ADMIN')) {
if(Director::isDev() || Director::is_cli() || Permission::check('ADMIN')) {
self::flush_template_cache();
} else {
return Security::permissionFailure(null, 'Please log in as an administrator to flush the template cache.');