Changeset 3490 in subversion
- Timestamp:
- Apr 15, 2010 3:28:05 AM (3 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 4 edited
-
UPGRADING (modified) (3 diffs)
-
bin/update.sh (modified) (2 diffs)
-
installer/rcube_install.php (modified) (3 diffs)
-
installer/test.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/UPGRADING
r2578 r3490 2 2 ====================== 3 3 4 First you should remove all subfolders from /program/localization/ 5 because most language codes have changed in 0.2-alpha. This way you 6 can make sure that no old localization files remain on your disk. 7 8 Then follow these instructions if upgrading from a previous version 9 of RoundCube Webmail. 4 Follow these instructions if upgrading from a previous version 5 of Roundcube Webmail. We recommend to carefully backup the existing 6 installation as well as the database before executig the following steps. 10 7 11 8 1. Replace index.php and all files in … … 17 14 - ./plugins/ 18 15 2. Run ./bin/update.sh from the commandline OR 19 open http://url-to-roundcube/installer/ in a browser . To enable20 the latter one, you have to temporary set 'enable_installer' to true16 open http://url-to-roundcube/installer/ in a browser and choose "3 Test config". 17 To enable the latter one, you have to temporary set 'enable_installer' to true 21 18 in your local config/main.inc.php file. 22 19 3. Let the update script/installer check your configuration and … … 29 26 30 27 31 For manually upgrading your RoundCube installation follow the instructions32 that match the currently installed version:33 34 from version 0.2-alpha35 ----------------------------------------36 * replace index.php37 * replace all files in folder /bin/38 * replace all files in folder /program/39 * replace all files in folder /installer/40 * replace all files in folder /skins/default/41 * run all commands in SQL/[yourdbtype].update.sql42 below the line "-- Updates from version 0.2-alpha"43 * check the config/main.inc.php.dist for new configuration44 options and add them to your config45 WARNING: 'skin_path' option was replaced by 'skin' option46 * WARNING: 'db_backend' option has been removed, now only47 PEAR::MDB2 driver is supported48 49 50 from version 0.1.151 ----------------------------------------52 * replace index.php53 * replace all files in folder /bin/54 * replace all files in folder /program/55 * replace all files in folder /skins/default/56 * run all commands in SQL/[yourdbtype].update.sql57 below the line "-- Updates from version 0.1.1"58 * check the config/main.inc.php.dist for new configuration59 options and add them to your config60 61 62 from version 0.1-stable63 ----------------------------------------64 * replace index.php65 * replace all files in folder /bin/66 * replace all files in folder /program/67 * replace all files in folder /skins/default/68 * run all commands in SQL/[yourdbtype].update.sql69 * check the config/main.inc.php.dist for new configuration options70 and add them to your config71 72 73 from version 0.1-rc274 ----------------------------------------75 * replace index.php76 * replace all files in folder /bin/77 * replace all files in folder /program/78 * replace all files in folder /skins/default/79 * run all commands in SQL/[yourdbtype].update.sql80 81 82 from version 0.1-rc183 ----------------------------------------84 * replace index.php85 * replace all files in folder /bin/86 * replace all files in folder /program/87 * replace all files in folder /skins/default/88 * If you have LDAP servers configured you should re-configure89 the config entries using the template given in /config/main.inc.php.dist90 91 92 from version 0.1-beta293 ----------------------------------------94 * replace index.php95 * replace all files in folder /bin/96 * replace all files in folder /program/97 * replace all files in folder /skins/default/98 * run all commands in SQL/[yourdbtype].update.sql or99 re-initalize the database with [yourdbtype].initial.sql100 * add these lines to /config/main.inc.php101 $rcmail_config['draft_autosave'] = 300;102 $rcmail_config['date_today'] = 'H:i';103 * If you have LDAP servers configured you should re-configure104 the config entries using the template given in /config/main.inc.php.dist105 106 107 form version 0.1-beta108 ----------------------------------------109 * replace index.php110 * replace all files in folder /bin/111 * replace all files in folder /program/112 * replace all files in folder /skins/default/113 * run all commands in SQL/[yourdbtype].update.sql or114 re-initalize the database with [yourdbtype].initial.sql115 * add this line to /config/db.inc.php116 $rcmail_config['db_persistent'] = false;117 * add these lines to /config/main.inc.php118 $rcmail_config['drafts_mbox'] = 'Drafts';119 $rcmail_config['junk_mbox'] = 'Junk';120 $rcmail_config['product_name'] = 'RoundCube Webmail';121 $rcmail_config['read_when_deleted'] = false;122 $rcmail_config['enable_spellcheck'] = false;123 $rcmail_config['protect_default_folders'] = false;124 * replace the following line from /config/main.inc.php125 @include($_SERVER['HTTP_HOST'].'.inc.php');126 with127 $rcmail_config['include_host_config'] = false; -
trunk/roundcubemail/bin/update.sh
r2229 r3490 13 13 14 14 if ($RCI->configured) { 15 $success = true; 16 15 17 if ($messages = $RCI->check_config()) { 18 $success = false; 16 19 $err = 0; 17 20 … … 101 104 echo "See ya.\n"; 102 105 } 106 } 103 107 108 // check database schema 109 if ($RCI->config['db_dsnw']) { 110 $DB = new rcube_mdb2($RCI->config['db_dsnw'], '', false); 111 $DB->db_connect('w'); 112 if ($db_error_msg = $DB->is_error()) { 113 echo "Error connecting to database: $db_error_msg\n"; 114 $success = false; 115 } 116 else if ($RCI->db_schema_check($DB, false)) { 117 $updatefile = INSTALL_PATH . 'SQL/' . $DB->db_provider . '.update.sql'; 118 echo "WARNING: Database schema needs to be updated!\n"; 119 echo "Open $updatefile and execute all queries that are superscribed with the currently installed version number\n"; 120 $success = false; 121 } 104 122 } 105 else { 123 124 125 if ($success) { 106 126 echo "This instance of RoundCube is up-to-date.\n"; 107 127 echo "Have fun!\n"; -
trunk/roundcubemail/installer/rcube_install.php
r3442 r3490 41 41 ); 42 42 43 // these config options are optional or can be set to null44 var $required_config = array('db_dsnw', 'd es_key');43 // these config options are required for a working system 44 var $required_config = array('db_dsnw', 'db_table_contactgroups', 'db_table_contactgroupmembers', 'des_key'); 45 45 46 46 /** … … 326 326 } 327 327 328 329 328 /** 330 329 * Compare the local database schema with the reference schema … … 334 333 * @return boolean True if the schema is up-to-date, false if not or an error occured 335 334 */ 336 function db_schema_check($update = false) 335 function db_schema_check($DB, $update = false) 336 { 337 if (!$this->configured) 338 return false; 339 340 // simple ad hand-made db schema 341 $db_schema = array( 342 'users' => array(), 343 'identities' => array(), 344 'contacts' => array(), 345 'contactgroups' => array(), 346 'contactgroupmembers' => array(), 347 'cache' => array(), 348 'messages' => array(), 349 'session' => array(), 350 ); 351 352 $errors = array(); 353 354 // check list of tables 355 $existing_tables = $DB->list_tables(); 356 foreach ($db_schema as $table => $cols) { 357 if (!in_array($this->config['db_table_'.$table], $existing_tables)) 358 $errors[] = "Missing table ".$table; 359 360 // TODO: check cols and indices 361 } 362 363 return !empty($errors) ? $errors : false; 364 } 365 366 /** 367 * Compare the local database schema with the reference schema 368 * required for this version of RoundCube 369 * 370 * @param boolean True if the schema schould be updated 371 * @return boolean True if the schema is up-to-date, false if not or an error occured 372 */ 373 function mdb2_schema_check($update = false) 337 374 { 338 375 if (!$this->configured) -
trunk/roundcubemail/installer/test.php
r3437 r3490 165 165 $db_working = false; 166 166 } 167 /* 168 else if (!$RCI->db_schema_check($update = !empty($_POST['updatedb']))) { 167 else if ($RCI->db_schema_check($DB, $update = !empty($_POST['updatedb']))) { 169 168 $RCI->fail('DB Schema', "Database schema differs"); 170 171 echo $update ? '<p class="warning">Failed to update the database schema! Please manually execute the SQL statements from the SQL/*.update.sql file on your database</p>' : 172 '<p><input type="submit" name="updatedb" value="Update schema now" /></p>'; 169 $updatefile = INSTALL_PATH . 'SQL/' . $DB->db_provider . '.update.sql'; 170 echo '<p class="warning">Please manually execute the SQL statements from '.$updatefile.' on your database</p>'; 173 171 $db_working = false; 174 172 } 175 */176 173 else { 177 174 $RCI->pass('DB Schema');
Note: See TracChangeset
for help on using the changeset viewer.
