summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 963482b)
raw | patch | inline | side by side (parent: 963482b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 28 May 2010 07:42:09 +0000 (07:42 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 28 May 2010 07:42:09 +0000 (07:42 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@18781 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/functions.inc | patch | blob | history | |
gosa-core/setup/class_setupStep_Feedback.inc | patch | blob | history | |
gosa-core/setup/setup_feedback.tpl | patch | blob | history |
index 200558212108ab700a64af7bba7b9a55d4d28e5a..d89d0fb22144dafb9c70a2eafd1948775554419b 100644 (file)
/*! \brief Evaluate the current GOsa version from the build in revision string */
function get_gosa_version()
{
- global $svn_revision, $svn_path;
+ global $svn_revision, $svn_path;
- /* Extract informations */
- $revision= preg_replace('/^[^0-9]*([0-9]+)[^0-9]*$/', '\1', $svn_revision);
+ /* Extract informations */
+ $revision= preg_replace('/^[^0-9]*([0-9]+)[^0-9]*$/', '\1', $svn_revision);
+
+ // Extract the relevant part out of the svn url
+ $release= preg_replace('%^.*/gosa/(.*)/include/functions.inc.*$%', '\1', $svn_path);
+
+ // Remove stuff which is not interesting
+ if(preg_match("/gosa-core/i", $release)) $release = preg_replace("/[\/]gosa-core/i","",$release);
+
+ // A Tagged Version
+ if(preg_match("#/tags/#i", $svn_path)){
+ $release = preg_replace("/tags[\/]*/i","",$release);
+ $release = preg_replace("/\//","",$release) ;
+ return (sprintf(_("GOsa %s"),$release));
+ }
+
+ // A Branched Version
+ if(preg_match("#/branches/#i", $svn_path)){
+ $release = preg_replace("/branches[\/]*/i","",$release);
+ $release = preg_replace("/\//","",$release) ;
+ return (sprintf(_("GOsa %s snapshot (Rev %s)"),$release , $revision));
+ }
+
+ // The trunk version
+ if(preg_match("#/trunk/#i", $svn_path)){
+ return (sprintf(_("GOsa development snapshot (Rev %s)"), $revision));
+ }
- /* Release or development? */
- if (preg_match('%/gosa/trunk/%', $svn_path)){
- return (sprintf(_("GOsa development snapshot (Rev %s)"), $revision));
- } else {
- $release= preg_replace('%^.*/([^/]+)/include/functions.inc.*$%', '\1', $svn_path);
return (sprintf(_("GOsa $release"), $revision));
- }
}
diff --git a/gosa-core/setup/class_setupStep_Feedback.inc b/gosa-core/setup/class_setupStep_Feedback.inc
index 23c670a1d0c8a8a4b964dc40b3cfa65f885ef09f..b2a6d17f6ea6c7ad91c304af3db7e8184f076a4c 100644 (file)
$smarty->assign("feedback_send",$this->feedback_send);
$smarty->assign("years",$years);
$smarty->assign("features_used",$this->features_used);
+ $smarty->assign("gosa_version",get_gosa_version());
$smarty->assign("additional_info", reverse_html_entities($additional_info));
$smarty->assign ("must", "<font class=\"must\">*</font>");
return($smarty->fetch(get_template_path("setup_feedback.tpl",TRUE,dirname(__FILE__))));
$str .="\nDistribution: ".$this->distribution;
$str .="\nWeb Server: ".$this->web_server;
$str .="\nPHP_Version: ".$this->php_version;
+ $str .="\nGOsa_Version: ".strip_tags(get_gosa_version());
$str .="\nLDAP Server: ".$this->ldap_server;
$str .="\nObject count: ".$this->object_count;
$str .="\nMissing features: ".($this->want_to_see_next);
index eb326bad09e61eed256ea5b6350a4c71ec3693dd..453760c19768662c72383bafe9c7226646e15526 100644 (file)
<input type='text' size=50 name='php_version' value='{$php_version}'>
</td>
</tr>
+ <tr>
+ <td style='vertical-align:top'>
+ {t}GOsa version{/t}</td>
+ </td>
+ <td>
+ {$gosa_version}
+ </td>
+ </tr>
</table>
<br><b>{t}LDAP{/t}</b>