Revision 749
Added by doc over 16 years ago
trunk/CHANGELOG | ||
---|---|---|
12 | 12 |
|
13 | 13 |
------------------------------------- 2.7.0 ------------------------------------- |
14 | 14 |
12-Mar-2008 Christian Sommer |
15 |
! removed hardcoded /admin folder strings from WB core files where possible |
|
15 | 16 |
! added WB home folder fix proposed by the forum member spawnferkel (thanks) |
16 | 17 |
! defined <strong> and <em> instead of <b> and <i> as default tags |
17 | 18 |
12-Mar-2008 Thomas Hornik |
trunk/wb/upgrade-script.php | ||
---|---|---|
26 | 26 |
/** |
27 | 27 |
PHP ROUTINES FOR THE UPGRADE SCRIPT |
28 | 28 |
**/ |
29 |
@include_once('config.php'); |
|
30 |
|
|
29 | 31 |
// this function checks the basic configurations of an existing WB intallation |
30 | 32 |
function status_msg($message, $class='check', $element='span') { |
31 | 33 |
// returns a status message |
... | ... | |
34 | 36 |
|
35 | 37 |
function check_baseline_configuration() { |
36 | 38 |
// check if config.php file exists and contains values |
39 |
global $database; |
|
37 | 40 |
status_msg('config.php: '); |
38 |
@include_once('config.php'); |
|
39 |
if(defined('WB_PATH')) { |
|
41 |
if(defined('WB_PATH') && defined('ADMIN_PATH')) { |
|
40 | 42 |
status_msg('OK', 'ok'); |
41 | 43 |
} else { |
42 | 44 |
// output error message and return error status |
... | ... | |
51 | 53 |
// check if the WB 2.7 installation files were already uploaded via FTP |
52 | 54 |
status_msg(', WB 2.7 core files uploaded: '); |
53 | 55 |
@include_once(WB_PATH .'/framework/functions.php'); |
54 |
@include_once(WB_PATH .'/admin/interface/version.php');
|
|
56 |
@include_once(ADMIN_PATH .'/interface/version.php');
|
|
55 | 57 |
if(defined('VERSION') && VERSION == '2.7' |
56 | 58 |
&& function_exists('get_variable_content') |
57 | 59 |
&& file_exists(WB_PATH .'/modules/menu_link/languages/DE.php') |
58 | 60 |
&& file_exists(WB_PATH .'/modules/output_filter/filter-routines.php') |
59 | 61 |
&& file_exists(WB_PATH .'/modules/captcha_control/languages/DE.php') |
60 | 62 |
&& file_exists(WB_PATH .'/modules/jsadmin/jsadmin_backend_include.php') |
61 |
&& file_exists(WB_PATH .'/admin/admintools/tool.php')
|
|
62 |
&& file_exists(WB_PATH .'/admin/interface/er_levels.php')) {
|
|
63 |
&& file_exists(ADMIN_PATH .'/admintools/tool.php')
|
|
64 |
&& file_exists(ADMIN_PATH .'/interface/er_levels.php')) {
|
|
63 | 65 |
status_msg('OK','ok'); |
64 | 66 |
} else { |
65 | 67 |
// output a warning and return error status |
... | ... | |
117 | 119 |
|
118 | 120 |
#container { |
119 | 121 |
width:85%; |
120 |
background: #9ACBF1 url(admin/interface/background.png) repeat-x;
|
|
122 |
background: #9ACBF1 url(<?php echo ADMIN_URL;?>/interface/background.png) repeat-x;
|
|
121 | 123 |
border:1px solid #000; |
122 | 124 |
color:#000; |
123 | 125 |
margin:2em auto; |
... | ... | |
155 | 157 |
</head> |
156 | 158 |
<body> |
157 | 159 |
<div id="container"> |
158 |
<img src="admin/interface/logo.png" alt="Website Baker Logo" />
|
|
160 |
<img src="<?php echo ADMIN_URL;?>/interface/logo.png" alt="Website Baker Logo" />
|
|
159 | 161 |
|
160 | 162 |
<h1>Website Baker Upgrade</h1> |
161 | 163 |
<p>This script is for <strong>upgrading an existing v2.6.7</strong> installation to the latest Website Baker <strong>version 2.7</strong>. The upgrade script checks the configuration of your installed Website Baker system and alters the existing WB database to reflect the changes introduced with WB 2.7.</p> |
trunk/wb/framework/class.admin.php | ||
---|---|---|
79 | 79 |
$user_language = ($get_user_language) ? $get_user_language->fetchRow() : ''; |
80 | 80 |
// prevent infinite loop if language file is not XX.php (e.g. DE_du.php) |
81 | 81 |
$user_language = substr($user_language[0],0,2); |
82 |
// obtain the admin folder (e.g. /admin) |
|
83 |
$admin_folder = str_replace(WB_PATH, '', ADMIN_PATH); |
|
82 | 84 |
if((LANGUAGE != $user_language) && file_exists(WB_PATH .'/languages/' .$user_language .'.php') |
83 |
&& strpos($_SERVER['PHP_SELF'],'/admin/') !== false) {
|
|
85 |
&& strpos($_SERVER['PHP_SELF'],$admin_folder.'/') !== false) {
|
|
84 | 86 |
// check if page_id is set |
85 | 87 |
$page_id_url = (isset($_GET['page_id'])) ? '&page_id=' .(int) $_GET['page_id'] : ''; |
86 | 88 |
$section_id_url = (isset($_GET['section_id'])) ? '§ion_id=' .(int) $_GET['section_id'] : ''; |
trunk/wb/framework/class.frontend.php | ||
---|---|---|
402 | 402 |
require_once(WB_PATH.'/languages/'.DEFAULT_LANGUAGE.'.php'); |
403 | 403 |
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
404 | 404 |
<head><title>'.$MESSAGE['GENERIC']['WEBSITE_UNDER_CONSTRUCTION'].'</title> |
405 |
<style type="text/css"><!-- body{ font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px; background-image: url("admin/interface/background.png");background-repeat: repeat-x; margin: 20px; text-align: center; }
|
|
405 |
<style type="text/css"><!-- body{ font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px; background-image: url("'.ADMIN_URL.'/interface/background.png");background-repeat: repeat-x; margin: 20px; text-align: center; }
|
|
406 | 406 |
h1 { margin: 0; padding: 0; }--></style></head><body> |
407 | 407 |
<h1>'.$MESSAGE['GENERIC']['WEBSITE_UNDER_CONSTRUCTION'].'</h1><br /> |
408 | 408 |
'.$MESSAGE['GENERIC']['PLEASE_CHECK_BACK_SOON'].'</body></html>'; |
trunk/wb/install/save.php | ||
---|---|---|
431 | 431 |
. ' )'; |
432 | 432 |
$database->query($pages); |
433 | 433 |
|
434 |
require(WB_PATH.'/admin/interface/version.php');
|
|
434 |
require(ADMIN_PATH.'/interface/version.php');
|
|
435 | 435 |
|
436 | 436 |
// Settings table |
437 | 437 |
$settings='CREATE TABLE `'.TABLE_PREFIX.'settings` ( `setting_id` INT NOT NULL auto_increment,' |
trunk/wb/modules/jsadmin/jsadmin_backend_include.php | ||
---|---|---|
32 | 32 |
// Direct access prevention |
33 | 33 |
defined('WB_PATH') OR die(header('Location: ../index.php')); |
34 | 34 |
|
35 |
// obtain the admin folder (e.g. /admin) |
|
36 |
$admin_folder = str_replace(WB_PATH, '', ADMIN_PATH); |
|
37 |
|
|
35 | 38 |
$JSADMIN_PATH = WB_URL.'/modules/jsadmin'; |
36 | 39 |
$YUI_PATH = WB_URL.'/include/yui'; |
37 | 40 |
$script = $_SERVER['SCRIPT_NAME']; |
38 | 41 |
if(!$script) |
39 | 42 |
$script = $PHP_SELF; |
40 | 43 |
|
41 |
if(strstr($script, "/admin/pages/index.php"))
|
|
44 |
if(strstr($script, $admin_folder."/pages/index.php"))
|
|
42 | 45 |
$page_type = 'pages'; |
43 |
elseif(strstr($script, "/admin/pages/sections.php"))
|
|
46 |
elseif(strstr($script, $admin_folder."/pages/sections.php"))
|
|
44 | 47 |
$page_type = 'sections'; |
45 |
elseif(strstr($script, "/admin/settings/tool.php")
|
|
48 |
elseif(strstr($script, $admin_folder."/settings/tool.php")
|
|
46 | 49 |
&& isset($_REQUEST["tool"]) && $_REQUEST["tool"] == 'jsadmin') |
47 | 50 |
$page_type = 'config'; |
48 | 51 |
else |
Also available in: Unified diff
Removed hardcoded /admin folder strings from WB core files where possible