浏览代码

Merge pull request #1 from fusionpbx/master

Updating my fork from fusionpbx master
mbarvoipdrs 4 年之前
父节点
当前提交
db76a8734f
共有 2 个文件被更改,包括 7 次插入5 次删除
  1. 7 5
      resources/classes/cache.php
  2. 0 0
      resources/login.php

+ 7 - 5
resources/classes/cache.php

@@ -145,11 +145,13 @@ class cache {
 					event_socket_request($fp, $event);
 
 				//remove the local files
-					if (file_exists($_SESSION['cache']['location']['text'] . "/" . $key)) {
-						unlink($_SESSION['cache']['location']['text'] . "/" . $key);
-					}
-					if (file_exists($_SESSION['cache']['location']['text'] . "/" . $key . ".tmp")) {
-						unlink($_SESSION['cache']['location']['text'] . "/" . $key . ".tmp");
+					foreach (glob($_SESSION['cache']['location']['text'] . "/" . $key) as $file) {
+						if (file_exists($file)) {
+							unlink($file);
+						}
+						if (file_exists($file)) {
+							unlink($file . ".tmp");
+						}
 					}
 			}
 

文件差异内容过多而无法显示
+ 0 - 0
resources/login.php


部分文件因为文件数量过多而无法显示