forked from extern/egroupware
Fixed a few white space errors header() and setup_header(), fixed the notes tables and reworked the default applications so it will be easier to make the phpgroupware and phpgroupware plus packages
This commit is contained in:
parent
f63c9f36fa
commit
e35f536961
@ -31,6 +31,11 @@
|
||||
@$db->next_record();
|
||||
$oldversion = $db->f("app_version");
|
||||
}
|
||||
|
||||
if ($action != "Delete my old tables" && ! isset($oldversion)) {
|
||||
setup_header();
|
||||
echo "<br>";
|
||||
}
|
||||
|
||||
if (PHP_VERSION < "3.0.16") {
|
||||
echo "You appear to be running an old version of PHP. It its recommend that you upgrade "
|
||||
@ -173,10 +178,10 @@
|
||||
break;
|
||||
default:
|
||||
if (isset($oldversion)){
|
||||
if ($phpgw_info["server"]["version"] != $oldversion){
|
||||
Header("Location: $PHP_SELF?action=regularversion");
|
||||
$ok = false;
|
||||
}
|
||||
if ($phpgw_info["server"]["version"] != $oldversion){
|
||||
Header("Location: $PHP_SELF?action=regularversion");
|
||||
$ok = false;
|
||||
}
|
||||
}else{
|
||||
@$db->query("select * from config");
|
||||
if (@$db->num_rows() == 0){
|
||||
@ -204,7 +209,7 @@
|
||||
echo "</table>\n";
|
||||
}else{
|
||||
Header("Location: $PHP_SELF?action=prebetaversion");
|
||||
$ok = false;
|
||||
$ok = false;
|
||||
}
|
||||
}else{
|
||||
echo "<table border=\"0\" align=\"center\">\n";
|
||||
|
@ -56,8 +56,6 @@
|
||||
$oldversion = $db->f("app_version");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**********************************************************************\
|
||||
* First order of business is to upgrade or install the core. *
|
||||
* if $ok is set to false after this include, the setup stops here *
|
||||
@ -66,8 +64,6 @@
|
||||
* for applications to inteact with the user, this is how it is. *
|
||||
* *
|
||||
\**********************************************************************/
|
||||
setup_header();
|
||||
echo "<br>";
|
||||
|
||||
$ok = true;
|
||||
$baseDir = $phpgw_info["server"]["server_root"];
|
||||
|
@ -97,21 +97,8 @@
|
||||
}else{
|
||||
add_default_server_config();
|
||||
}
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('admin', 'Administration', 1, 1, NULL, '".$currentver."')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('tts', 'Trouble Ticket System', 0, 2, NULL, '0.0.0')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('inv', 'Inventory', 0, 3, NULL, '0.0.0')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('chat', 'Chat', 0, 4, NULL, '0.0.0')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('headlines', 'Headlines', 0, 5, 'news_sites,news_headlines', '0.0.0')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('filemanager', 'File manager', 1, 6, NULL, '".$currentver."')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('addressbook', 'Address Book', 1, 7, 'addressbook', '".$currentver."')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('todo', 'ToDo List', 1, 8, 'todo', '".$currentver."')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('calendar', 'Calendar', 1, 9, 'webcal_entry,webcal_entry_users,webcal_entry_groups,webcal_repeats', '".$currentver."')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('email', 'Email', 1, 10,NULL, '".$currentver."')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('nntp', 'NNTP', 1, 11, 'newsgroups', '".$currentver."')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('cron_apps', 'cron_apps', 0, 0, NULL, '".$currentver."')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('weather', 'Weather', 1, 12, NULL, '".$currentver."')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('transy', 'Translation Management', 1, 13, NULL, '".$currentver."')");
|
||||
$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"]."')");
|
||||
|
||||
include($phpgw_info["server"]["server_root"] . "/setup/inc/default_applications.inc.php");
|
||||
|
||||
$db->query("insert into groups (group_name) values ('Default')");
|
||||
$db->query("insert into accounts (account_lid,account_pwd,account_firstname,account_lastname,account_permissions,account_groups,account_status) values ('demo','81dc9bdb52d04dc20036dbd8313ed055','Demo','Account',':admin:email:todo:addressbook:calendar:',',1:0,','A')");
|
||||
|
@ -14,7 +14,7 @@
|
||||
function update_version_table($tableschanged = True){
|
||||
global $currentver, $phpgw_info, $db, $tablechanges;
|
||||
if ($tableschanged == True){$tablechanges = True;}
|
||||
$db->query("update applications set app_version='".$currentver."' where (app_name='admin' or app_name='filemanager' or app_name='addressbook' or app_name='todo' or app_name='calendar' or app_name='email' or app_name='nntp' or app_name='cron_apps')");
|
||||
$db->query("update applications set app_version='".$currentver."' where (app_name='admin' or app_name='filemanager' or app_name='addressbook' or app_name='todo' or app_name='calendar' or app_name='email' or app_name='nntp' or app_name='cron_apps' or app_name='notes')");
|
||||
}
|
||||
|
||||
if ($currentver == "drop"){
|
||||
|
30
setup/sql/default_applications.inc.php
Normal file
30
setup/sql/default_applications.inc.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Setup *
|
||||
* http://www.phpgroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU General Public License as published by the *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
// This is so we can enable or disable apps for the phpGroupWare and phpGroupWare Plus packges
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('admin', 'Administration', 1, 1, NULL, '".$currentver."')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('tts', 'Trouble Ticket System', 0, 2, NULL, '0.0.0')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('inv', 'Inventory', 0, 3, NULL, '0.0.0')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('chat', 'Chat', 0, 4, NULL, '0.0.0')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('headlines', 'Headlines', 0, 5, 'news_sites,news_headlines', '0.0.0')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('filemanager', 'File manager', 1, 6, NULL, '".$currentver."')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('addressbook', 'Address Book', 1, 7, 'addressbook', '".$currentver."')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('todo', 'ToDo List', 1, 8, 'todo', '".$currentver."')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('calendar', 'Calendar', 1, 9, 'webcal_entry,webcal_entry_users,webcal_entry_groups,webcal_repeats', '".$currentver."')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('email', 'Email', 1, 10,NULL, '".$currentver."')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('nntp', 'NNTP', 1, 11, 'newsgroups', '".$currentver."')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('cron_apps', 'cron_apps', 0, 0, NULL, '".$currentver."')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('weather', 'Weather', 1, 12, NULL, '".$currentver."')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('transy', 'Translation Management', 1, 13, NULL, '".$currentver."')");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('notes', 'Notes', 1, 14, NULL, '$currentver')");
|
||||
?>
|
@ -280,14 +280,13 @@
|
||||
$db->query($sql);
|
||||
|
||||
$sql = "CREATE TABLE notes (
|
||||
accountid int(11),
|
||||
date int(11),
|
||||
note text,
|
||||
noteid int(20) auto_increment,
|
||||
PRIMARY KEY (noteid)
|
||||
)";
|
||||
note_id int(20) NOT NULL auto_increment,
|
||||
note_owner int(11),
|
||||
note_date int(11),
|
||||
note_content text,
|
||||
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', 0, 13, NULL, '".$phpgw_info["server"]["version"]."')");
|
||||
|
||||
$currentver = "0.9.3";
|
||||
update_version_table();
|
||||
|
@ -313,14 +313,14 @@
|
||||
}
|
||||
if ($currentver == "0.9.4pre1") {
|
||||
$sql = "CREATE TABLE notes (
|
||||
accountid int(11),
|
||||
date int(11),
|
||||
note text,
|
||||
noteid int(20) auto_increment,
|
||||
PRIMARY KEY (noteid)
|
||||
)";
|
||||
note_id int(20) NOT NULL auto_increment,
|
||||
note_owner int(11),
|
||||
note_date int(11),
|
||||
note_content text,
|
||||
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, 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, 14, NULL, '".$phpgw_info["server"]["version"]."')");
|
||||
$currentver = "0.9.4pre2";
|
||||
update_version_table();
|
||||
}
|
||||
|
@ -252,12 +252,11 @@
|
||||
$db->query($sql);
|
||||
|
||||
$sql = "CREATE TABLE notes (
|
||||
accountid int(11),
|
||||
date int(11),
|
||||
note text,
|
||||
noteid int(20) auto_increment,
|
||||
PRIMARY KEY (noteid)
|
||||
)";
|
||||
note_id serial,
|
||||
note_owner int,
|
||||
note_date int,
|
||||
note_content text
|
||||
)";
|
||||
$db->query($sql);
|
||||
|
||||
$currentver = "0.9.3";
|
||||
|
@ -314,13 +314,12 @@
|
||||
update_version_table();
|
||||
}
|
||||
if ($currentver == "0.9.4pre1") {
|
||||
$sql = "CREATE TABLE notes (
|
||||
accountid int(11),
|
||||
date int(11),
|
||||
note text,
|
||||
noteid int(20) auto_increment,
|
||||
PRIMARY KEY (noteid)
|
||||
)";
|
||||
$sql = "CREATE TABLE notes (
|
||||
note_id serial,
|
||||
note_owner int,
|
||||
note_date int,
|
||||
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"]."')");
|
||||
$currentver = "0.9.4pre2";
|
||||
|
Loading…
Reference in New Issue
Block a user