Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 1101)
+++ trunk/CHANGELOG	(revision 1102)
@@ -11,6 +11,10 @@
 ! = Update/Change
 
 ------------------------------------- 2.8.0 -------------------------------------
+30-July-2009 Ruud Eisinga (Ruud)
+#	Fixed a bug in the /admin/media resizer parameters for dirs with whitespaces (thnx to tiesy)
+#	Fixed a bug in FCKeditor include.php. Now the editor can be used from other 
+	subdirectories than WB_PATH/modules/mymodule
 29-July 2009 Dietrich Roland Pehlke (Aldus)
 #	changes in framework/class.wb.php to avoid the "print->footer()" bug in the frontend,
 	as this function/method doesn't exists for the frontend.
Index: trunk/wb/admin/media/setparameter.php
===================================================================
--- trunk/wb/admin/media/setparameter.php	(revision 1101)
+++ trunk/wb/admin/media/setparameter.php	(revision 1102)
@@ -48,7 +48,7 @@
 	$dirs[] = WB_PATH.MEDIA_DIRECTORY;
 	foreach($dirs AS $name) {
 		$r = str_replace(WB_PATH, '', $name);
-		$r = str_replace('/','_',$r);
+		$r = str_replace(array('/',' '),'_',$r);
 		$w = (int)$admin->get_post_escaped($r.'-w');
 		$h = (int)$admin->get_post_escaped($r.'-h');
 		$pathsettings[$r]['width']=$w; 
@@ -94,7 +94,7 @@
 
 foreach($dirs AS $name) {
 	$relative = str_replace(WB_PATH, '', $name);
-	$safepath = str_replace('/','_',$relative);
+	$safepath = str_replace(array('/',' '),'_',$relative);
 	$cur_width = $cur_height = '';
 	if (isset($pathsettings[$safepath]['width'])) $cur_width = $pathsettings[$safepath]['width'];
 	if (isset($pathsettings[$safepath]['height'])) $cur_height = $pathsettings[$safepath]['height'];
Index: trunk/wb/admin/media/upload.php
===================================================================
--- trunk/wb/admin/media/upload.php	(revision 1101)
+++ trunk/wb/admin/media/upload.php	(revision 1102)
@@ -50,7 +50,7 @@
 
 // Create relative path of the target location for the file
 $relative = WB_PATH.$target.'/';
-$resizepath = str_replace('/','_',$target);
+$resizepath = str_replace(array('/',' '),'_',$target);
 
 // Find out whether we should replace files or give an error
 if($admin->get_post('overwrite') != '') {
Index: trunk/wb/modules/fckeditor/include.php
===================================================================
--- trunk/wb/modules/fckeditor/include.php	(revision 1101)
+++ trunk/wb/modules/fckeditor/include.php	(revision 1102)
@@ -30,7 +30,9 @@
 
 function get_template_name() {
 	// returns the template name of the current displayed page
-	require_once('../../config.php');
+
+	// Loading config.php is not needed here, it is loaded before. It breaks the module when the editor is called form another dir as WB_PATH/modules/mymodule
+	// require_once('../../config.php');
 	require_once(WB_PATH. '/framework/class.database.php');
 
 	// work out default editor.css file for FCKEditor
