projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
67a91b0
)
Asset.php
author
Alan Knowles
<alan@roojs.com>
Thu, 16 Aug 2018 00:42:20 +0000
(08:42 +0800)
committer
Alan Knowles
<alan@roojs.com>
Thu, 16 Aug 2018 00:42:20 +0000
(08:42 +0800)
Asset.php
patch
|
blob
|
history
diff --git
a/Asset.php
b/Asset.php
index
503a94e
..
b65dca0
100644
(file)
--- a/
Asset.php
+++ b/
Asset.php
@@
-36,10
+36,7
@@
class Pman_Core_Asset extends Pman {
function get($s='', $opts = Array())
{
function get($s='', $opts = Array())
{
- if(!empty($_REQUEST['_clear_cache'])) {
- $this->clearCompiledFilesCache();
- }
-
+
$this->sessionState(0);
$this->sessionState(0);
@@
-121,6
+118,10
@@
class Pman_Core_Asset extends Pman {
}
function post($s='') {
}
function post($s='') {
+ if(!empty($_REQUEST['_clear_cache'])) {
+ $this->clearCompiledFilesCache();
+ }
+
die('invalid');
}
die('invalid');
}
@@
-166,6
+167,12
@@
class Pman_Core_Asset extends Pman {
function clearCompiledFilesCache()
{
function clearCompiledFilesCache()
{
+ $au = $this->getAuthUser();
+ if (!$au && !in_array($_SERVER['REMOTE_ADDR'] , array('127.0.0.1','::1')) {
+ $this->jerr("Cache can only be cleared by authenticated users");
+ }
+
+
require_once 'System.php';
$mods = $this->modulesList();
require_once 'System.php';
$mods = $this->modulesList();