Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 62197 | Differences between
and this patch

Collapse All | Expand All

(-)open-xchange-0.8.2-RC3-origin/conf/admintools.conf.in (-1 / +1 lines)
Lines 69-73 Link Here
69
DEFAULT_SQL_PASS="@dbpass@"
69
DEFAULT_SQL_PASS="@dbpass@"
70
### if u want to use mysql change to mysql
70
### if u want to use mysql change to mysql
71
SQL_DB_TYPE="pgsql"
71
SQL_DB_TYPE="mysql"
72
72
73
73
(-)open-xchange-0.8.2-RC3-origin/conf/groupware/intranet.conf (-7 / +15 lines)
Lines 130-145 Link Here
130
130
131
# DATABASE identifiert for SYSDATE
131
# DATABASE identifiert for SYSDATE
132
SYSDATE='now'
132
SYSDATE=now()
133
133
134
# DATABASE identifier for CURRENT_DATE
134
# DATABASE identifier for CURRENT_DATE
135
# SQL_TODAY='today'
135
SQL_TODAY=curdate()
136
136
137
# Sequence SQL-String for DATABASE
137
# Sequence SQL-String for DATABASE
138
# Example for POSTGRES
138
# Example for POSTGRES
139
seq-fid=SELECT nextval ('fid')
139
#seq-fid=SELECT nextval ('fid')
140
seq-import_id=SELECT nextval ('import_id')
140
#seq-import_id=SELECT nextval ('import_id')
141
seq-insert_id=SELECT nextval ('insert_id')
141
#seq-insert_id=SELECT nextval ('insert_id')
142
seq-profile_id=SELECT nextval ('profile_id')
142
#seq-profile_id=SELECT nextval ('profile_id')
143
seq-serial_id=SELECT nextval ('serial_id')
143
#seq-serial_id=SELECT nextval ('serial_id')
144
145
# Example for mySQL
146
seq-fid=SELECT select_fid()
147
seq-import_id=SELECT select_import_id()
148
seq-insert_id=SELECT select_insert_id()
149
seq-profile_id=SELECT select_profile_id()
150
seq-serial_id=SELECT select_serial_id()
151
144
# Example for ORACLE
152
# Example for ORACLE
145
#seq-fid="SELECT fid.nextval"
153
#seq-fid="SELECT fid.nextval"
(-)open-xchange-0.8.2-RC3-origin/configure.in (+1 lines)
Lines 792-795 Link Here
792
conf/admintools.conf 
792
conf/admintools.conf 
793
system/setup/init_ldap.ldif
793
system/setup/init_ldap.ldif
794
system/setup/create_mysql_database.sql
794
src/com/openexchange/server/Version.java )
795
src/com/openexchange/server/Version.java )
795
796
(-)open-xchange-0.8.2-RC3-origin/sbin/deluser_ox.in (-2 / +2 lines)
Lines 115-123 Link Here
115
	then
115
	then
116
	
116
	
117
		SQL_INSERT=`$MYSQL_BIN -h $DEFAULT_SQL_HOST -u $DEFAULT_SQL_USER --password=$DEFAULT_SQL_PASS $DEFAULT_SQL_DB -e "DELETE FROM $RIGHTS_TABLE WHERE login LIKE '$USERNAME'" `
117
		SQL_INSERT=`$SQL_BIN -h $DEFAULT_SQL_HOST -U $DEFAULT_SQL_USER -d $DEFAULT_SQL_DB -X -c "DELETE FROM $RIGHTS_TABLE WHERE login LIKE '$USERNAME'" | $AWK_BIN {'print $1'}`
118
118
119
	else
119
	else
120
	
120
	
121
		SQL_INSERT=`$SQL_BIN -h $DEFAULT_SQL_HOST -U $DEFAULT_SQL_USER -d $DEFAULT_SQL_DB -X -c "DELETE FROM $RIGHTS_TABLE WHERE login LIKE '$USERNAME'" | $AWK_BIN {'print $1'}`
121
		SQL_INSERT=`$MYSQL_BIN -h $DEFAULT_SQL_HOST -u $DEFAULT_SQL_USER --password=$DEFAULT_SQL_PASS $DEFAULT_SQL_DB -e "DELETE FROM $RIGHTS_TABLE WHERE login LIKE '$USERNAME'" `
122
		if [ $? -eq 0 ]; then
122
		if [ $? -eq 0 ]; then
123
			SQL_INSERT="DELETE"
123
			SQL_INSERT="DELETE"
(-)open-xchange-0.8.2-RC3-origin/src/com/openexchange/tools/HTMLConfirmation.java (-2 / +2 lines)
Lines 190-194 Link Here
190
190
191
            writeCon = DBPool.pickupWriteable();
191
            writeCon = DBPool.pickupWriteable();
192
            stmt = writeCon.prepareStatement("UPDATE \"" + table + "\" SET confirm=?, reason=? WHERE (object_id=? AND member_uid LIKE ?)");
192
            stmt = writeCon.prepareStatement("UPDATE " + table + " SET confirm=?, reason=? WHERE (object_id=? AND member_uid LIKE ?)");
193
            stmt.setString(1, no.user.get("HTMLConfirmReason").toString());
193
            stmt.setString(1, no.user.get("HTMLConfirmReason").toString());
194
            stmt.setString(2, comment);
194
            stmt.setString(2, comment);
Lines 209-213 Link Here
209
            try {
209
            try {
210
                String orig_table = table.startsWith("prg_date") ? "prg_dates" : "prg_tasks";
210
                String orig_table = table.startsWith("prg_date") ? "prg_dates" : "prg_tasks";
211
                stmt = writeCon.prepareStatement("UPDATE \"" + orig_table + "\" SET changed_from = '" + no.getUser() + "', changing_date = 'NOW' WHERE (intfield01=?)");
211
                stmt = writeCon.prepareStatement("UPDATE " + orig_table + " SET changed_from = '" + no.getUser() + "', changing_date = 'NOW' WHERE (intfield01=?)");
212
                try {
212
                try {
213
                    stmt.setLong(1, Long.parseLong(objectID));
213
                    stmt.setLong(1, Long.parseLong(objectID));
(-)open-xchange-0.8.2-RC3-origin/system/setup/create_mysql_database.sql.in (+117 lines)
Line 0 Link Here
1
DROP DATABASE IF EXISTS @dbname@;
2
3
CREATE DATABASE @dbname@ DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
4
5
GRANT ALL PRIVILEGES ON @dbname@.* TO '@dbuser@'@'localhost' IDENTIFIED BY '@dbpass@' WITH GRANT OPTION;
6
GRANT ALL PRIVILEGES ON @dbname@.* TO '@dbuser@'@'%' IDENTIFIED BY '@dbpass@';
7
8
USE @dbname@;
9
10
DROP TABLE IF EXISTS table_fid;
11
12
CREATE TABLE table_fid (
13
        id INT  NOT NULL AUTO_INCREMENT,
14
        primary key (id)
15
);
16
17
DROP FUNCTION IF EXISTS select_fid;
18
19
DELIMITER //
20
21
CREATE FUNCTION select_fid () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
22
BEGIN
23
  DECLARE xid INT;
24
  INSERT into table_fid VALUES();
25
  SELECT last_insert_id() into xid;
26
  RETURN xid;
27
END //
28
29
DELIMITER ;
30
31
DROP TABLE IF EXISTS table_serial_id;
32
33
CREATE TABLE table_serial_id (
34
        id INT  NOT NULL AUTO_INCREMENT,
35
        primary key (id)
36
) AUTO_INCREMENT = 9;
37
38
DROP FUNCTION IF EXISTS select_serial_id;
39
40
DELIMITER //
41
42
CREATE FUNCTION select_serial_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
43
BEGIN
44
  DECLARE xid INT;
45
  INSERT into table_serial_id VALUES();
46
  SELECT last_insert_id() into xid;
47
  RETURN xid;
48
END //
49
50
DELIMITER ;
51
52
53
DROP TABLE IF EXISTS table_import_id;
54
55
CREATE TABLE table_import_id (
56
        id INT  NOT NULL AUTO_INCREMENT,
57
        primary key (id)
58
);
59
60
DROP FUNCTION IF EXISTS select_import_id;
61
62
DELIMITER //
63
64
CREATE FUNCTION select_import_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
65
BEGIN
66
  DECLARE xid INT;
67
  INSERT into table_import_id VALUES();
68
  SELECT last_insert_id() into xid;
69
  RETURN xid;
70
END //
71
72
DELIMITER ;
73
74
75
DROP TABLE IF EXISTS table_insert_id;
76
77
CREATE TABLE table_insert_id (
78
        id INT  NOT NULL AUTO_INCREMENT,
79
        primary key (id)
80
) AUTO_INCREMENT = 101;
81
82
DROP FUNCTION IF EXISTS select_insert_id;
83
84
DELIMITER //
85
86
CREATE FUNCTION select_insert_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
87
BEGIN
88
  DECLARE xid INT;
89
  INSERT into table_insert_id VALUES();
90
  SELECT last_insert_id() into xid;
91
  RETURN xid;
92
END //
93
94
DELIMITER ;
95
96
DROP TABLE IF EXISTS table_profile_id;
97
98
CREATE TABLE table_profile_id (
99
        id INT  NOT NULL AUTO_INCREMENT,
100
        primary key (id)
101
);
102
103
DROP FUNCTION IF EXISTS select_profile_id;
104
105
DELIMITER //
106
107
CREATE FUNCTION select_profile_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
108
BEGIN
109
  DECLARE xid INT;
110
  INSERT into table_profile_id VALUES();
111
  SELECT last_insert_id() into xid;
112
  RETURN xid;
113
END //
114
115
116
DELIMITER ;
117
(-)open-xchange-0.8.2-RC3-origin/system/setup/init_mysql_database.sql (-127 / +120 lines)
Lines 1-111 Link Here
1
 
2
DROP TABLE IF EXISTS table_fid;
3
4
CREATE TABLE table_fid (
5
	id INT  NOT NULL AUTO_INCREMENT,
6
	primary key (id)
7
);
8
9
DROP FUNCTION IF EXISTS select_fid;
10
11
DELIMITER //
12
13
CREATE FUNCTION select_fid () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
14
BEGIN
15
  DECLARE xid INT;
16
  INSERT into table_fid VALUES();
17
  SELECT last_insert_id() into xid;
18
  RETURN xid;
19
END //
20
21
DELIMITER ;
22
 
23
DROP TABLE IF EXISTS table_serial_id;
24
25
CREATE TABLE table_serial_id (
26
	id INT  NOT NULL AUTO_INCREMENT,
27
	primary key (id)
28
) AUTO_INCREMENT = 9;
29
30
DROP FUNCTION IF EXISTS select_serial_id;
31
32
DELIMITER //
33
34
CREATE FUNCTION select_serial_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
35
BEGIN
36
  DECLARE xid INT;
37
  INSERT into table_serial_id VALUES();
38
  SELECT last_insert_id() into xid;
39
  RETURN xid;
40
END //
41
42
DELIMITER ;
43
44
 
45
DROP TABLE IF EXISTS table_import_id;
46
47
CREATE TABLE table_import_id (
48
	id INT  NOT NULL AUTO_INCREMENT,
49
	primary key (id)
50
);
51
52
DROP FUNCTION IF EXISTS select_import_id;
53
54
DELIMITER //
55
56
CREATE FUNCTION select_import_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
57
BEGIN
58
  DECLARE xid INT;
59
  INSERT into table_import_id VALUES();
60
  SELECT last_insert_id() into xid;
61
  RETURN xid;
62
END //
63
64
DELIMITER ;
65
66
 
67
DROP TABLE IF EXISTS table_insert_id;
68
69
CREATE TABLE table_insert_id (
70
	id INT  NOT NULL AUTO_INCREMENT,
71
	primary key (id)
72
) AUTO_INCREMENT = 101;
73
74
DROP FUNCTION IF EXISTS select_insert_id;
75
76
DELIMITER //
77
78
CREATE FUNCTION select_insert_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
79
BEGIN
80
  DECLARE xid INT;
81
  INSERT into table_insert_id VALUES();
82
  SELECT last_insert_id() into xid;
83
  RETURN xid;
84
END //
85
86
DELIMITER ;
87
88
DROP TABLE IF EXISTS table_profile_id;
89
90
CREATE TABLE table_profile_id (
91
	id INT  NOT NULL AUTO_INCREMENT,
92
	primary key (id)
93
);
94
95
DROP FUNCTION IF EXISTS select_profile_id;
96
97
DELIMITER //
98
99
CREATE FUNCTION select_profile_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
100
BEGIN
101
  DECLARE xid INT;
102
  INSERT into table_profile_id VALUES();
103
  SELECT last_insert_id() into xid;
104
  RETURN xid;
105
END //
106
107
108
DELIMITER ;
109
110
CREATE TABLE prg_dlist (
1
CREATE TABLE prg_dlist (
111
	intfield01 integer,
2
	intfield01 integer,
Lines 446-450 Link Here
446
	timestampfield01 timestamp ,
337
	timestampfield01 timestamp ,
447
	timestampfield02 timestamp ,
338
	timestampfield02 timestamp ,
448
	intfield01 int NOT NULL,
339
	intfield01 int PRIMARY KEY,
449
	intfield02 int,
340
	intfield02 int,
450
	intfield03 int,
341
	intfield03 int,
Lines 1127-1131 Link Here
1127
CREATE TABLE projects_notes (
1018
CREATE TABLE projects_notes (
1128
	intfield01 integer,
1019
	intfield01 integer,
1129
	note_id VARCHAR (255),
1020
	note_id VARCHAR(166),
1130
	member_id text,
1021
	member_id text,
1131
	primary key (intfield01, note_id),
1022
	primary key (intfield01, note_id),
Lines 1135-1139 Link Here
1135
CREATE TABLE backup_projects_notes (
1026
CREATE TABLE backup_projects_notes (
1136
	intfield01 integer,
1027
	intfield01 integer,
1137
	note_id VARCHAR (255),
1028
	note_id VARCHAR(166),
1138
	member_id text,
1029
	member_id text,
1139
	primary key (intfield01, note_id),
1030
	primary key (intfield01, note_id),
Lines 1178-1182 Link Here
1178
	intfield01 integer,
1069
	intfield01 integer,
1179
	id integer,
1070
	id integer,
1180
	antecessor VARCHAR (255),
1071
	antecessor VARCHAR(166),
1181
	object_type integer,
1072
	object_type integer,
1182
	primary key (intfield01, id, antecessor),
1073
	primary key (intfield01, id, antecessor),
Lines 1187-1191 Link Here
1187
	intfield01 integer,
1078
	intfield01 integer,
1188
	id integer,
1079
	id integer,
1189
	antecessor VARCHAR (255),
1080
	antecessor VARCHAR(166),
1190
	object_type integer,
1081
	object_type integer,
1191
	primary key (intfield01, id, antecessor),
1082
	primary key (intfield01, id, antecessor),
Lines 1328-1332 Link Here
1328
	timestampfield01 timestamp ,
1219
	timestampfield01 timestamp ,
1329
	timestampfield02 timestamp ,
1220
	timestampfield02 timestamp ,
1330
	intfield01 int NOT NULL,
1221
	intfield01 int PRIMARY KEY,
1222
	intfield02 int,
1223
	intfield03 int,
1224
	intfield04 int,
1225
	intfield05 int,
1226
	intfield06 int,
1227
	field01 text NOT NULL,
1228
	field02 text,
1229
	field03 text,
1230
	field04 text,
1231
	field05 text,
1232
	field06 text,
1233
	field07 text,
1234
	field08 text,
1235
	field09 text,
1236
	field10 text
1237
);
1238
1239
CREATE TABLE del_docufolders (
1240
	creating_date timestamp NOT NULL,
1241
	created_from text NOT NULL,
1242
	changing_date timestamp,
1243
	changed_from text,
1244
	user_right text NOT NULL,
1245
	group_right text NOT NULL,
1246
	sid text NOT NULL,
1247
	tid text,
1248
	order_crit text,
1249
	timestampfield01 timestamp,
1250
	timestampfield02 timestamp,
1251
	intfield01 int PRIMARY KEY,
1331
	intfield02 int,
1252
	intfield02 int,
1332
	intfield03 int,
1253
	intfield03 int,
Lines 1358-1362 Link Here
1358
	timestampfield01 timestamp ,
1279
	timestampfield01 timestamp ,
1359
	timestampfield02 timestamp ,
1280
	timestampfield02 timestamp ,
1360
	intfield01 int NOT NULL,
1281
	intfield01 int PRIMARY KEY,
1282
	intfield02 int NOT NULL,
1283
	intfield03 int,
1284
	intfield04 int,
1285
	intfield05 int,
1286
	intfield06 int,
1287
	field01 text NOT NULL,
1288
	field02 text,
1289
	field03 text,
1290
	field04 text,
1291
	field05 text,
1292
	field06 text,
1293
	field07 text,
1294
	field08 text,
1295
	field09 text,
1296
	field10 text
1297
);
1298
1299
CREATE TABLE del_documents (
1300
	creating_date timestamp NOT NULL,
1301
	created_from text NOT NULL,
1302
	changing_date timestamp,
1303
	changed_from text,
1304
	user_right text NOT NULL,
1305
	group_right text NOT NULL,
1306
	sid text NOT NULL,
1307
	tid text,
1308
	order_crit text,
1309
	timestampfield01 timestamp,
1310
	timestampfield02 timestamp,
1311
	intfield01 int PRIMARY KEY,
1361
	intfield02 int NOT NULL,
1312
	intfield02 int NOT NULL,
1362
	intfield03 int,
1313
	intfield03 int,
Lines 1388-1392 Link Here
1388
	timestampfield01 timestamp ,
1339
	timestampfield01 timestamp ,
1389
	timestampfield02 timestamp ,
1340
	timestampfield02 timestamp ,
1390
	intfield01 int NOT NULL,
1341
	intfield01 int PRIMARY KEY,
1342
	intfield02 int NOT NULL,
1343
	intfield03 int NOT NULL,
1344
	intfield04 int,
1345
	intfield05 int,
1346
	intfield06 int,
1347
	field01 text NOT NULL,
1348
	field02 text,
1349
	field03 text NOT NULL,
1350
	field04 text NOT NULL,
1351
	field05 text,
1352
	field06 text,
1353
	field07 text,
1354
	field08 text,
1355
	field09 text,
1356
	field10 text
1357
);
1358
1359
CREATE TABLE del_documents_files (
1360
	creating_date timestamp NOT NULL,
1361
	created_from text,
1362
	changing_date timestamp,
1363
	changed_from text,
1364
	user_right text,
1365
	group_right text,
1366
	sid text NOT NULL,
1367
	tid text,
1368
	order_crit text,
1369
	timestampfield01 timestamp,
1370
	timestampfield02 timestamp,
1371
	intfield01 int PRIMARY KEY,
1391
	intfield02 int NOT NULL,
1372
	intfield02 int NOT NULL,
1392
	intfield03 int NOT NULL,
1373
	intfield03 int NOT NULL,
Lines 1971-1975 Link Here
1971
CREATE TABLE sys_linkage (
1952
CREATE TABLE sys_linkage (
1972
	changing_date timestamp  NOT NULL,
1953
	changing_date timestamp  NOT NULL,
1973
	luid int NOT NULL,
1954
	luid int PRIMARY KEY,
1974
	source_id int NOT NULL,
1955
	source_id int NOT NULL,
1975
	src_table text NOT NULL,
1956
	src_table text NOT NULL,
Lines 1991-1995 Link Here
1991
CREATE TABLE del_linkage (
1972
CREATE TABLE del_linkage (
1992
	changing_date timestamp  NOT NULL,
1973
	changing_date timestamp  NOT NULL,
1993
	luid int NOT NULL,
1974
	luid int PRIMARY KEY,
1994
	source_id int NOT NULL,
1975
	source_id int NOT NULL,
1995
	src_table text NOT NULL,
1976
	src_table text NOT NULL,
Lines 2045-2048 Link Here
2045
);
2026
);
2046
2027
2028
CREATE TABLE oxfolder_userfolders_standardfolders (
2029
        owner text,
2030
        module text,
2031
        fuid int
2032
);
2033
2047
CREATE TABLE del_oxfolder_tree (
2034
CREATE TABLE del_oxfolder_tree (
2048
        fuid int,
2035
        fuid int,
Lines 2109-2120 Link Here
2109
);
2096
);
2110
2097
2111
INSERT INTO oxfolder_tree VALUES (1, 0, 'private', 'system', 'system','system', 'system', now(), 'System', null, null);
2098
CREATE TABLE del_system_objects (
2112
INSERT INTO oxfolder_tree VALUES (2, 0, 'public', 'system', 'system','system', 'system', now(), 'System', null, null);
2099
		object_type int,
2113
INSERT INTO oxfolder_tree VALUES (3, 0, 'shared', 'system', 'system','system', 'system', now(), 'System', null, null);
2100
		object_id text,
2114
INSERT INTO oxfolder_tree VALUES (4, 0, 'system', 'system', 'system','system', 'system', now(), 'System', null, null);
2101
		deleting_date timestamp
2115
INSERT INTO oxfolder_tree VALUES (5, 4, 'system_global', 'contact', 'system','system', 'system', now(), 'System', null, null);
2102
);
2116
INSERT INTO oxfolder_tree VALUES (6, 4, 'system_ldap', 'contact', 'system','system', 'system', now(), 'System', null, null);
2103
2117
INSERT INTO oxfolder_tree VALUES (7, 0, 'user', 'system', 'system','system', 'system', now(), 'System', null, null);
2104
INSERT INTO oxfolder_tree VALUES (1, 0, 'private', 'system', 'system','system', 'system', 'now', 'System', null, null);
2118
INSERT INTO oxfolder_tree VALUES (8, 7, 'projects', 'projects', 'system','system', 'system', now(), 'System', null, null);
2105
INSERT INTO oxfolder_tree VALUES (2, 0, 'public', 'system', 'system','system', 'system', 'now', 'System', null, null);
2106
INSERT INTO oxfolder_tree VALUES (3, 0, 'shared', 'system', 'system','system', 'system', 'now', 'System', null, null);
2107
INSERT INTO oxfolder_tree VALUES (4, 0, 'system', 'system', 'system','system', 'system', 'now', 'System', null, null);
2108
INSERT INTO oxfolder_tree VALUES (5, 4, 'system_global', 'contact', 'system','system', 'system', 'now', 'System', null, null);
2109
INSERT INTO oxfolder_tree VALUES (6, 4, 'system_ldap', 'contact', 'system','system', 'system', 'now', 'System', null, null);
2110
INSERT INTO oxfolder_tree VALUES (7, 0, 'user', 'system', 'system','system', 'system', 'now', 'System', null, null);
2111
INSERT INTO oxfolder_tree VALUES (8, 7, 'projects', 'projects', 'system','system', 'system', 'now', 'System', null, null);
2119
2112
2120
INSERT INTO oxfolder_permissions VALUES (select_serial_id(), 1, 512,'all_ox_users_and_ox_groups', 0, 8, 0, 0, 0);
2113
INSERT INTO oxfolder_permissions VALUES (select_serial_id(), 1, 512,'all_ox_users_and_ox_groups', 0, 8, 0, 0, 0);

Return to bug 62197