mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-03-12 22:49:23 +01:00
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
@ -32,6 +32,11 @@
|
|||||||
$oldversion = $db->f("app_version");
|
$oldversion = $db->f("app_version");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($action != "Delete my old tables" && ! isset($oldversion)) {
|
||||||
|
setup_header();
|
||||||
|
echo "<br>";
|
||||||
|
}
|
||||||
|
|
||||||
if (PHP_VERSION < "3.0.16") {
|
if (PHP_VERSION < "3.0.16") {
|
||||||
echo "You appear to be running an old version of PHP. It its recommend that you upgrade "
|
echo "You appear to be running an old version of PHP. It its recommend that you upgrade "
|
||||||
. "to a new version. Older version of PHP might not run phpGroupWare correctly, if at all.";
|
. "to a new version. Older version of PHP might not run phpGroupWare correctly, if at all.";
|
||||||
|
@ -56,8 +56,6 @@
|
|||||||
$oldversion = $db->f("app_version");
|
$oldversion = $db->f("app_version");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************\
|
/**********************************************************************\
|
||||||
* First order of business is to upgrade or install the core. *
|
* First order of business is to upgrade or install the core. *
|
||||||
* if $ok is set to false after this include, the setup stops here *
|
* 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. *
|
* for applications to inteact with the user, this is how it is. *
|
||||||
* *
|
* *
|
||||||
\**********************************************************************/
|
\**********************************************************************/
|
||||||
setup_header();
|
|
||||||
echo "<br>";
|
|
||||||
|
|
||||||
$ok = true;
|
$ok = true;
|
||||||
$baseDir = $phpgw_info["server"]["server_root"];
|
$baseDir = $phpgw_info["server"]["server_root"];
|
||||||
|
@ -97,21 +97,8 @@
|
|||||||
}else{
|
}else{
|
||||||
add_default_server_config();
|
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')");
|
include($phpgw_info["server"]["server_root"] . "/setup/inc/default_applications.inc.php");
|
||||||
$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"]."')");
|
|
||||||
|
|
||||||
$db->query("insert into groups (group_name) values ('Default')");
|
$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')");
|
$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){
|
function update_version_table($tableschanged = True){
|
||||||
global $currentver, $phpgw_info, $db, $tablechanges;
|
global $currentver, $phpgw_info, $db, $tablechanges;
|
||||||
if ($tableschanged == True){$tablechanges = True;}
|
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"){
|
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);
|
$db->query($sql);
|
||||||
|
|
||||||
$sql = "CREATE TABLE notes (
|
$sql = "CREATE TABLE notes (
|
||||||
accountid int(11),
|
note_id int(20) NOT NULL auto_increment,
|
||||||
date int(11),
|
note_owner int(11),
|
||||||
note text,
|
note_date int(11),
|
||||||
noteid int(20) auto_increment,
|
note_content text,
|
||||||
PRIMARY KEY (noteid)
|
PRIMARY KEY (note_id)
|
||||||
)";
|
)";
|
||||||
$db->query($sql);
|
$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";
|
$currentver = "0.9.3";
|
||||||
update_version_table();
|
update_version_table();
|
||||||
|
@ -313,14 +313,14 @@
|
|||||||
}
|
}
|
||||||
if ($currentver == "0.9.4pre1") {
|
if ($currentver == "0.9.4pre1") {
|
||||||
$sql = "CREATE TABLE notes (
|
$sql = "CREATE TABLE notes (
|
||||||
accountid int(11),
|
note_id int(20) NOT NULL auto_increment,
|
||||||
date int(11),
|
note_owner int(11),
|
||||||
note text,
|
note_date int(11),
|
||||||
noteid int(20) auto_increment,
|
note_content text,
|
||||||
PRIMARY KEY (noteid)
|
PRIMARY KEY (note_id)
|
||||||
)";
|
)";
|
||||||
$db->query($sql);
|
$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";
|
$currentver = "0.9.4pre2";
|
||||||
update_version_table();
|
update_version_table();
|
||||||
}
|
}
|
||||||
|
@ -252,11 +252,10 @@
|
|||||||
$db->query($sql);
|
$db->query($sql);
|
||||||
|
|
||||||
$sql = "CREATE TABLE notes (
|
$sql = "CREATE TABLE notes (
|
||||||
accountid int(11),
|
note_id serial,
|
||||||
date int(11),
|
note_owner int,
|
||||||
note text,
|
note_date int,
|
||||||
noteid int(20) auto_increment,
|
note_content text
|
||||||
PRIMARY KEY (noteid)
|
|
||||||
)";
|
)";
|
||||||
$db->query($sql);
|
$db->query($sql);
|
||||||
|
|
||||||
|
@ -315,11 +315,10 @@
|
|||||||
}
|
}
|
||||||
if ($currentver == "0.9.4pre1") {
|
if ($currentver == "0.9.4pre1") {
|
||||||
$sql = "CREATE TABLE notes (
|
$sql = "CREATE TABLE notes (
|
||||||
accountid int(11),
|
note_id serial,
|
||||||
date int(11),
|
note_owner int,
|
||||||
note text,
|
note_date int,
|
||||||
noteid int(20) auto_increment,
|
note_content text
|
||||||
PRIMARY KEY (noteid)
|
|
||||||
)";
|
)";
|
||||||
$db->query($sql);
|
$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"]["version"]."')");
|
||||||
|
Loading…
Reference in New Issue
Block a user