Revision 724
Added by doc over 17 years ago
| upgrade-script.php | ||
|---|---|---|
| 163 | 163 | <?php | 
| 164 | 164 | if(!isset($_POST['backup_confirmed'])) { 
 | 
| 165 | 165 | ?> | 
| 166 | <h2>Prerequisites</h2> | |
| 166 | <h2>Step 1: Check existing installation</h2> | |
| 167 | <p>Checking the configuration of your existing Website Baker installation:<br /> | |
| 168 | <?php | |
| 169 | // check the basic Website Baker installation before proceeding | |
| 170 | if(check_baseline_configuration() != 0) {
 | |
| 171 | echo <<< EOT | |
| 172 | <h3>Checklist before upgrading:</h3> | |
| 167 | 173 | <p>To upgrade from an existing WB 2.6.7 version, please perform the following steps in advance: | 
| 168 | 174 | <ol> | 
| 169 | 175 | <li>Backup the entire <strong>/pages</strong> folder (including all subfolder and files) of your existing WB installation</li> | 
| ... | ... | |
| 172 | 178 | <li>Upload all files contained in the WB 2.7 installation package (except config.php and the folder /install) via FTP over your existing installation</li> | 
| 173 | 179 | <li>start this script by typing the URL into your browser</li> | 
| 174 | 180 | </ol> | 
| 175 | <strong class="error">Note: </strong>If you have an version lower than 2.6.7, you need to upgrade to 2.6.7 first!! Instructions can be found on the <a href="http://help.websitebaker.org/pages/en/basic-docu/installation/upgrade.php" target="_blank">Website Baker Help portal</a>.</p> | |
| 176 |  | |
| 177 | <h2>Step 1: Check existing installation</h2> | |
| 178 | <p>Checking the configuration of your existing Website Baker installation:<br /> | |
| 179 | <?php | |
| 180 | // check the basic Website Baker installation before proceeding | |
| 181 | if(check_baseline_configuration() != 0) die; | |
| 181 | <strong class="error">Note: </strong>If you have an version lower than 2.6.7, you need to upgrade to 2.6.7 first!! Instructions can be found on the <a href="http://help.websitebaker.org/pages/en/basic-docu/installation/upgrade.php" target="_blank">Website Baker Help portal</a>.</p><p> </p> | |
| 182 | EOT; | |
| 183 | die; | |
| 184 | } | |
| 185 | // pre-checks passed, proceed | |
| 182 | 186 | status_msg('<p>Congratulations: You have passed all the required pre-checks.', 'ok');
 | 
| 183 | 187 | ?> | 
| 184 | 188 |  | 
| ... | ... | |
| 788 | 792 | $database->query("DELETE FROM ".TABLE_PREFIX."settings WHERE name = 'wbmailer_smtp_password'");
 | 
| 789 | 793 | //add new rows with default values | 
| 790 | 794 | $wbmailer_smtp_host = (defined('WBMAILER_SMTP_HOST')) ? WBMAILER_SMTP_HOST : '';
 | 
| 791 | $wbmailer_routine = ($wbmailer_smtp_host = '') ? 'phpmail' : 'smtp'; | |
| 795 | $wbmailer_routine = ($wbmailer_smtp_host == '') ? 'phpmail' : 'smtp';
 | |
| 792 | 796 | $settings_rows= "INSERT INTO `".TABLE_PREFIX."settings` " | 
| 793 | 797 | ." (name, value) VALUES " | 
| 794 | 798 | ." ('wbmailer_routine', '$wbmailer_routine'),"
 | 
| ... | ... | |
| 853 | 857 | /********************************************************** | 
| 854 | 858 | * - End of upgrade script | 
| 855 | 859 | */ | 
| 860 | $config_msg = ($wbmailer_smtp_host != '') ? '<br /><br />Note: Please remove the line: <strong>define(\'WBMAILER_SMTP_HOST\', \''.$wbmailer_smtp_host.'\');</strong> from file <strong>config.php</strong> before proceeding!' : ''; | |
| 856 | 861 | echo '<p style="font-size:120%;"><strong>Congratulations: The upgrade script is finished ...</strong></p>'; | 
| 857 | status_msg('<strong>Warning:</strong><br />Please delete the file <strong>upgrade-script.php</strong> via FTP before proceeding.<br />If you do not delete this script from your server, others can delete/overwritte database settings by executing this script again.', 'warning', 'div');
 | |
| 862 | status_msg('<strong>Warning:</strong><br />Please delete the file <strong>upgrade-script.php</strong> via FTP before proceeding.<br />If you do not delete this script from your server, others can delete/overwritte database settings by executing this script again.'.$config_msg, 'warning', 'div');
 | |
| 858 | 863 | // show buttons to go to the backend or frontend | 
| 859 | 864 | echo '<br />'; | 
| 860 | 865 | if(defined('WB_URL')) {
 | 
| 861 | 866 | echo '<form action="'.WB_URL.'" target="_self">'; | 
| 862 | echo '<input type="submit" value="kick me to the Frontend" style="float:left;"'; | |
| 867 | 	echo '<input type="submit" value="kick me to the Frontend" style="float:left;" />';
 | |
| 863 | 868 | echo '</form>'; | 
| 864 | 869 | } | 
| 865 | 870 | if(defined('ADMIN_URL')) {
 | 
| 866 | 871 | echo '<form action="'.ADMIN_URL.'" target="_self">'; | 
| 867 | echo ' <input type="submit" value="kick me to the Backend"'; | |
| 872 | 	echo ' <input type="submit" value="kick me to the Backend" />';
 | |
| 868 | 873 | echo '</form>'; | 
| 869 | 874 | } | 
| 870 | 875 | echo '<p> </p>'; | 
Also available in: Unified diff
fixed bug in upgrade script (WBMailer setting)