summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b13f8b4)
raw | patch | inline | side by side (parent: b13f8b4)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 May 2005 07:37:03 +0000 (07:37 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 May 2005 07:37:03 +0000 (07:37 +0000) |
include/functions.inc | patch | blob | history |
diff --git a/include/functions.inc b/include/functions.inc
index eea3f3a5e897060348cc995139a8184aef13c47f..293f7c9f65dd1770039196b1f2a7541d4becc26a 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
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)");
}
}