Project

General

Profile

« Previous | Next » 

Revision 801

Added by doc over 16 years ago

Moved edit module CSS functions from modules to WB core (avoid code duplication; improve maintenance of code)

View differences:

modify_settings.php
28 28
// Include WB admin wrapper script
29 29
require(WB_PATH.'/modules/admin.php');
30 30

  
31
// include functions to edit the optional module CSS files (frontend.css, backend.css)
32
require_once('css.functions.php');
31
// include core functions of WB 2.7 to edit the optional module CSS files (frontend.css, backend.css)
32
@include_once(WB_PATH .'/framework/module.functions.php');
33 33

  
34 34
// check if module language file exists for the language set by the user (e.g. DE, EN)
35 35
if(!file_exists(WB_PATH .'/modules/news/languages/'.LANGUAGE .'.php')) {
......
58 58
?>
59 59
<h2><?php echo $MOD_NEWS['SETTINGS']; ?></h2>
60 60
<?php
61
	// include the button to edit the optional module CSS files
62
	// Note: CSS styles for the button are defined in backend.css (div class="mod_moduledirectory_edit_css")
63
	// Place this call outside of any <form></form> construct!!!
64
	css_edit('news');
61
// include the button to edit the optional module CSS files (function added with WB 2.7)
62
// Note: CSS styles for the button are defined in backend.css (div class="mod_moduledirectory_edit_css")
63
// Place this call outside of any <form></form> construct!!!
64
if(function_exists('edit_module_css')) {
65
	edit_module_css('news');
66
}
65 67
?>
66 68

  
67 69
<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_settings.php" method="post" style="margin: 0;">

Also available in: Unified diff