Limit this to run only with the web server.

This commit is contained in:
FusionPBX
2022-07-08 14:21:29 -06:00
committed by GitHub
parent da181fc6f6
commit 767937260d

View File

@@ -107,9 +107,11 @@ class cache {
public function delete($key) {
//debug information
openlog("fusionpbx", LOG_PID | LOG_PERROR, LOG_LOCAL0);
syslog(LOG_WARNING, "debug: cache: [key: ".$key.", script: ".$_SERVER['SCRIPT_NAME'].", line: ".__line__."]");
closelog();
if (!defined('STDIN')) {
openlog("fusionpbx", LOG_PID | LOG_PERROR, LOG_LOCAL0);
syslog(LOG_WARNING, "debug: cache: [key: ".$key.", script: ".$_SERVER['SCRIPT_NAME'].", line: ".__line__."]");
closelog();
}
//cache method memcache
if ($_SESSION['cache']['method']['text'] == "memcache") {
@@ -173,9 +175,11 @@ class cache {
public function flush() {
//debug information
openlog("fusionpbx", LOG_PID | LOG_PERROR, LOG_LOCAL0);
syslog(LOG_WARNING, "debug: cache: [flush: all, script: ".$_SERVER['SCRIPT_NAME'].", line: ".__line__."]");
closelog();
if (!defined('STDIN')) {
openlog("fusionpbx", LOG_PID | LOG_PERROR, LOG_LOCAL0);
syslog(LOG_WARNING, "debug: cache: [flush: all, script: ".$_SERVER['SCRIPT_NAME'].", line: ".__line__."]");
closelog();
}
//cache method memcache
if ($_SESSION['cache']['method']['text'] == "memcache") {