Use <plugin>_info() function if at all possible instead of <plugin>_version()
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 2 Feb 2007 23:16:38 +0000 (23:16 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 2 Feb 2007 23:16:38 +0000 (23:16 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12215 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/bug_report/system_specs.php

index a98e28336d307a4adee65f7fb837607695cd042a..1dd36d9377618e975058449219f71af425d90aa5 100644 (file)
@@ -59,7 +59,15 @@ function br_show_plugins() {
             if ($key != 0 || $value != '') {
                 $str .= "    * $key = $value";
                 // add plugin version
-                if (function_exists($value . '_version')) {
+                $version_found = FALSE;
+                if (function_exists($value . '_info')) {
+                    $info = call_user_func($value . '_info');
+                    if (!empty($info['version'])) {
+                        $str .= ' ' . $info['version'];
+                        $version_found = TRUE;
+                    }
+                }
+                if (!$version_found && function_exists($value . '_version')) {
                     $str.= ' ' . call_user_func($value . '_version');
                 }
                 $str.="\n";