Use compatibility_info() function if at all possible instead of compatibility_version()
[squirrelmail.git] / plugins / bug_report / system_specs.php
index 1dd36d9..8a46a45 100644 (file)
@@ -78,8 +78,16 @@ function br_show_plugins() {
             && ! in_array('compatibility',$plugins)) {
             $str.= '    * compatibility';
             include_once(SM_PATH . 'plugins/compatibility/setup.php');
-            if (function_exists('compatibility_version')) {
-                $str.= ' ' . call_user_func('compatibility_version');
+            $version_found = FALSE;
+            if (function_exists('compatibility_info')) {
+                $info = compatibility_info();
+                if (!empty($info['version'])) {
+                    $str .= ' ' . $info['version'];
+                    $version_found = TRUE;
+                }
+            }
+            if (!$version_found && function_exists('compatibility_version')) {
+                $str.= ' ' . compatibility_version();
             }
             $str.="\n";
         }