From: cajus Date: Thu, 12 May 2005 07:24:00 +0000 (+0000) Subject: Removed version stuff which was CVS dependent X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=688775f5c9d2c042e85d486f430f50c6635499c1;p=gosa.git Removed version stuff which was CVS dependent git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@189 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/html/index.php b/html/index.php index 88ae90bfd..9ced14d67 100644 --- a/html/index.php +++ b/html/index.php @@ -228,9 +228,6 @@ $smarty->assign ("server_id", $selected); /* show login screen */ $smarty->display (get_template_path('headers.tpl')); -if (isset($_GET['version'])){ - require_once("version.inc"); -} $smarty->assign ("PHPSESSID", session_id()); if (isset($_SESSION['errors'])){ $smarty->assign("errors", $_SESSION['errors']); diff --git a/html/main.php b/html/main.php index f39467376..839bdcd61 100644 --- a/html/main.php +++ b/html/main.php @@ -27,7 +27,6 @@ function raiseError($errno, $errstr, $errfile, $errline) //set_error_handler('raiseError'); /* This will be removed */ - /* Basic setup, remove eventually registered sessions */ $timing= array(); require_once ("../include/php_setup.inc"); @@ -231,9 +230,6 @@ if (isset($plug)){ $smarty->assign ("plug", ""); } $smarty->display(get_template_path('headers.tpl')); -if (isset($_GET['version'])){ - require_once("version.inc"); -} /* React on clicks */ if ($_SERVER["REQUEST_METHOD"] == "POST"){ diff --git a/include/functions.inc b/include/functions.inc index 549362443..eea3f3a5e 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -1491,9 +1491,19 @@ function validate($string) return (strip_tags(preg_replace('/\0/', '', $string))); } +function get_gosa_version() +{ + /* Variables filled in by subversion */ + $svn_path = "$HeadURL$"; + $svn_revision = "$Revision$"; - - + /* Release or development? */ + if (preg_match('%/gosa/trunk/%', $svn_path)){ + return ("Development snapshot (rev $svn_revision)"); + } else { + return ("Release $releaase (rev $svn_revision)"); + } +} // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?> diff --git a/include/version.inc b/include/version.inc deleted file mode 100644 index b1efca856..000000000 --- a/include/version.inc +++ /dev/null @@ -1,19 +0,0 @@ - diff --git a/plugins/generic/welcome/main.inc b/plugins/generic/welcome/main.inc index c0c5f2675..6f7a0d49d 100644 --- a/plugins/generic/welcome/main.inc +++ b/plugins/generic/welcome/main.inc @@ -26,4 +26,6 @@ if (!$remove_lock){ $display= $smarty->fetch(get_template_path('welcome.tpl', TRUE)); } +echo get_gosa_version(); + ?>