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

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102311 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-04-11 23:47:17 +00:00
parent fa016ed6b9
commit 6dc8146a87

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.');