changed the format for the version flags so that each app can have their own app version dumped into the new array

This commit is contained in:
seek3r 2000-12-21 20:43:26 +00:00
parent ae23b3fc29
commit 55b0109618
12 changed files with 28 additions and 28 deletions

View File

@ -48,7 +48,7 @@
/* This is used to control mcrypt's use */
$phpgw_info["server"]["mcrypt_enabled"] = __ENABLE_MCRYPT__;
/* Set this to "old" for versions < 2.4, otherwise the exact mcrypt version you use. */
$phpgw_info["server"]["mcrypt_version"] = "__MCRYPT_VERSION__";
$phpgw_info["server"]["versions"]["mcrypt"] = "__MCRYPT_VERSION__";
/* This is a random string used as the initilazation vector for mcrypt
feel free to change it when setting up phpgroupware on a clean database,
@ -80,7 +80,7 @@
\**************************************************************************/
$phpgw_info["server"]["api_inc"] = $phpgw_info["server"]["include_root"]."/phpgwapi/inc";
include($phpgw_info["server"]["server_root"]."/version.inc.php");
$phpgw_info["server"]["header_version"] = "1.7";
$phpgw_info["server"]["versions"]["header"] = "1.8";
// This is a fix for NT
if (!isset($phpgw_info["flags"]["noapi"]) ||
!$phpgw_info["flags"]["noapi"] == True){

View File

@ -81,7 +81,7 @@
$phpgw->db->query("select app_version from applications where app_name='admin'",__LINE__,__FILE__);
$phpgw->db->next_record();
if ($phpgw_info["server"]["version"] > $phpgw->db->f("app_version")) {
if ($phpgw_info["server"]["versions"]["phpgwapi"] > $phpgw->db->f("app_version")) {
echo "<p><b>" . lang("Your are running a newer version of phpGroupWare then your database is setup for")
. "<br>" . lang("It is recommend that you run setup to upgrade your tables to the current version")
. "</b>";
@ -103,7 +103,7 @@
$line_found = explode(":",chop($lines[$i]));
}
}
if ($line_found[1] > $phpgw_info["server"]["version"]) {
if ($line_found[1] > $phpgw_info["server"]["versions"]["phpgwapi"]) {
echo "<p>There is a new version of phpGroupWare avaiable. <a href=\""
. "http://www.phpgroupware.org\">http://www.phpgroupware.org</a>";
}

View File

@ -155,7 +155,7 @@
$tmpl->set_var("cookie",show_cookie());
$tmpl->set_var("lang_username","username");
$tmpl->set_var("lang_phpgw_login","phpGroupWare login");
$tmpl->set_var("version",$phpgw_info["server"]["version"]);
$tmpl->set_var("version",$phpgw_info["server"]["versions"]["phpgwapi"]);
$tmpl->set_var("lang_password","password");
$tmpl->set_var("lang_login","login");

View File

@ -33,7 +33,7 @@
echo "<Table Width=100% Border=0 CellPadding=0 CellSpacing=0 BGColor=".$phpgw_info["theme"]["navbar_bg"].">\n";
echo " <TR><TD>";
echo "<P><P>\n" . lang("Powered by phpGroupWare version x",
$phpgw_info["server"]["version"]) . "<br>\n";
$phpgw_info["server"]["versions"]["phpgwapi"]) . "<br>\n";
echo "</TD>";
if ($phpgw_info["flags"]["parent_page"])
echo "<td align=\"right\"><a href=\"".$phpgw->link($phpgw_info["flags"]["parent_page"])."\">".lang("up")."</a></td>";

View File

@ -24,7 +24,7 @@
/**************************************************************************\
* Quick verification of updated header.inc.php *
\**************************************************************************/
if ($phpgw_info["server"]["header_version"] != $phpgw_info["server"]["current_header_version"]){
if ($phpgw_info["server"]["versions"]["header"] != $phpgw_info["server"]["versions"]["current_header"]){
echo "You need to port your settings to the new header.inc.php version.";
}

View File

@ -517,7 +517,7 @@
$tpl->set_var("td_align","left");
$tpl->set_var("td_width","");
$tpl->set_var("tr_color",$phpgw_info["theme"]["bg_color"]);
$tpl->set_var("value",lang("Powered by phpGroupWare version x",$phpgw_info["server"]["version"]));
$tpl->set_var("value",lang("Powered by phpGroupWare version x",$phpgw_info["server"]["versions"]["phpgwapi"]));
$tpl->set_var("colspan",$colspan);
$tpl->parse("navbar_columns","navbar_column");
$tpl->parse("navbar_rows","navbar_row",True);
@ -531,7 +531,7 @@
$tpl->set_var("td_align","left");
$tpl->set_var("td_width","");
$tpl->set_var("tr_color",$phpgw_info["theme"]["bg_color"]);
$tpl->set_var("value",lang("Powered by phpGroupWare version x",$phpgw_info["server"]["version"]));
$tpl->set_var("value",lang("Powered by phpGroupWare version x",$phpgw_info["server"]["versions"]["phpgwapi"]));
$tpl->set_var("colspan",1);
$tpl->parse("navbar_columns","navbar_column");

View File

@ -20,7 +20,7 @@
global $phpgw, $phpgw_info;
if ($phpgw_info["server"]["mcrypt_enabled"] && extension_loaded("mcrypt")) {
if ($phpgw_info["server"]["mcrypt_version"] == "old") {
if ($phpgw_info["server"]["versions"]["mcrypt"] == "old") {
$this->td = false;
if (PHP_VERSION > "4.0.2pl1") {
$keysize = mcrypt_get_key_size(MCRYPT_TRIPLEDES);
@ -49,7 +49,7 @@
for ($i = 0; $i < $keysize; $i++) {
$this->key .= $key[$i % $x];
}
if ($phpgw_info["server"]["mcrypt_version"] != "old") {
if ($phpgw_info["server"]["versions"]["mcrypt"] != "old") {
mcrypt_generic_init ($this->td, $this->key, $this->iv);
}
}
@ -61,7 +61,7 @@
global $phpgw_info;
if ($phpgw_info["server"]["mcrypt_enabled"] && extension_loaded("mcrypt")) {
if ($phpgw_info["server"]["mcrypt_version"] != "old") {
if ($phpgw_info["server"]["versions"]["mcrypt"] != "old") {
mcrypt_generic_end ($this->td);
}
}
@ -79,7 +79,7 @@
// Disable all encryption if the admin didn't set it up
if ($phpgw_info["server"]["mcrypt_enabled"] && extension_loaded("mcrypt")) {
switch ($phpgw_info["server"]["mcrypt_version"]) {
switch ($phpgw_info["server"]["versions"]["mcrypt"]) {
// The old code, only works with mcrypt <= 2.2.x
case "old": {
$encrypteddata = mcrypt_cbc(MCRYPT_TripleDES, $this->key, $data, MCRYPT_ENCRYPT);
@ -104,7 +104,7 @@
if ($phpgw_info["server"]["mcrypt_enabled"] && extension_loaded("mcrypt")) {
$data = $this->hex2bin($encrypteddata);
switch ($phpgw_info["server"]["mcrypt_version"]) {
switch ($phpgw_info["server"]["versions"]["mcrypt"]) {
// The old code, only works with mcrypt <= 2.2.x
case "old": {
$data = mcrypt_cbc(MCRYPT_TripleDES, $this->key, $data, MCRYPT_DECRYPT);

View File

@ -18,7 +18,7 @@
if(file_exists("../version.inc.php") || is_file("../version.inc.php")) {
include("../version.inc.php"); // To set the current core version
}else{
$phpgw_info["server"]["version"] = "Undetected";
$phpgw_info["server"]["versions"]["phpgwapi"] = "Undetected";
}
$phpgw_info["server"]["app_images"] = "templates/default/images";
@ -37,7 +37,7 @@
<BODY BGCOLOR="FFFFFF" margintop="0" marginleft="0" marginright="0" marginbottom="0">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td align="left" bgcolor="486591">&nbsp;<font color="fefefe">phpGroupWare version '.$phpgw_info["server"]["version"].' setup</font>
<td align="left" bgcolor="486591">&nbsp;<font color="fefefe">phpGroupWare version '.$phpgw_info["server"]["versions"]["phpgwapi"].' setup</font>
</td>
<td align="right" bgcolor="486591">';
if ($nologoutbutton) {
@ -84,7 +84,7 @@
$header_msg = "Stage One";
}else{
include("../header.inc.php");
if (!isset($phpgw_domain) || $phpgw_info["server"]["header_version"] != $phpgw_info["server"]["current_header_version"]) {
if (!isset($phpgw_domain) || $phpgw_info["server"]["versions"]["header"] != $phpgw_info["server"]["versions"]["current_header"]) {
$stage = 1.2;
$header_msg = "Stage One (Upgrade your header.inc.php)";
}else{ /* header.inc.php part settled. Moving to authentication */
@ -170,7 +170,7 @@
$db->next_record();
$oldversion = $db->f("app_version");
if (isset($oldversion)){
if ($oldversion == $phpgw_info["server"]["version"]){
if ($oldversion == $phpgw_info["server"]["versions"]["phpgwapi"]){
$db->query("select config_value from config where config_name='freshinstall'");
$db->next_record();
$configed = $db->f("config_value");
@ -293,7 +293,7 @@
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td align="left" bgcolor="486591">&nbsp;<font color="fefefe">phpGroupWare version <?php
echo $phpgw_info["server"]["version"]; ?> setup</font>
echo $phpgw_info["server"]["versions"]["phpgwapi"]; ?> setup</font>
</td>
<td align="right" bgcolor="486591">
<?php

View File

@ -149,7 +149,7 @@
}elseif ($stage == 2.4) {
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>';
echo "You appear to be running version $oldversion of phpGroupWare.<br>\n";
echo "We will automaticly update your tables/records to ".$phpgw_info["server"]["version"].", but we highly recommend backing up your tables in case the script causes damage to your data.\n";
echo "We will automaticly update your tables/records to ".$phpgw_info["server"]["versions"]["phpgwapi"].", but we highly recommend backing up your tables in case the script causes damage to your data.\n";
echo "These automated scripts can easily destroy your data. Please backup before going any further!\n";
echo "<form method=\"POST\" action=\"index.php\">\n";
echo "<input type=\"hidden\" name=\"oldversion\" value=\"".$oldversion."\">\n";

View File

@ -43,7 +43,7 @@
$db->query("update preferences set preference_name='ko' where preference_name='kr'");
//install weather support
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('weather', 'Weather', 1, 12, NULL, '".$phpgw_info["server"]["version"]."')");
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('weather', 'Weather', 1, 12, NULL, '".$phpgw_info["server"]["versions"]["phpgwapi"]."')");
$db->query("INSERT INTO lang (message_id, app_name, lang, content) VALUES( 'weather','Weather','en','weather')");
$currentver = "0.9.2";
}
@ -136,7 +136,7 @@
function upgrade0_9_3pre6(){
global $currentver, $oldversion, $phpgw_info, $db;
$db->query("alter table addressbook add ab_url varchar(255)");
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('transy', 'Translation Management', 0, 13, NULL, '".$phpgw_info["server"]["version"]."')");
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('transy', 'Translation Management', 0, 13, NULL, '".$phpgw_info["server"]["versions"]["phpgwapi"]."')");
$currentver = "0.9.3pre7";
}
@ -324,7 +324,7 @@
PRIMARY KEY (note_id)
)";
$db->query($sql);
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('notes', 'Notes', 1, 14, NULL, '".$phpgw_info["server"]["version"]."')");
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('notes', 'Notes', 1, 14, NULL, '".$phpgw_info["server"]["versions"]["phpgwapi"]."')");
$currentver = "0.9.4pre2";
}

View File

@ -43,7 +43,7 @@
$db->query("update preferences set preference_name='ko' where preference_name='kr'");
//add weather support
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('weather', 'Weather', 1, 12, NULL, '".$phpgw_info["server"]["version"]."')");
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('weather', 'Weather', 1, 12, NULL, '".$phpgw_info["server"]["versions"]["phpgwapi"]."')");
$db->query("INSERT INTO lang (message_id, app_name, lang, content) VALUES( 'weather','Weather','en','weather')");
$currentver = "0.9.2";
}
@ -139,7 +139,7 @@
function upgrade0_9_3pre6(){
global $currentver, $oldversion, $phpgw_info, $db;
$db->query("alter table addressbook add ab_url varchar(255)");
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('transy', 'Translation Management', 0, 13, NULL, '".$phpgw_info["server"]["version"]."')");
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('transy', 'Translation Management', 0, 13, NULL, '".$phpgw_info["server"]["versions"]["phpgwapi"]."')");
$currentver = "0.9.3pre7";
}
@ -326,7 +326,7 @@
note_content text
)";
$db->query($sql);
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('notes', 'Notes', 1, 13, NULL, '".$phpgw_info["server"]["version"]."')");
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('notes', 'Notes', 1, 13, NULL, '".$phpgw_info["server"]["versions"]["phpgwapi"]."')");
$currentver = "0.9.4pre2";
}

View File

@ -11,5 +11,5 @@
/* $Id$ */
$phpgw_info["server"]["version"] = "0.9.8pre5";
$phpgw_info["server"]["current_header_version"] = "1.7";
$phpgw_info["server"]["versions"]["phpgwapi"] = "0.9.8pre5";
$phpgw_info["server"]["versions"]["current_header"] = "1.8";