Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1870)
+++ branches/2.8.x/CHANGELOG	(revision 1871)
@@ -12,6 +12,9 @@
 ===============================================================================
 
 
+23 Feb-2013 Build 1871 Dietmar Woellbrink (Luisehahne)
+# bugfix Undefined variable: sName in .../framework/functions.php
+# bugfix droplet ShowWysiwyg Undefined variable: module 
 21 Feb-2013 Build 1870 Dietmar Woellbrink (Luisehahne)
 # solved installation issues
 ! upgrade-script sanitize pages_directory before creating access files
Index: branches/2.8.x/wb/upgrade-script.php
===================================================================
--- branches/2.8.x/wb/upgrade-script.php	(revision 1870)
+++ branches/2.8.x/wb/upgrade-script.php	(revision 1871)
@@ -42,16 +42,16 @@
 
 }
 // solved wrong pages_directory value before creating access files
-$sql  = 'SELECT `value` FROM `'.TABLE_PREFIX.'settings` ';
-$sql .= 'WHERE `name`=\'pages_directory\' ';
-$sTmpDir = WbDatabase::getInstance()->get_one($sql);
-$sTmpDir = ( (strpos($sTmpDir,'/',0)===false) && (strlen($sTmpDir)>1)  ? '/'.$sTmpDir : rtrim($sTmpDir,'/') );
-$sPagesDir = defined('PAGES_DIRECTORY') ? PAGES_DIRECTORY : '';
-if(($sTmpDir != $sPagesDir)) {
-	$sql = 'UPDATE `'.TABLE_PREFIX.'settings` SET '
-		.  '`value` = \''.$sTmpDir.'\' '
-		.  'WHERE `name`=\'pages_directory\' ';
-	if(!WbDatabase::getInstance()->query($sql) ) {}
+$sql  = 'SELECT `value` FROM `'.TABLE_PREFIX.'settings` '
+      . 'WHERE `name`=\'pages_directory\'';
+$sPagesDirectory = WbDatabase::getInstance()->get_one($sql);
+$sTmp = trim($sPagesDirectory, '/');
+$sTmp = ($sTmp == '' ? '' : '/'.$sTmp);
+if($sTmp != $sPagesDirectory) {
+ $sql = 'UPDATE `'.TABLE_PREFIX.'settings` '
+      . 'SET `value` = \''.$sTmpDir.'\' '
+      . 'WHERE `name`=\'pages_directory\' ';
+ WbDatabase::getInstance()->query($sql);
 }
 //require_once(WB_PATH.'/framework/class.admin.php');
 if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1870)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1871)
@@ -51,5 +51,5 @@
 
 // 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.3');
-if(!defined('REVISION')) define('REVISION', '1870');
+if(!defined('REVISION')) define('REVISION', '1871');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/framework/functions.php
===================================================================
--- branches/2.8.x/wb/framework/functions.php	(revision 1870)
+++ branches/2.8.x/wb/framework/functions.php	(revision 1871)
@@ -809,7 +809,7 @@
 			// if OS is not windows then chmod the new file 
 				if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
 				// sanitize filemode to 'o-x/g-x/u-x/o+rw' and chmod the new file
-					$bRetval = chmod($sName, ((OCTAL_FILE_MODE & ~0111)|0600));
+					$bRetval = chmod($sFileName, ((OCTAL_FILE_MODE & ~0111)|0600));
 				}
 			}else {
 		        $sError = $MESSAGE['PAGES_CANNOT_CREATE_ACCESS_FILE'];
Index: branches/2.8.x/wb/modules/droplets/example/ShowWysiwyg.php
===================================================================
--- branches/2.8.x/wb/modules/droplets/example/ShowWysiwyg.php	(revision 1870)
+++ branches/2.8.x/wb/modules/droplets/example/ShowWysiwyg.php	(revision 1871)
@@ -1,6 +1,6 @@
 //:Display one defined WYSIWYG section
 //:Use [[ShowWysiwyg?section=10]]
-global $database, $section_id;
+global $database, $section_id, $module;
 $content = '';
 $section = isset($section) ? intval($section) : 0;
 if ($section) {
