diff --git a/version.php b/version.php
index 086d595..a8b0f32 100644
--- a/version.php
+++ b/version.php
@@ -173,7 +173,9 @@ $versions = array(
);
foreach($versions as $row){
-foreach(glob("../{**/*,*}".$row[1], GLOB_BRACE) as $versionfile) && foreach(glob("../*".$row[1], GLOB_BRACE) as $versionfile) {
+
+// scripts installed in subdirectories/subdomains
+foreach(glob("../{**/*,*}".$row[1], GLOB_BRACE) as $versionfile){
$file = file_get_contents($versionfile);
$pattern = preg_quote($row[2], '/');
@@ -186,4 +188,19 @@ foreach(glob("../{**/*,*}".$row[1], GLOB_BRACE) as $versionfile) && foreach(glob
print_r ("location:".$versionfile);
}
}
+
+// fix for scripts installed in docroot
+foreach(glob("../".$row[1], GLOB_BRACE) as $versionfile) {
+ $file = file_get_contents($versionfile);
+ $pattern = preg_quote($row[2], '/');
+ $pattern = "/^.*$pattern.*\$/m";
+ if(preg_match_all($pattern, $file, $matches)){
+ echo "
";
+ echo "".$row[0]." found:
";
+ echo implode("
", $matches[0]);
+ echo "
";
+ print_r ("location:".$versionfile);
+ }
+ }
+
}