Revision 1640
Added by Dietmar over 12 years ago
save.php | ||
---|---|---|
33 | 33 |
|
34 | 34 |
// Include the WB functions file |
35 | 35 |
require_once(WB_PATH.'/framework/functions.php'); |
36 |
|
|
36 |
$aErrors = array(); |
|
37 | 37 |
$sMediaUrl = WB_URL.MEDIA_DIRECTORY; |
38 | 38 |
// Update the mod_wysiwygs table with the contents |
39 | 39 |
if(isset($_POST['content'.$section_id])) { |
... | ... | |
50 | 50 |
$sql = 'UPDATE `'.TABLE_PREFIX.'mod_wysiwyg` '; |
51 | 51 |
$sql .= 'SET `content`=\''.$content.'\', `text`=\''.$text.'\' '; |
52 | 52 |
$sql .= 'WHERE `section_id`='.(int)$section_id; |
53 |
$database->query($sql); |
|
53 |
if(!$database->query($sql)){ |
|
54 |
$aErrors[] = $MESSAGE['GENERIC_NOT_UPGRADED'].((defined('DEBUG') && DEBUG) ? '<br />'.$database->get_error() : ''); |
|
55 |
} |
|
56 |
} else { |
|
57 |
$aErrors[] = $MESSAGE['GENERIC_NOT_UPGRADED'].((defined('DEBUG') && DEBUG) ? '<br />'.$MESSAGE['FRONTEND_SORRY_NO_ACTIVE_SECTIONS'] : ''); |
|
54 | 58 |
} |
55 | 59 |
|
56 | 60 |
$sec_anchor = (defined( 'SEC_ANCHOR' ) && ( SEC_ANCHOR != '' ) ? '#'.SEC_ANCHOR.$section['section_id'] : '' ); |
... | ... | |
61 | 65 |
} |
62 | 66 |
|
63 | 67 |
// Check if there is a database error, otherwise say successful |
64 |
if($database->is_error()) {
|
|
65 |
$admin->print_error($database->get_error(), $js_back);
|
|
68 |
if(sizeof($aErrors) ) {
|
|
69 |
$admin->print_error( implode('<br />',$aErrors), $edit_page);
|
|
66 | 70 |
} else { |
67 |
$admin->print_success($MESSAGE['PAGES_SAVED'], $edit_page );
|
|
71 |
$admin->print_success($MESSAGE['GENERIC_UPGRADED'], $edit_page );
|
|
68 | 72 |
} |
69 | 73 |
|
70 | 74 |
// Print admin footer |
Also available in: Unified diff
! optimize modules WYSIWYG for editors