mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-02 22:28:37 +02:00
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:
parent
fa016ed6b9
commit
6dc8146a87
@ -121,7 +121,7 @@ class SSViewer {
|
|||||||
|
|
||||||
// flush template manifest cache if requested
|
// flush template manifest cache if requested
|
||||||
if (isset($_GET['flush']) && $_GET['flush'] == 'all') {
|
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();
|
self::flush_template_cache();
|
||||||
} else {
|
} else {
|
||||||
return Security::permissionFailure(null, 'Please log in as an administrator to flush the template cache.');
|
return Security::permissionFailure(null, 'Please log in as an administrator to flush the template cache.');
|
||||||
|
Loading…
Reference in New Issue
Block a user