fixes & patterns

This commit is contained in:
Palma Solutions LTD
2018-04-15 10:00:54 +02:00
parent 132d0c36e2
commit fb03289e34
3 changed files with 8 additions and 5 deletions

View File

@@ -130,7 +130,8 @@ $versions = array(
array("Agora Cart", "/agora.cgi", "\/versions\/"),
array("CKeditor", "/ckeditor/CHANGES.html", "CKEditor Changelog"),
array("Dokeos", "main/inc/installedVersion.inc.php", "\$dokeos_version"),
array("CakePHP","cake/config/config.php","\$config['Cake.version'] ="),
// still need to work on these
array("CubeCart", "/index.php", "CubeCart v"), // may need one more line
array("Soholaunch", "/index.php", "\#\# Soholaunch\(R\) Site Management Tool"), // needs two more lines
@@ -280,7 +281,7 @@ foreach(glob("../{**/*,*}".$rxw[1], GLOB_BRACE) as $versionfilex){
// fix for scripts installed in docroot
foreach(glob("../".$raw[1], GLOB_BRACE) as $versionfilex) {
foreach(glob("../".$rxw[1], GLOB_BRACE) as $versionfilex) {
$file = file_get_contents($versionfilex);
$pattern1 = preg_quote($rxw[2], '/');
$pattern2 = preg_quote($rxw[3], '/');
@@ -288,7 +289,7 @@ foreach(glob("../".$raw[1], GLOB_BRACE) as $versionfilex) {
$pattern = "/^.*$pattern1.*\$|^.*$pattern2.*\$|^.*$pattern3.*\$/m";
if(preg_match_all($pattern, $file, $matches)){
echo "<br />";
echo "<strong>".$raw[0]." found:</strong><br />";
echo "<strong>".$rxw[0]." found:</strong><br />";
echo implode("<br />", $matches[0]);
echo "<br />";
print_r ("location:".$versionfilex);