Merge pull request #23945 from eileenmcnaughton/map
[civicrm-core.git] / CRM / Admin / Form / Extensions.php
index 83fba1bdcb3e9e32c043e7b0f3a9813ffd9a1071..936f5a6f72c41ca492f96442ad6b3591042429be 100644 (file)
@@ -49,7 +49,10 @@ class CRM_Admin_Form_Extensions extends CRM_Admin_Form {
     if (!CRM_Utils_Type::validate($this->_key, 'ExtensionKey') && !empty($this->_key)) {
       throw new CRM_Core_Exception('Extension Key does not match expected standard');
     }
-    $this->label = $remoteExtensionRows[$this->_key]['label'] ?? $this->_key;
+
+    $name = $remoteExtensionRows[$this->_key]['label'] ?? $localExtensionRows[$this->_key]['label'] ?? NULL;
+    $this->label = $name ? sprintf('%s (<em>%s</em>)', htmlentities($name), htmlentities($this->_key))
+        : sprintf('<em>%s</em>', htmlentities($this->_key));
     $session = CRM_Core_Session::singleton();
     $url = CRM_Utils_System::url('civicrm/admin/extensions', 'reset=1&action=browse');
     $session->pushUserContext($url);