Display version from composer.json even if not intstalled

pull/157/head
Thomas Bruederli 11 years ago
parent d5c3815c8c
commit ce6050cbbb

@ -284,6 +284,7 @@ class rcube_plugin_api
$composer = INSTALL_PATH . "/plugins/$plugin_name/composer.json"; $composer = INSTALL_PATH . "/plugins/$plugin_name/composer.json";
if (file_exists($composer) && ($json = @json_decode(file_get_contents($composer), true))) { if (file_exists($composer) && ($json = @json_decode(file_get_contents($composer), true))) {
list($info['vendor'], $info['name']) = explode('/', $json['name']); list($info['vendor'], $info['name']) = explode('/', $json['name']);
$info['version'] = $json['version'];
$info['license'] = $json['license']; $info['license'] = $json['license'];
if ($license_uri = $license_uris[$info['license']]) if ($license_uri = $license_uris[$info['license']])
$info['license_uri'] = $license_uri; $info['license_uri'] = $license_uri;

Loading…
Cancel
Save