|
@@ -107,9 +107,11 @@ class cache {
|
|
|
public function delete($key) {
|
|
|
|
|
|
//debug information
|
|
|
- openlog("fusionpbx", LOG_PID | LOG_PERROR);
|
|
|
- syslog(LOG_WARNING, "debug: cache: [key: ".$key.", script: ".$_SERVER['SCRIPT_NAME'].", line: ".__line__."]");
|
|
|
- closelog();
|
|
|
+ if (isset($_SESSION['cache']['syslog']['boolean']) && $_SESSION['cache']['syslog']['boolean'] == "true") {
|
|
|
+ openlog("fusionpbx", LOG_PID | LOG_PERROR, LOG_USER);
|
|
|
+ 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);
|
|
|
- syslog(LOG_WARNING, "debug: cache: [flush: all, script: ".$_SERVER['SCRIPT_NAME'].", line: ".__line__."]");
|
|
|
- closelog();
|
|
|
+ if (isset($_SESSION['cache']['syslog']['boolean']) && $_SESSION['cache']['syslog']['boolean'] == "true") {
|
|
|
+ openlog("fusionpbx", LOG_PID | LOG_PERROR, LOG_USER);
|
|
|
+ syslog(LOG_WARNING, "debug: cache: [flush: all, script: ".$_SERVER['SCRIPT_NAME'].", line: ".__line__."]");
|
|
|
+ closelog();
|
|
|
+ }
|
|
|
|
|
|
//cache method memcache
|
|
|
if ($_SESSION['cache']['method']['text'] == "memcache") {
|