diff --git a/amp_conf/bin/module_admin b/amp_conf/bin/module_admin index d305df6743..ecb2518d41 100755 --- a/amp_conf/bin/module_admin +++ b/amp_conf/bin/module_admin @@ -550,6 +550,10 @@ function showInfo($modulename) { } +function updateKeys() { + FreePBX::GPG()->refreshKeys(); +} + function showList($online = false) { global $amp_conf; $modulef =& module_functions::create(); @@ -567,7 +571,7 @@ function showList($online = false) { } ksort($modules); - $modulef->getAllSignatures(false); + $modulef->getAllSignatures(($online ? false : true), $online); outn(str_pad("Module", 20)); outn(str_pad("Version", 18)); @@ -785,6 +789,9 @@ chdir ( $amp_conf["AMPWEBROOT"] . "/admin/" ); switch ($operation ) { + case 'updateKeys': + updateKeys(); + break; case 'checkdepends': if (empty($param)) { fatal("Missing module name"); diff --git a/amp_conf/htdocs/admin/libraries/modulefunctions.class.php b/amp_conf/htdocs/admin/libraries/modulefunctions.class.php index 47bf366ebc..7fe52719a2 100644 --- a/amp_conf/htdocs/admin/libraries/modulefunctions.class.php +++ b/amp_conf/htdocs/admin/libraries/modulefunctions.class.php @@ -2871,7 +2871,7 @@ function getSignature($modulename,$cached=true) { * Get all Cached Signatures, update if it doesnt exist * @param {bool} $cached=true Whether to use cached data or not */ - function getAllSignatures($cached=true) { + function getAllSignatures($cached=true, $online = false) { FreePBX::GPG(); //declare class to get constants $sql = "SELECT modulename, signature FROM modules"; $sth = FreePBX::Database()->prepare($sql); @@ -2882,7 +2882,7 @@ function getAllSignatures($cached=true) { // String below, if i18n'ed, must be identical to that in GPG class. // Read the comment there. $amportal = FreePBX::Config()->get('AMPSBIN')."/amportal "._("altered"); - if(!$cached) { + if(!$cached && $online) { FreePBX::GPG()->refreshKeys(); } foreach($res as $mod) {