From 8118d1294ecc7a2a1dfe4fe7dd335e5358a5bd83 Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 12 May 2005 07:37:03 +0000 Subject: [PATCH] Made devel/release code work git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@191 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/functions.inc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/functions.inc b/include/functions.inc index eea3f3a5e..293f7c9f6 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -1494,14 +1494,18 @@ function validate($string) function get_gosa_version() { /* Variables filled in by subversion */ - $svn_path = "$HeadURL$"; - $svn_revision = "$Revision$"; + $svn_path = '$HeadURL$'; + $svn_revision = '$Revision$'; + + /* Extract informations */ + $revision= preg_replace('/^[^0-9]*([0-9]+)[^0-9]*$/', '\1', $svn_revision); /* Release or development? */ if (preg_match('%/gosa/trunk/%', $svn_path)){ - return ("Development snapshot (rev $svn_revision)"); + return ("GOsa development snapshot (Rev $revision)"); } else { - return ("Release $releaase (rev $svn_revision)"); + $release= preg_replace('%^.*/([^/]+)/include/functions.inc.*$%', '\1', $svn_path); + return ("GOsa $release (Rev $revision)"); } } -- 2.30.2