- improved finding location/version for phpmyadmin
- changed all logging to use verbose - implemented verbosity level 2, which prints all versions found (recent ones too)
This commit is contained in:
@@ -30,7 +30,9 @@ function checkHost($host, $cake_current) {
|
||||
$location = substr($parts[0], 0, strlen($parts[0])-16);
|
||||
$version = $parts[1];
|
||||
if($version < $cake_current) {
|
||||
echo "WARNING: Outdated CakePHP $version at $hostidentifier$location\n";
|
||||
verbose("WARNING: Outdated CakePHP $version at $hostidentifier$location", 0);
|
||||
} else {
|
||||
verbose("Recent CakePHP $version at $hostidentifier$location", 2);
|
||||
}
|
||||
}
|
||||
unset($results);
|
||||
|
||||
@@ -66,7 +66,11 @@ function checkHost($host, $dr_current) {
|
||||
$location = substr($parts[0], 0, strlen($parts[0])-23);
|
||||
if(substr($parts[1], 0, 16) == "define('VERSION'") {
|
||||
$version = substr($parts[1], 19, strpos($parts[1], "'", 19)-19);
|
||||
if($version < $dr_current) echo "WARNING: Outdated Drupal $version at $host:$location\n";
|
||||
if($version < $dr_current) {
|
||||
verbose("WARNING: Outdated Drupal $version at $host:$location", 0);
|
||||
} else {
|
||||
verbose("Recent Drupal $version at $host:$location", 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($results);
|
||||
|
||||
@@ -18,7 +18,7 @@ if($hosts != null) {
|
||||
}
|
||||
|
||||
function checkHost($host, $pma_current) {
|
||||
$cmd = "locate libraries/Config.class.php | xargs grep -H 'PMA_VERSION' | grep set";
|
||||
$cmd = "locate libraries/Config.class.php | xargs grep -H \"'PMA_VERSION'\" | grep set";
|
||||
$hostidentifier = "localhost:";
|
||||
if( $host != null ) {
|
||||
$cmd = "ssh $host \"" . $cmd . "\"";
|
||||
@@ -28,10 +28,13 @@ function checkHost($host, $pma_current) {
|
||||
foreach($results as $instance) {
|
||||
$parts = explode(':', $instance);
|
||||
$location = substr($parts[0], 0, strlen($parts[0])-26);
|
||||
preg_match("/->set\('PMA_VERSION', '([0-9\.a-z]+)'\);/", $parts[1], $matches);
|
||||
$version = $matches[1];
|
||||
if($version < $pma_current) {
|
||||
echo "WARNING: Outdated PHPMyAdmin $version at $hostidentifier$location\n";
|
||||
if(preg_match("/->set\('PMA_VERSION', '([0-9\.a-z]+)'\);/", $parts[1], $matches)) {
|
||||
$version = $matches[1];
|
||||
if($version < $pma_current) {
|
||||
verbose("WARNING: Outdated PHPMyAdmin $version at $hostidentifier$location", 0);
|
||||
} else {
|
||||
verbose("Recent PHPMyAdmin $version at $hostidentifier$location", 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($results);
|
||||
|
||||
@@ -29,7 +29,9 @@ function checkHost($host, $wp_current) {
|
||||
preg_match("/wp_version = '([0-9]+\.[0-9]+(\.[0-9]+)?)';/", $parts[1], $matches);
|
||||
$version = $matches[1];
|
||||
if($version < $wp_current) {
|
||||
echo "WARNING: Outdated Wordpress $version at $hostidentifier$location\n";
|
||||
verbose("WARNING: Outdated Wordpress $version at $hostidentifier$location", 0);
|
||||
} else {
|
||||
verbose("Recent Wordpress $version at $hostidentifier$location", 2);
|
||||
}
|
||||
}
|
||||
unset($results);
|
||||
|
||||
Reference in New Issue
Block a user