mirror of
https://github.com/cytopia/devilbox.git
synced 2025-03-10 22:44:11 +00:00
Merge pull request #406 from cytopia/intranet-drush-versions
#401 Fix display of drush versions
This commit is contained in:
commit
0188970367
@ -48,9 +48,19 @@ if (loadClass('Helper')->isLoggedIn()) {
|
||||
$_GET['software'] => (($version = loadClass('Php')->getDrupalConsoleVersion()) !== false) ? $version : $no
|
||||
));
|
||||
}
|
||||
else if ($_GET['software'] == 'drush') {
|
||||
else if ($_GET['software'] == 'drush7') {
|
||||
echo json_encode(array(
|
||||
$_GET['software'] => (($version = loadClass('Php')->getDrushVersion()) !== false) ? $version : $no
|
||||
$_GET['software'] => (($version = loadClass('Php')->getDrushVersion(7)) !== false) ? $version : $no
|
||||
));
|
||||
}
|
||||
else if ($_GET['software'] == 'drush8') {
|
||||
echo json_encode(array(
|
||||
$_GET['software'] => (($version = loadClass('Php')->getDrushVersion(8)) !== false) ? $version : $no
|
||||
));
|
||||
}
|
||||
else if ($_GET['software'] == 'drush9') {
|
||||
echo json_encode(array(
|
||||
$_GET['software'] => (($version = loadClass('Php')->getDrushVersion(9)) !== false) ? $version : $no
|
||||
));
|
||||
}
|
||||
else if ($_GET['software'] == 'git') {
|
||||
|
@ -391,8 +391,16 @@ $HEALTH_PERCENT = 100 - ceil(100 * $HEALTH_FAILS / $HEALTH_TOTAL);
|
||||
<td id="app_drupalc"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>drush</th>
|
||||
<td id="app_drush"></td>
|
||||
<th>drush7</th>
|
||||
<td id="app_drush7"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>drush8</th>
|
||||
<td id="app_drush8"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>drush9</th>
|
||||
<td id="app_drush9"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>git</th>
|
||||
@ -907,7 +915,9 @@ $HEALTH_PERCENT = 100 - ceil(100 * $HEALTH_FAILS / $HEALTH_TOTAL);
|
||||
}
|
||||
updateVersions('composer');
|
||||
updateVersions('drupalc');
|
||||
updateVersions('drush');
|
||||
updateVersions('drush7');
|
||||
updateVersions('drush8');
|
||||
updateVersions('drush9');
|
||||
updateVersions('git');
|
||||
updateVersions('laravel');
|
||||
updateVersions('mds');
|
||||
|
@ -45,9 +45,9 @@ class Php extends BaseClass implements BaseInterface
|
||||
$output = loadClass('Helper')->exec('composer --version', $output);
|
||||
return loadClass('Helper')->egrep('/[0-9.]+/', $output);
|
||||
}
|
||||
public function getDrushVersion()
|
||||
public function getDrushVersion($version)
|
||||
{
|
||||
$output = loadClass('Helper')->exec('drush --version', $output);
|
||||
$output = loadClass('Helper')->exec('drush'.$version.' --version', $output);
|
||||
return loadClass('Helper')->egrep('/[0-9.]+/', $output);
|
||||
}
|
||||
public function getDrupalConsoleVersion()
|
||||
|
Loading…
x
Reference in New Issue
Block a user