Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1454)
+++ branches/2.8.x/CHANGELOG	(revision 1455)
@@ -10,7 +10,9 @@
 # = Bugfix
 ! = Update/Change
 
-------------------------------------- 2.8.2 -------------------------------------
+------------------------------------- 2.8.2 ------------------------------------
+06 Jun-2011 Build 1455 Werner v.d.Decken(DarkViper)
+# fixed Bug-Ticket #1096: editing of files via modules/edit_module_files.php
 06 Jun-2011 Build 1454 Werner v.d.Decken(DarkViper)
 # in /framework/functions.php::media_filename - replace whitespaces by _
 # /upgrade-script.php - some small fixes
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1454)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1455)
@@ -52,6 +52,6 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.2.RC6');
-if(!defined('REVISION')) define('REVISION', '1454');
+if(!defined('REVISION')) define('REVISION', '1455');
 
 ?>
Index: branches/2.8.x/wb/modules/edit_module_files.php
===================================================================
--- branches/2.8.x/wb/modules/edit_module_files.php	(revision 1454)
+++ branches/2.8.x/wb/modules/edit_module_files.php	(revision 1455)
@@ -59,12 +59,12 @@
 		}
 		$modFileName = WB_PATH .'/modules/' .$mod_dir .'/' .$_edit_file;
 		if(($fileHandle = fopen($modFileName, 'wb'))) {
-			if(fwrite($mod_file, $css_content)) {
-				close($fileHandle);
+			if(fwrite($fileHandle, $css_content)) {
+				fclose($fileHandle);
 				$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
 				exit;
 			}
-			close($fileHandle);
+			fclose($fileHandle);
 		}
 		$admin->print_error($TEXT['ERROR'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
 		exit;
