Project

General

Profile

« Previous | Next » 

Revision 1910

Added by Dietmar about 11 years ago

! modules/wysiwyg/save.php use new methode in class.wb to replace absolute MediaUrl

View differences:

branches/2.8.x/CHANGELOG
12 12
===============================================================================
13 13

  
14 14

  
15
07 Jun-2013 Build 1910 Dietmar Woellbrink (Luisehahne)
16
! modules/wysiwyg/save.php use new methode in class.wb to replace absolute MediaUrl
15 17
07 Jun-2013 Build 1909 Dietmar Woellbrink (Luisehahne)
16 18
! install/save.php,search_modext.php set $sSectionIdPrefix (SEC_ANCHOR) to the right value
17 19
07 Jun-2013 Build 1908 Dietmar Woellbrink (Luisehahne)
branches/2.8.x/wb/admin/interface/version.php
51 51

  
52 52
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
53 53
if(!defined('VERSION')) define('VERSION', '2.8.3');
54
if(!defined('REVISION')) define('REVISION', '1909');
54
if(!defined('REVISION')) define('REVISION', '1910');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/modules/wysiwyg/save.php
4 4
 * @category        backend
5 5
 * @package         wysiwyg
6 6
 * @author          WebsiteBaker Project
7
 * @copyright       2009-2012, Website Baker Org. e.V.
8
 * @link			http://www.websitebaker2.org/
7
 * @copyright       2009-2013, WebsiteBaker Org. e.V.
8
 * @link            http://www.websitebaker.org/
9 9
 * @license         http://www.gnu.org/licenses/gpl.html
10
 * @platform        WebsiteBaker 2.8.x
10
 * @platform        WebsiteBaker 2.8.4
11 11
 * @requirements    PHP 5.2.2 and higher
12 12
 * @version         $Id$
13
 * @filesource		$HeadURL$
13
 * @filesource      $HeadURL$
14 14
 * @lastmodified    $Date$
15 15
 *
16 16
*/
......
34 34
// Include the WB functions file
35 35
require_once(WB_PATH.'/framework/functions.php');
36 36
$aErrors = array();
37
$sMediaUrl = WB_URL.MEDIA_DIRECTORY;
37
//$sMediaUrl = WB_URL.MEDIA_DIRECTORY;
38 38
// Update the mod_wysiwygs table with the contents
39 39
if(isset($_POST['content'.$section_id])) {
40 40
	$content = $_POST['content'.$section_id];
41
	if(ini_get('magic_quotes_gpc')==true)
42
	{
43
		$content = $admin->strip_slashes($_POST['content'.$section_id]);
44
	};
45
	$searchfor = '@(<[^>]*=\s*")('.preg_quote($sMediaUrl).')([^">]*".*>)@siU';
46
	$content = preg_replace($searchfor, '$1{SYSVAR:MEDIA_REL}$3', $content);
41
	$content = $admin->ReplaceAbsoluteMediaUrl($content);
47 42
	// searching in $text will be much easier this way
48 43
	$content = WbDatabase::getInstance()->escapeString ($content);
49 44
	$text = umlauts_to_entities(strip_tags($content), strtoupper(DEFAULT_CHARSET), 0);
......
57 52
	$aErrors[] = $MESSAGE['GENERIC_NOT_UPGRADED'].((defined('DEBUG') && DEBUG) ? '<br />'.$MESSAGE['FRONTEND_SORRY_NO_ACTIVE_SECTIONS'] : '');
58 53
}
59 54

  
60
$sec_anchor = '#'.(defined( 'SEC_ANCHOR' ) && ( SEC_ANCHOR != '' )  ? SEC_ANCHOR.$section_id : 'section_'.$section_id );
55
$sSectionIdPrefix = ( defined( 'SEC_ANCHOR' ) && ( SEC_ANCHOR != '' )  ? SEC_ANCHOR : 'Sec' );
61 56
if(defined('EDIT_ONE_SECTION') and EDIT_ONE_SECTION){
62 57
	$edit_page = ADMIN_URL.'/pages/modify.php?page_id='.$page_id.'&wysiwyg='.$section_id;
63 58
} else {
64
	$edit_page = ADMIN_URL.'/pages/modify.php?page_id='.$page_id.$sec_anchor;
59
	$edit_page = ADMIN_URL.'/pages/modify.php?page_id='.$page_id.'#'.$sSectionIdPrefix.$section_id;
65 60
}
66 61

  
67 62
// Check if there is a database error, otherwise say successful

Also available in: Unified diff