summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7f62c53)
raw | patch | inline | side by side (parent: 7f62c53)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 13 Jun 2008 10:46:34 +0000 (10:46 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 13 Jun 2008 10:46:34 +0000 (10:46 +0000) |
-It uses a checksum now.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11330 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11330 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/contrib/gosa.conf | patch | blob | history | |
gosa-core/include/class_config.inc | patch | blob | history | |
gosa-core/setup/class_setupStep_Finish.inc | patch | blob | history |
index 7f85a31e2a3921abbd3a5c6370b65562877bd7b0..2539a72c60285bafcdff25df3e61b9eeb8dcd08a 100644 (file)
{literal}<?xml version="1.0"?>{/literal}
-<conf config_version="{$get_gosa_version}" >
+<conf config_version="{$config_checksum}" >
<menu>
<section name="My account">
<plugin acl="users/generic" class="user" />
index 8001926bbbdfcf5221470710755c41de9d72c83f..ebb2e73ec0059154773e8e8e767ba1d5817621b4 100644 (file)
function check_config_version()
{
-
- $current = get_gosa_version();
-
/* Skip check, if we've already mentioned the mismatch
*/
if(session::is_set("LastChecked") && session::get("LastChecked") == $this->config_version) return;
*/
session::set("LastChecked",$this->config_version);
- if(preg_match("/\(Rev[^\)]*\)/",$current)){
-
- /* Development Version
- */
- $c_v = preg_replace("/^.*\(Rev ([0-9]*)\).*$/","\\1",$current);
- $g_v = preg_replace("/^.*\(Rev ([0-9]*)\).*$/","\\1",$this->config_version);
- if($c_v != $g_v){
-# msg_dialog::display(_("Configuration"),_("The configuration file you are using seems to be outdated. Please move the GOsa configuration file away to run the GOsa setup again."));
- }
- }else{
+ $current = md5(file_get_contents(CONFIG_TEMPLATE_DIR."/gosa.conf"));
- /* Tagged version
- */
- if($this->config_version != $current){
- msg_dialog::display(_("Configuration"),_("The configuration file you are using seems to be outdated. Please move the GOsa configuration file away to run the GOsa setup again."));
- }
+ /* Check contributed config version and current config version.
+ */
+ if($this->config_version != $current && !empty($this->config_version)){
+ msg_dialog::display(_("Configuration"),_("The configuration file you are using seems to be outdated. Please move the GOsa configuration file away to run the GOsa setup again."));
}
}
diff --git a/gosa-core/setup/class_setupStep_Finish.inc b/gosa-core/setup/class_setupStep_Finish.inc
index bb69bce6c7c370ecbf0f61787b60bae0fa02fd22..b32aeea049697a10e08822e2b61bd9514a2f3564 100644 (file)
{
$smarty = get_smarty();
$smarty->assign("cv",xmlentities($this->parent->captured_values));
- $smarty->assign("get_gosa_version",get_gosa_version());
+ $smarty->assign("config_checksum", md5(file_get_contents(CONFIG_TEMPLATE_DIR.$this->gosa_conf_contrib)));
$str = $smarty->fetch(CONFIG_TEMPLATE_DIR.$this->gosa_conf_contrib);
return($str);
}
$info= posix_getgrgid(posix_getgid());
$webgroup = $info['name'];
-
-
+
/* Check if there is currently an active gosa.conf
*/
$exists = file_exists(CONFIG_DIR."/".CONFIG_FILE);