fixed version.php
This commit is contained in:
parent
beaf08cb13
commit
d2b47076af
19
version.php
19
version.php
@ -173,7 +173,9 @@ $versions = array(
|
|||||||
);
|
);
|
||||||
|
|
||||||
foreach($versions as $row){
|
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);
|
$file = file_get_contents($versionfile);
|
||||||
$pattern = preg_quote($row[2], '/');
|
$pattern = preg_quote($row[2], '/');
|
||||||
@ -186,4 +188,19 @@ foreach(glob("../{**/*,*}".$row[1], GLOB_BRACE) as $versionfile) && foreach(glob
|
|||||||
print_r ("location:".$versionfile);
|
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 "<br />";
|
||||||
|
echo "<strong>".$row[0]." found:</strong><br />";
|
||||||
|
echo implode("<br />", $matches[0]);
|
||||||
|
echo "<br />";
|
||||||
|
print_r ("location:".$versionfile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user