Project

General

Profile

« Previous | Next » 

Revision 1576

Added by darkviper over 12 years ago

wysiwyg module changed to domain independend image links

View differences:

save.php
4 4
 * @category        backend
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
......
35 35
// Include the WB functions file
36 36
require_once(WB_PATH.'/framework/functions.php');
37 37

  
38
$MEDIA_URL = WB_URL.MEDIA_DIRECTORY;
38 39
// Update the mod_wysiwygs table with the contents
39 40
if(isset($_POST['content'.$section_id])) {
40
	$content = $admin->add_slashes($_POST['content'.$section_id]);
41
    $content = $_POST['content'.$section_id];
42
    $searchfor = '#(<.*= *\")('.quotemeta($MEDIA_URL).')(.*\".*>)#iU';
43
    $content = preg_replace($searchfor, '$1{SYSVAR:MEDIA_REL}$3', $content);
44
    $content = $admin->add_slashes($content);
41 45
	// searching in $text will be much easier this way
42 46
	$text = umlauts_to_entities(strip_tags($content), strtoupper(DEFAULT_CHARSET), 0);
43 47
	$query = "UPDATE ".TABLE_PREFIX."mod_wysiwyg SET content = '$content', text = '$text' WHERE section_id = '$section_id'";

Also available in: Unified diff