diff --git a/upload/uc_server/plugin/filecheck/plugin.php b/upload/uc_server/plugin/filecheck/plugin.php index 7e7c77a4a2c0f30a8e25b6a935e97209779baa86..e3a1f12c536a722b8d872936711d7dec63fb1494 100644 --- a/upload/uc_server/plugin/filecheck/plugin.php +++ b/upload/uc_server/plugin/filecheck/plugin.php @@ -21,12 +21,18 @@ class control extends pluginbase { $applist = $_ENV['app']->get_apps(); $this->view->assign('applist', $applist); - $this->checkfiles('./', '\.php', 0, '\.php|\.xml'); - $this->checkfiles('control/', '\.php'); - $this->checkfiles('model/', '\.php'); - $this->checkfiles('lib/', '\.php'); + $this->checkfiles('./', '', 0); + $this->checkfiles('data/', '\.htm'); + $this->checkfiles('api/', '\.php|\.htm'); + $this->checkfiles('control/', '\.php|\.htm|\.md5', 1, 'ucfiles.md5'); + $this->checkfiles('model/', '\.php|\.htm'); + $this->checkfiles('lib/', '\.php|\.htm'); + $this->checkfiles('plugin/', '\.php|\.htm|\.xml'); + $this->checkfiles('upgrade/', '\.php'); + $this->checkfiles('images/', '\..+?'); + $this->checkfiles('js/', '\.js|\.htm'); + $this->checkfiles('release/', '\.php'); $this->checkfiles('view/', '\.php|\.htm'); - $this->checkfiles('js/', '\.js'); foreach($ucfiles as $line) { $file = trim(substr($line, 34)); @@ -103,11 +109,15 @@ class control extends pluginbase { while($entry = @readdir($dir)) { $file = $currentdir.$entry; - if($entry != '.' && $entry != '..' && (preg_match($exts, $entry) || $sub && is_dir($file)) && !in_array($entry, $skips)) { + if($entry != '.' && $entry != '..' && (($ext && preg_match($exts, $entry) || !$ext) || $sub && is_dir($file)) && !in_array($entry, $skips)) { if($sub && is_dir($file)) { $this->checkfiles($file.'/', $ext, $sub, $skip); } else { - $this->md5data[$file] = md5_file($file); + if(is_dir($file)) { + $this->md5data[$file] = md5($file); + } else { + $this->md5data[$file] = md5_file($file); + } } } }