1 | <?php |
---|
2 | /**************************************************************************\ |
---|
3 | * phpGroupWare - Setup * |
---|
4 | * http://www.phpgroupware.org * |
---|
5 | * -------------------------------------------- * |
---|
6 | * This program is free software; you can redistribute it and/or modify it * |
---|
7 | * under the terms of the GNU General Public License as published by the * |
---|
8 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
9 | * option) any later version. * |
---|
10 | \**************************************************************************/ |
---|
11 | |
---|
12 | // Since Expresso 1.2 using API EgroupWare 1.0.0.007 |
---|
13 | $test[] = '1.0.0.007'; |
---|
14 | function phpgwapi_upgrade1_0_0_007() |
---|
15 | { |
---|
16 | |
---|
17 | global $setup_info,$phpgw_setup; |
---|
18 | |
---|
19 | $phpgw_setup->oProc->AddColumn('phpgw_access_log','browser', array ('type' => 'varchar', 'precision' => 200)); |
---|
20 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.0.008'; |
---|
21 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
22 | |
---|
23 | } |
---|
24 | |
---|
25 | $test[] = '1.0.0.008'; |
---|
26 | function phpgwapi_upgrade1_0_0_008() |
---|
27 | { |
---|
28 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.0.pre-alpha'; |
---|
29 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
30 | |
---|
31 | } |
---|
32 | |
---|
33 | $test[] = '2.0.0.pre-alpha'; |
---|
34 | function phpgwapi_upgrade2_0_0_prealpha() |
---|
35 | { |
---|
36 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.000'; |
---|
37 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
38 | } |
---|
39 | $test[] = '2.0.000'; |
---|
40 | function phpgwapi_upgrade2_0_000() |
---|
41 | { |
---|
42 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.001'; |
---|
43 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
44 | } |
---|
45 | $test[] = '2.0.001'; |
---|
46 | function phpgwapi_upgrade2_0_001() |
---|
47 | { |
---|
48 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.002'; |
---|
49 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
50 | } |
---|
51 | $test[] = '2.0.002'; |
---|
52 | function phpgwapi_upgrade2_0_002() |
---|
53 | { |
---|
54 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.003'; |
---|
55 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
56 | } |
---|
57 | $test[] = '2.0.003'; |
---|
58 | function phpgwapi_upgrade2_0_003() |
---|
59 | { |
---|
60 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.004'; |
---|
61 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
62 | } |
---|
63 | $test[] = '2.0.004'; |
---|
64 | function phpgwapi_upgrade2_0_004() |
---|
65 | { |
---|
66 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.005'; |
---|
67 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
68 | } |
---|
69 | $test[] = '2.0.005'; |
---|
70 | function phpgwapi_upgrade2_0_005() |
---|
71 | { |
---|
72 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.006'; |
---|
73 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
74 | } |
---|
75 | $test[] = '2.0.006'; |
---|
76 | function phpgwapi_upgrade2_0_006() |
---|
77 | { |
---|
78 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.007'; |
---|
79 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
80 | } |
---|
81 | $test[] = '2.0.007'; |
---|
82 | function phpgwapi_upgrade2_0_007() |
---|
83 | { |
---|
84 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.1.000'; |
---|
85 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
86 | } |
---|
87 | $test[] = '2.1.000'; |
---|
88 | function phpgwapi_upgrade2_1_000() |
---|
89 | { |
---|
90 | global $setup_info,$phpgw_setup; |
---|
91 | $phpgw_setup->oProc->query("ALTER TABLE phpgw_vfs ALTER COLUMN created TYPE timestamp;"); |
---|
92 | $phpgw_setup->oProc->query("ALTER TABLE phpgw_vfs ALTER COLUMN modified TYPE timestamp;"); |
---|
93 | $phpgw_setup->oProc->query("CREATE TABLE phpgw_vfs_quota (directory VARCHAR(100), quota_size INT NOT NULL, PRIMARY KEY (directory));"); |
---|
94 | $phpgw_setup->oProc->query("ALTER TABLE phpgw_vfs ADD COLUMN type integer DEFAULT 0;"); |
---|
95 | $phpgw_setup->oProc->query("ALTER TABLE phpgw_vfs ADD COLUMN summary bytea;"); |
---|
96 | $phpgw_setup->oProc->query("INSERT INTO phpgw_config VALUES ('filemanager','filemanager_quota_size',500);"); |
---|
97 | $phpgw_setup->oProc->query("INSERT INTO phpgw_config VALUES ('filemanager','filemanager_Max_file_size',20);"); |
---|
98 | $phpgw_setup->oProc->query('INSERT INTO phpgw_preferences VALUES (-2,\'filemanager\',\'a:19:{s:4:"name";s:1:"1";s:9:"mime_type";s:1:"1";s:4:"size";s:1:"1";s:7:"created";s:1:"1";s:8:"modified";s:1:"1";s:5:"owner";s:1:"1";s:12:"createdby_id";s:1:"1";s:13:"modifiedby_id";s:1:"1";s:3:"app";s:1:"0";s:7:"comment";s:1:"1";s:7:"version";s:1:"1";s:12:"viewinnewwin";s:1:"1";s:12:"viewonserver";s:1:"1";s:13:"viewtextplain";s:1:"1";s:6:"dotdot";s:1:"1";s:8:"dotfiles";s:1:"1";s:8:"pdf_type";s:8:"portrait";s:14:"pdf_paper_type";s:2:"a4";s:14:"files_per_page";s:3:"200";}\');'); |
---|
99 | $phpgw_setup->oProc->query("INSERT INTO phpgw_vfs (owner_id, createdby_id, modifiedby_id, created, modified, size, mime_type, deleteable, comment, app, directory, name, link_directory, link_name) VALUES (1,0,0,'1970-01-01',NULL,NULL,'Directory','Y',NULL,NULL,'/','', NULL, NULL);"); |
---|
100 | $phpgw_setup->oProc->query("INSERT INTO phpgw_vfs (owner_id, createdby_id, modifiedby_id, created, modified, size, mime_type, deleteable, comment, app, directory, name, link_directory, link_name) VALUES (2,0,0,'1970-01-01',NULL,NULL,'Directory','Y',NULL,NULL,'/','home', NULL, NULL);"); |
---|
101 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.2.000'; |
---|
102 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
103 | } |
---|
104 | ?> |
---|