Revision 722
Added by doc almost 17 years ago
upgrade-script.php | ||
---|---|---|
72 | 72 |
} |
73 | 73 |
|
74 | 74 |
// check database connection (try to extract a single value which should always exist) |
75 |
$group_id = '';
|
|
75 |
$matches = '';
|
|
76 | 76 |
status_msg(', Database connection: '); |
77 | 77 |
if(class_exists('database')) { |
78 |
$db = new database; |
|
79 | 78 |
$table = TABLE_PREFIX .'groups'; |
80 |
$group_id = @$db->get_one("SELECT group_id FROM $table WHERE group_id = '1' LIMIT 1"); |
|
79 |
//$result = $database->query("SELECT group_id FROM $table WHERE group_id = '1' LIMIT 1"); |
|
80 |
$result = $database->query("SELECT name FROM $table WHERE group_id = '1' LIMIT 1"); |
|
81 |
$matches = ($result->numRows() > 0) ? $result->numRows() : ''; |
|
81 | 82 |
} |
82 |
if($group_id == '1') {
|
|
83 |
if($matches == '1') {
|
|
83 | 84 |
status_msg('OK', 'ok'); |
84 | 85 |
} else { |
85 | 86 |
// output error message and return error status |
... | ... | |
162 | 163 |
<?php |
163 | 164 |
if(!isset($_POST['backup_confirmed'])) { |
164 | 165 |
?> |
166 |
<h2>Prerequisites</h2> |
|
167 |
<p>To upgrade from an existing WB 2.6.7 version, please perform the following steps in advance: |
|
168 |
<ol> |
|
169 |
<li>Backup the entire <strong>/pages</strong> folder (including all subfolder and files) of your existing WB installation</li> |
|
170 |
<li>Backup the entire <strong>Database</strong> of your existing WB installation (e.g. by the WB admin tool)</li> |
|
171 |
<li>Download the WB 2.7 installation package from the <a href="http://download.websitebaker.org/" target="_blank">official project site</a></li> |
|
172 |
<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 |
<li>start this script by typing the URL into your browser</li> |
|
174 |
</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 |
|
|
165 | 177 |
<h2>Step 1: Check existing installation</h2> |
166 | 178 |
<p>Checking the configuration of your existing Website Baker installation:<br /> |
167 | 179 |
<?php |
... | ... | |
841 | 853 |
/********************************************************** |
842 | 854 |
* - End of upgrade script |
843 | 855 |
*/ |
844 |
echo "<p><strong>Upgrade script finished </strong></p><br />"; |
|
845 |
|
|
856 |
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'); |
|
858 |
// show buttons to go to the backend or frontend |
|
859 |
echo '<br />'; |
|
860 |
if(defined('WB_URL')) { |
|
861 |
echo '<form action="'.WB_URL.'" target="_self">'; |
|
862 |
echo '<input type="submit" value="kick me to the Frontend" style="float:left;"'; |
|
863 |
echo '</form>'; |
|
846 | 864 |
} |
865 |
if(defined('ADMIN_URL')) { |
|
866 |
echo '<form action="'.ADMIN_URL.'" target="_self">'; |
|
867 |
echo ' <input type="submit" value="kick me to the Backend"'; |
|
868 |
echo '</form>'; |
|
869 |
} |
|
870 |
echo '<p> </p>'; |
|
871 |
} |
|
847 | 872 |
?> |
848 | 873 |
</div> |
849 | 874 |
</body> |
Also available in: Unified diff
some layout changes on the upgrade-script, fixed error in precheck