Revision 1871
Added by Dietmar over 11 years ago
- bugfix Undefined variable: sName in .../framework/functions.php
- bugfix droplet ShowWysiwyg Undefined variable: module
upgrade-script.php | ||
---|---|---|
42 | 42 |
|
43 | 43 |
} |
44 | 44 |
// solved wrong pages_directory value before creating access files |
45 |
$sql = 'SELECT `value` FROM `'.TABLE_PREFIX.'settings` ';
|
|
46 |
$sql .= 'WHERE `name`=\'pages_directory\' ';
|
|
47 |
$sTmpDir = WbDatabase::getInstance()->get_one($sql);
|
|
48 |
$sTmpDir = ( (strpos($sTmpDir,'/',0)===false) && (strlen($sTmpDir)>1) ? '/'.$sTmpDir : rtrim($sTmpDir,'/') );
|
|
49 |
$sPagesDir = defined('PAGES_DIRECTORY') ? PAGES_DIRECTORY : '';
|
|
50 |
if(($sTmpDir != $sPagesDir)) {
|
|
51 |
$sql = 'UPDATE `'.TABLE_PREFIX.'settings` SET '
|
|
52 |
. '`value` = \''.$sTmpDir.'\' '
|
|
53 |
. 'WHERE `name`=\'pages_directory\' ';
|
|
54 |
if(!WbDatabase::getInstance()->query($sql) ) {}
|
|
45 |
$sql = 'SELECT `value` FROM `'.TABLE_PREFIX.'settings` ' |
|
46 |
. 'WHERE `name`=\'pages_directory\'';
|
|
47 |
$sPagesDirectory = WbDatabase::getInstance()->get_one($sql);
|
|
48 |
$sTmp = trim($sPagesDirectory, '/');
|
|
49 |
$sTmp = ($sTmp == '' ? '' : '/'.$sTmp);
|
|
50 |
if($sTmp != $sPagesDirectory) {
|
|
51 |
$sql = 'UPDATE `'.TABLE_PREFIX.'settings` '
|
|
52 |
. 'SET `value` = \''.$sTmpDir.'\' '
|
|
53 |
. 'WHERE `name`=\'pages_directory\' ';
|
|
54 |
WbDatabase::getInstance()->query($sql);
|
|
55 | 55 |
} |
56 | 56 |
//require_once(WB_PATH.'/framework/class.admin.php'); |
57 | 57 |
if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); } |
Also available in: Unified diff