From: Michael M Slusarz Date: Wed, 29 Jul 2009 21:48:26 +0000 (-0600) Subject: Add Horde_Registry::getVersion() X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0b325770cb41412c1059ad6f823173a42118c6c8;p=horde.git Add Horde_Registry::getVersion() --- diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index 6d3f3faa3..00c3fbe50 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -1032,6 +1032,24 @@ class Horde_Registry } /** + * Return the version string for a given application. + * + * @param string $app The application to get the value for. + * + * @return string The version string for the application. + */ + public function getVersion($app = null) + { + if (is_null($app)) { + $app = $this->getApp(); + } + + require_once $this->get('fileroot', $app) . '/lib/version.php'; + + return constant(strtoupper($app) . '_VERSION'); + } + + /** * Function to work out an application's graphics URI, optionally taking * into account any themes directories that may be set up. *