Revision 1576
Added by darkviper almost 14 years ago
| upgrade.php | ||
|---|---|---|
| 4 | 4 |
* @category modules |
| 5 | 5 |
* @package wysiwyg |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2009-2011, Website Baker Org. e.V.
|
|
| 7 |
* @copyright 2009-2012, Website Baker Org. e.V.
|
|
| 8 | 8 |
* @link http://www.websitebaker2.org/ |
| 9 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| 10 | 10 |
* @platform WebsiteBaker 2.8.x |
| ... | ... | |
| 14 | 14 |
* @lastmodified $Date$ |
| 15 | 15 |
* |
| 16 | 16 |
*/ |
| 17 |
// Must include code to stop this file being access directly |
|
| 18 | 17 |
/* -------------------------------------------------------- */ |
| 19 |
if(defined('WB_PATH') == false)
|
|
| 20 |
{
|
|
| 21 |
// Stop this file being access directly
|
|
| 22 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
| 18 |
// Must include code to stop this file being accessed directly
|
|
| 19 |
if(!defined('WB_PATH')) {
|
|
| 20 |
require_once(dirname(dirname(__FILE__)).'/framework/globalExceptionHandler.php');
|
|
| 21 |
throw new IllegalFileException();
|
|
| 23 | 22 |
} |
| 24 | 23 |
/* -------------------------------------------------------- */ |
| 25 | 24 |
|
| ... | ... | |
| 32 | 31 |
} |
| 33 | 32 |
} |
| 34 | 33 |
} else {
|
| 35 |
$msg = $database->get_error();
|
|
| 34 |
$msg .= $database->get_error().'<br />';
|
|
| 36 | 35 |
} |
| 36 |
// change internal absolute links into relative links |
|
| 37 |
$sTable = TABLE_PREFIX.'mod_wysiwyg'; |
|
| 38 |
$sql = 'UPDATE `'.$sTable.'` '; |
|
| 39 |
$sql .= 'SET `content` = REPLACE(`content`, \'"'.WB_URL.MEDIA_DIRECTORY.'\', \'"{SYSVAR:MEDIA_REL}\')';
|
|
| 40 |
if (!$database->query($sql)) {
|
|
| 41 |
$msg .= $database->get_error().'<br />'; |
|
| 42 |
} |
|
| 43 |
|
|
| 37 | 44 |
// ------------------------------------ |
Also available in: Unified diff
wysiwyg module changed to domain independend image links