Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1817)
+++ branches/2.8.x/CHANGELOG	(revision 1818)
@@ -13,6 +13,10 @@
 
 
 
+16 Nov-2012 Build 1818 Dietmar Woellbrink (Luisehahne)
+# bugfix Ticket 10 usergroup show homefolder in media
+! update users, create username homefolder in media/homefolders
+# add mssing values in table settings by installing WebsiteBaker
 11 Nov-2012 Build 1817 Dietmar Woellbrink (Luisehahne)
 # Bugfix upgrde-script, syntaxerror in sql strict statement
 11 Nov-2012 Build 1816 Dietmar Woellbrink (Luisehahne)
Index: branches/2.8.x/wb/admin/media/rename2.php
===================================================================
--- branches/2.8.x/wb/admin/media/rename2.php	(revision 1817)
+++ branches/2.8.x/wb/admin/media/rename2.php	(revision 1818)
@@ -3,24 +3,30 @@
  *
  * @category        admin
  * @package         media
- * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
- * @copyright       2009-2011, Website Baker Org. e.V.
+ * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
+ * @copyright       2009-2012, WebsiteBaker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
  * @platform        WebsiteBaker 2.8.x
  * @requirements    PHP 5.2.2 and higher
  * @version         $Id$
- * @filesource		$HeadURL:  $
- * @lastmodified    $Date:  $
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
  *
  */
 
-// Create admin object
-require('../../config.php');
-require_once(WB_PATH.'/framework/class.admin.php');
-$admin = new admin('Media', 'media_rename', false);
+if(!defined('WB_URL'))
+{
+    $config_file = realpath('../../config.php');
+    if(file_exists($config_file) && !defined('WB_URL'))
+    {
+    	require($config_file);
+    }
+}
+if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
 
+$admin = new admin('Media', 'media', false);
+
 // Include the WB functions file
 require_once(WB_PATH.'/framework/functions.php');
 
@@ -33,9 +39,16 @@
 $rootlink = 'browse.php?dir=';
 // $file_id = intval($admin->get_post('id'));
 
+// Get the current dir
+$currentHome = $admin->get_home_folder();
+// check for correct directory
+if ($currentHome && stripos(WB_PATH.MEDIA_DIRECTORY.$rootlink,WB_PATH.MEDIA_DIRECTORY.$currentHome)===false) {
+	$rootlink = $currentHome;
+}
+
 // first Check to see if it contains ..
 if (!check_media_path($directory)) {
-	$admin->print_error($MESSAGE['MEDIA']['DIR_DOT_DOT_SLASH'],$rootlink, false);
+	$admin->print_error($MESSAGE['MEDIA_DIR_DOT_DOT_SLASH'],$rootlink, false);
 }
 
 // Get the temp id
@@ -93,12 +106,12 @@
 $file_id = $admin->getIDKEY($file_id);
 
 if(!isset($rename_file)) {
-	$admin->print_error($MESSAGE['MEDIA']['FILE_NOT_FOUND'], $dirlink, false);
+	$admin->print_error($MESSAGE['MEDIA_FILE_NOT_FOUND'], $dirlink, false);
 }
 
 // Check if they entered a new name
 if(media_filename($admin->get_post('name')) == "") {
-	$admin->print_error($MESSAGE['MEDIA']['BLANK_NAME'], "rename.php?dir=$directory&id=$file_id", false);
+	$admin->print_error($MESSAGE['MEDIA_BLANK_NAME'], "rename.php?dir=$directory&id=$file_id", false);
 } else {
 	$old_name = $admin->get_post('old_name');
 	$new_name =  media_filename($admin->get_post('name'));
@@ -107,7 +120,7 @@
 // Check if they entered an extension
 if($type == 'file') {
 	if(media_filename($admin->get_post('extension')) == "") {
-		$admin->print_error($MESSAGE['MEDIA']['BLANK_EXTENSION'], "rename.php?dir=$directory&id=$file_id", false);
+		$admin->print_error($MESSAGE['MEDIA_BLANK_EXTENSION'], "rename.php?dir=$directory&id=$file_id", false);
 	} else {
 		$extension = media_filename($admin->get_post('extension'));
 	}
@@ -123,22 +136,22 @@
 $dots = (substr($info['basename'], 0, 1) == '.') || (substr($info['basename'], -1, 1) == '.');
 
 if( preg_match('/'.$forbidden_file_types.'$/i', $ext) || $dots == '.' ) {
-	$admin->print_error($MESSAGE['MEDIA']['CANNOT_RENAME'], "rename.php?dir=$directory&id=$file_id", false);
+	$admin->print_error($MESSAGE['MEDIA_CANNOT_RENAME'], "rename.php?dir=$directory&id=$file_id", false);
 }
 
 // Check if the name contains ..
 if(strstr($name, '..')) {
-	$admin->print_error($MESSAGE['MEDIA']['NAME_DOT_DOT_SLASH'], "rename.php?dir=$directory&id=$file_id", false);
+	$admin->print_error($MESSAGE['MEDIA_NAME_DOT_DOT_SLASH'], "rename.php?dir=$directory&id=$file_id", false);
 }
 
 // Check if the name is index.php
 if($name == 'index.php') {
-	$admin->print_error($MESSAGE['MEDIA']['NAME_INDEX_PHP'], "rename.php?dir=$directory&id=$file_id", false);
+	$admin->print_error($MESSAGE['MEDIA_NAME_INDEX_PHP'], "rename.php?dir=$directory&id=$file_id", false);
 }
 
 // Check that the name still has a value
 if($name == '') {
-	$admin->print_error($MESSAGE['MEDIA']['BLANK_NAME'], "rename.php?dir=$directory&id=$file_id", false);
+	$admin->print_error($MESSAGE['MEDIA_BLANK_NAME'], "rename.php?dir=$directory&id=$file_id", false);
 }
 
 $info = pathinfo(WB_PATH.MEDIA_DIRECTORY.$directory.'/'.$rename_file);
@@ -146,15 +159,15 @@
 $dots = (substr($info['basename'], 0, 1) == '.') || (substr($info['basename'], -1, 1) == '.');
 
 if( preg_match('/'.$forbidden_file_types.'$/i', $ext) || $dots == '.' ) {
-	$admin->print_error($MESSAGE['MEDIA']['CANNOT_RENAME'], "rename.php?dir=$directory&id=$file_id", false);
+	$admin->print_error($MESSAGE['MEDIA_CANNOT_RENAME'], "rename.php?dir=$directory&id=$file_id", false);
 }
 
 // Check if we should overwrite or not
 if($admin->get_post('overwrite') != 'yes' AND file_exists(WB_PATH.MEDIA_DIRECTORY.$directory.'/'.$name) == true) {
 	if($type == 'folder') {
-		$admin->print_error($MESSAGE['MEDIA']['DIR_EXISTS'], "rename.php?dir=$directory&id=$file_id", false);
+		$admin->print_error($MESSAGE['MEDIA_DIR_EXISTS'], "rename.php?dir=$directory&id=$file_id", false);
 	} else {
-		$admin->print_error($MESSAGE['MEDIA']['FILE_EXISTS'], "rename.php?dir=$directory&id=$file_id", false);
+		$admin->print_error($MESSAGE['MEDIA_FILE_EXISTS'], "rename.php?dir=$directory&id=$file_id", false);
 	}
 }
 
@@ -164,7 +177,7 @@
     // feature freeze
 	// require_once(ADMIN_PATH.'/media/dse.php');
 
-	$admin->print_success($MESSAGE['MEDIA']['RENAMED'], $dirlink);
+	$admin->print_success($MESSAGE['MEDIA_RENAMED'], $dirlink);
 } else {
-	$admin->print_error($MESSAGE['MEDIA']['CANNOT_RENAME'], "rename.php?dir=$directory&id=$file_id", false);
+	$admin->print_error($MESSAGE['MEDIA_CANNOT_RENAME'], "rename.php?dir=$directory&id=$file_id", false);
 }

Property changes on: branches/2.8.x/wb/admin/media/rename2.php
___________________________________________________________________
Modified: svn:keywords
## -1 +1,4 ##
-Id
\ No newline at end of property
+Id
+Revision
+HeadURL
+Date
\ No newline at end of property
Index: branches/2.8.x/wb/admin/media/setparameter.php
===================================================================
--- branches/2.8.x/wb/admin/media/setparameter.php	(revision 1817)
+++ branches/2.8.x/wb/admin/media/setparameter.php	(revision 1818)
@@ -3,20 +3,28 @@
  *
  * @category        admin
  * @package         media
- * @author          Ryan Djurovich, WebsiteBaker Project
- * @copyright       2009-2011, Website Baker Org. e.V.
+ * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
+ * @copyright       2009-2012, WebsiteBaker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
  * @platform        WebsiteBaker 2.8.x
  * @requirements    PHP 5.2.2 and higher
  * @version         $Id$
- * @filesource		$HeadURL:  $
- * @lastmodified    $Date:  $
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
  *
  */
 
-require('../../config.php');
-require_once(WB_PATH.'/framework/class.admin.php');
+if(!defined('WB_URL'))
+{
+    $config_file = realpath('../../config.php');
+    if(file_exists($config_file) && !defined('WB_URL'))
+    {
+    	require($config_file);
+    }
+}
+if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
+
 $admin = new admin('Media', 'media', false);
 // Include the WB functions file
 require_once(WB_PATH.'/framework/functions.php');
@@ -29,6 +37,10 @@
 	// a theme language file exists for the language defined by the user, load it
 	require_once(THEME_PATH .'/languages/'.LANGUAGE .'.php');
 }
+// Get the current homedir
+$currentHome = WB_PATH.MEDIA_DIRECTORY.$admin->get_home_folder();
+$currentHome = str_replace(WB_PATH, '', $currentHome);
+$currentHome = str_replace(array('/',' '),'_',$currentHome);
 
 //Save post vars to the parameters file
 if ( !is_null($admin->get_post_escaped("save"))) {
@@ -39,7 +51,8 @@
 	}
 */
 
-	if(DEFAULT_THEME != ' wb_theme') {
+	$pathsettings = array();
+	if(DEFAULT_THEME != '') {
 		//Check for existing settings entry, if not existing, create a record first!
 		if (!$database->query ( "SELECT * FROM ".TABLE_PREFIX."settings where `name`='mediasettings'" )) {
 			$database->query ( "INSERT INTO ".TABLE_PREFIX."settings (`name`,`value`) VALUES ('mediasettings','')" );
@@ -48,7 +61,11 @@
 		$pathsettings = array();
 	}
 
+	$pathsettings['global']['admin_only'] = ($admin->get_post_escaped('admin_only')!='' ? 'checked="checked"' : '');
+	$pathsettings['global']['show_thumbs'] = ($admin->get_post_escaped('show_thumbs')!='' ? 'checked="checked"' : '');
+
 	$dirs = directory_list(WB_PATH.MEDIA_DIRECTORY);
+
 	$dirs[] = WB_PATH.MEDIA_DIRECTORY;
 	foreach($dirs AS $name) {
 		$r = str_replace(WB_PATH, '', $name);
@@ -55,11 +72,11 @@
 		$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; 
+		$pathsettings[$r]['width']=$w;
 		$pathsettings[$r]['height']=$h;
 	}
-	$pathsettings['global']['admin_only'] = ($admin->get_post_escaped('admin_only')!=''?'checked':'');
-	$pathsettings['global']['show_thumbs'] = ($admin->get_post_escaped('show_thumbs')!=''?'checked':'');
+//	$pathsettings['global']['admin_only'] = ($admin->get_post_escaped('admin_only')!='' ? 'checked="checked"' : '');
+//	$pathsettings['global']['show_thumbs'] = ($admin->get_post_escaped('show_thumbs')!='' ? 'checked="checked"' : '');
 	$fieldSerialized = serialize($pathsettings);
 	$database->query ( "UPDATE ".TABLE_PREFIX."settings SET `value` = '$fieldSerialized' WHERE `name`='mediasettings'" );
 	header ("Location: browse.php");
@@ -66,7 +83,7 @@
 }
 
 include ('parameters.php');
-if ($_SESSION['GROUP_ID'] != 1 && $pathsettings['global']['admin_only']) {
+if ($_SESSION['GROUP_ID'] != 1 && (isset($pathsettings['global']['admin_only']) && $pathsettings['global']['admin_only']) ) {
 	echo "Sorry, settings not available";
 	exit();
 }
@@ -82,7 +99,7 @@
 if ($_SESSION['GROUP_ID'] != 1) {
 	$template->set_var('DISPLAY_ADMIN', 'hide');
 }
-$template->set_var(array( 
+$template->set_var(array(
 				'TEXT_HEADER' => $TEXT['TEXT_HEADER'],
 				'SAVE_TEXT' => $TEXT['SAVE'],
 				'BACK' => $TEXT['BACK'],
@@ -92,6 +109,7 @@
 $template->set_block('main_block', 'list_block', 'list');
 $row_bg_color = '';
 $dirs = directory_list(WB_PATH.MEDIA_DIRECTORY);
+
 $dirs[] = WB_PATH.MEDIA_DIRECTORY;
 
 $array_lowercase = array_map('strtolower', $dirs);
@@ -101,15 +119,18 @@
 	$relative = str_replace(WB_PATH, '', $name);
 	$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'];
-	$cur_width = ($cur_width ? (int)$cur_width : '-');
-	$cur_height = ($cur_height ? (int)$cur_height : '-');
+	if (isset($pathsettings[$safepath]['width'])){ $cur_width = $pathsettings[$safepath]['width'];}
+	if (isset($pathsettings[$safepath]['height'])){ $cur_height = $pathsettings[$safepath]['height'];}
+	$cur_width = ($cur_width ? (int)$cur_width : '');
+	$cur_height = ($cur_height ? (int)$cur_height : '');
+//
+    $bPathCanEdit = (preg_match('/'.$currentHome.'/i', $safepath)) ? true : false;
 
-	if($row_bg_color == 'DEDEDE') $row_bg_color = 'EEEEEE';
-	else $row_bg_color = 'DEDEDE';
+//	if($row_bg_color == 'DEDEDE') $row_bg_color = 'EEEEEE';
+//	else $row_bg_color = 'DEDEDE';
+    $row_bg_color = ($row_bg_color == '#dedede') ? '#fff' : '#dedede';
 
-	$template->set_var(array( 
+	$template->set_var(array(
 					'ADMIN_URL' => ADMIN_URL,
 					'PATH_NAME' => $relative,
 					'WIDTH' => $TEXT['WIDTH'],
@@ -116,13 +137,15 @@
 					'HEIGHT' => $TEXT['HEIGHT'],
 					'FIELD_NAME_W' => $safepath.'-w',
 					'FIELD_NAME_H' => $safepath.'-h',
+					'CAN_EDIT_CLASS' => ($bPathCanEdit==false) ? '' : 'bold',
+					'READ_ONLY_DIR' => ($bPathCanEdit==false) ? ' readonly="readonly"' : '',
+					'CUR_HEIGHT' => $cur_height,
 					'CUR_WIDTH' => $cur_width,
-					'CUR_HEIGHT' => $cur_height,
 					'SETTINGS' => $TEXT['SETTINGS'],
 					'ADMIN_ONLY' => $TEXT['ADMIN_ONLY'],
-					'ADMIN_ONLY_SELECTED' => $pathsettings['global']['admin_only'],
+					'ADMIN_ONLY_SELECTED' => isset($pathsettings['global']['admin_only']) ? $pathsettings['global']['admin_only']:'',
 					'NO_SHOW_THUMBS' => $TEXT['NO_SHOW_THUMBS'],
-					'NO_SHOW_THUMBS_SELECTED' => $pathsettings['global']['show_thumbs'],
+					'NO_SHOW_THUMBS_SELECTED' => isset($pathsettings['global']['show_thumbs']) ? $pathsettings['global']['show_thumbs']:'',
 					'ROW_BG_COLOR' => $row_bg_color,
 					'FTAN' => $admin->getFTAN()
 				)

Property changes on: branches/2.8.x/wb/admin/media/setparameter.php
___________________________________________________________________
Modified: svn:keywords
## -1 +1,4 ##
-Id
\ No newline at end of property
+Id
+Revision
+HeadURL
+Date
\ No newline at end of property
Index: branches/2.8.x/wb/admin/media/browse.php
===================================================================
--- branches/2.8.x/wb/admin/media/browse.php	(revision 1817)
+++ branches/2.8.x/wb/admin/media/browse.php	(revision 1818)
@@ -3,21 +3,29 @@
  *
  * @category        admin
  * @package         media
- * @author          Ryan Djurovich, WebsiteBaker Project
- * @copyright       2009-2011, Website Baker Org. e.V.
+ * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
+ * @copyright       2009-2012, WebsiteBaker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
  * @platform        WebsiteBaker 2.8.x
  * @requirements    PHP 5.2.2 and higher
  * @version         $Id$
- * @filesource		$HeadURL:  $
- * @lastmodified    $Date:  $
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
  *
  */
 
 // Create admin object
-require('../../config.php');
+if(!defined('WB_URL'))
+{
+    $config_file = realpath('../../config.php');
+    if(file_exists($config_file) && !defined('WB_URL'))
+    {
+    	require($config_file);
+    }
+}
 if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
+
 $admin = new admin('Media', 'media', false);
 
 $starttime = explode(" ", microtime());
@@ -122,6 +130,7 @@
 
 // Get the current dir
 $currentHome = $admin->get_home_folder();
+// set directory if you call from menu
 $directory =	(($currentHome) AND (!array_key_exists('dir',$_GET)))
 				?
 				$currentHome
@@ -128,6 +137,11 @@
 				:
 				$admin->strip_slashes($admin->get_get('dir')) ;
 
+// check for correct directory
+if ($currentHome && stripos(WB_PATH.MEDIA_DIRECTORY.$directory,WB_PATH.MEDIA_DIRECTORY.$currentHome)===false) {
+	$directory = $currentHome;
+}
+
 if($directory == '/' OR $directory == '\\') {
 	$directory = '';
 }
@@ -152,7 +166,7 @@
 	exit(0);
 }
 
-if ($_SESSION['GROUP_ID'] != 1 && $pathsettings['global_admin_only']) { // Only show admin the settings link
+if ($_SESSION['GROUP_ID'] != 1 && (isset($pathsettings['global']['admin_only']) && $pathsettings['global']['admin_only']) ) { // Only show admin the settings link
 	$template->set_var('DISPLAY_SETTINGS', 'hide');
 }
 
@@ -200,7 +214,9 @@
 		if(substr($file, 0, 1) != '.' AND $file != '.svn' AND $file != 'index.php') {
 			if( !preg_match('/'.$forbidden_file_types.'$/i', $ext) ) {
 				if(is_dir(WB_PATH.MEDIA_DIRECTORY.$directory.'/'.$file)) {
-					if(!isset($home_folders[$directory.'/'.$file])) {
+//					if( !isset($home_folders[$directory.'/'.$file]) ) {
+                	if(!isset($home_folders[$directory.'/'.$file]) || $currentHome =='' )
+                    {
 						$DIR[] = $file;
 					}
 				} else {
@@ -267,8 +283,7 @@
 			$icon = '';
 			$tooltip = '';
 
-
-			if (!$pathsettings['global_show_thumbs']) {
+			if ( (isset($pathsettings['global']['show_thumbs']) && ($pathsettings['global']['show_thumbs']==false) ) ) {
 				$info = getimagesize(WB_PATH.MEDIA_DIRECTORY.$directory.'/'.$name);
 				if ($info[0]) {
 					$imgdetail = fsize(filesize(WB_PATH.MEDIA_DIRECTORY.$directory.'/'.$name)).'<br /> '.$info[0].' x '.$info[1].' px';
@@ -315,13 +330,15 @@
 	$template->set_var('DISPLAY_NONE_FOUND', 'hide');
 }
 
+if($currentHome=='') {
 // Insert permissions values
-if($admin->get_permission('media_rename') != true) {
-	$template->set_var('DISPLAY_RENAME', 'hide');
+    if($admin->get_permission('media_rename') != true) {
+    	$template->set_var('DISPLAY_RENAME', 'hide');
+    }
+    if($admin->get_permission('media_delete') != true) {
+    	$template->set_var('DISPLAY_DELETE', 'hide');
+    }
 }
-if($admin->get_permission('media_delete') != true) {
-	$template->set_var('DISPLAY_DELETE', 'hide');
-}
 
 // Insert language text and messages
 $template->set_var(array(

Property changes on: branches/2.8.x/wb/admin/media/browse.php
___________________________________________________________________
Modified: svn:keywords
## -1 +1,4 ##
-Id
\ No newline at end of property
+Id
+Revision
+HeadURL
+Date
\ No newline at end of property
Index: branches/2.8.x/wb/admin/media/delete.php
===================================================================
--- branches/2.8.x/wb/admin/media/delete.php	(revision 1817)
+++ branches/2.8.x/wb/admin/media/delete.php	(revision 1818)
@@ -3,24 +3,30 @@
  *
  * @category        admin
  * @package         admintools
- * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
- * @copyright       2009-2011, Website Baker Org. e.V.
+ * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
+ * @copyright       2009-2012, WebsiteBaker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
  * @platform        WebsiteBaker 2.8.x
  * @requirements    PHP 5.2.2 and higher
  * @version         $Id$
- * @filesource		$HeadURL:  $
- * @lastmodified    $Date:  $
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
  *
  */
 
-// Create admin object
-require('../../config.php');
-require_once(WB_PATH.'/framework/class.admin.php');
-$admin = new admin('Media', 'media_delete', false);
+if(!defined('WB_URL'))
+{
+    $config_file = realpath('../../config.php');
+    if(file_exists($config_file) && !defined('WB_URL'))
+    {
+    	require($config_file);
+    }
+}
+if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
 
+$admin = new admin('Media', 'media', false);
+
 // Include the WB functions file
 require_once(WB_PATH.'/framework/functions.php');
 
@@ -31,10 +37,17 @@
 $dirlink = 'browse.php?dir='.$directory;
 $rootlink = 'browse.php?dir=';
 
+// Get the current dir
+$currentHome = $admin->get_home_folder();
+// check for correct directory
+if ($currentHome && stripos(WB_PATH.MEDIA_DIRECTORY.$rootlink,WB_PATH.MEDIA_DIRECTORY.$currentHome)===false) {
+	$rootlink = $currentHome;
+}
+
 // Check to see if it contains ..
 if (!check_media_path($directory)) {
 	// $admin->print_header();
-	$admin->print_error($MESSAGE['MEDIA']['DIR_DOT_DOT_SLASH'],$rootlink,false );
+	$admin->print_error($MESSAGE['MEDIA_DIR_DOT_DOT_SLASH'],$rootlink,false );
 }
 
 // Get the file id
@@ -93,12 +106,12 @@
 
 // Check to see if we could find an id to match
 if(!isset($delete_file)) {
-	$admin->print_error($MESSAGE['MEDIA']['FILE_NOT_FOUND'], $dirlink, false);
+	$admin->print_error($MESSAGE['MEDIA_FILE_NOT_FOUND'], $dirlink, false);
 }
 $relative_path = WB_PATH.MEDIA_DIRECTORY.'/'.$directory.'/'.$delete_file;
 // Check if the file/folder exists
 if(!file_exists($relative_path)) {
-	$admin->print_error($MESSAGE['MEDIA']['FILE_NOT_FOUND'], $dirlink, false);
+	$admin->print_error($MESSAGE['MEDIA_FILE_NOT_FOUND'], $dirlink, false);
 }
 
 // Find out whether its a file or folder
@@ -105,17 +118,15 @@
 if($type == 'folder') {
 	// Try and delete the directory
 	if(rm_full_dir($relative_path)) {
-		$admin->print_success($MESSAGE['MEDIA']['DELETED_DIR'], $dirlink);
+		$admin->print_success($MESSAGE['MEDIA_DELETED_DIR'], $dirlink);
 	} else {
-		$admin->print_error($MESSAGE['MEDIA']['CANNOT_DELETE_DIR'], $dirlink, false);
+		$admin->print_error($MESSAGE['MEDIA_CANNOT_DELETE_DIR'], $dirlink, false);
 	}
 } else {
 	// Try and delete the file
 	if(unlink($relative_path)) {
-		$admin->print_success($MESSAGE['MEDIA']['DELETED_FILE'], $dirlink);
+		$admin->print_success($MESSAGE['MEDIA_DELETED_FILE'], $dirlink);
 	} else {
-		$admin->print_error($MESSAGE['MEDIA']['CANNOT_DELETE_FILE'], $dirlink, false);
+		$admin->print_error($MESSAGE['MEDIA_CANNOT_DELETE_FILE'], $dirlink, false);
 	}
 }
-
-?>
\ No newline at end of file

Property changes on: branches/2.8.x/wb/admin/media/delete.php
___________________________________________________________________
Modified: svn:keywords
## -1 +1,4 ##
-Id
\ No newline at end of property
+Id
+Revision
+HeadURL
+Date
\ No newline at end of property
Index: branches/2.8.x/wb/admin/media/create.php
===================================================================
--- branches/2.8.x/wb/admin/media/create.php	(revision 1817)
+++ branches/2.8.x/wb/admin/media/create.php	(revision 1818)
@@ -3,23 +3,27 @@
  *
  * @category        admin
  * @package         admintools
- * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
- * @copyright       2009-2011, Website Baker Org. e.V.
+ * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
+ * @copyright       2009-2012, WebsiteBaker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
  * @platform        WebsiteBaker 2.8.x
  * @requirements    PHP 5.2.2 and higher
  * @version         $Id$
- * @filesource		$HeadURL:  $
- * @lastmodified    $Date:  $
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
  *
  */
 
-// Print admin header
-require('../../config.php');
-
-require_once(WB_PATH.'/framework/class.admin.php');
+if(!defined('WB_URL'))
+{
+    $config_file = realpath('../../config.php');
+    if(file_exists($config_file) && !defined('WB_URL'))
+    {
+    	require($config_file);
+    }
+}
+if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
 // Include the WB functions file
 require_once(WB_PATH.'/framework/functions.php');
 
@@ -33,7 +37,7 @@
 // Check to see if name or target contains ../
 if(strstr($name, '..')) {
 	$admin->print_header();
-	$admin->print_error($MESSAGE['MEDIA']['NAME_DOT_DOT_SLASH']);
+	$admin->print_error($MESSAGE['MEDIA_NAME_DOT_DOT_SLASH']);
 }
 
 // Remove bad characters
@@ -52,7 +56,7 @@
 $admin->print_header();
 
 if (!check_media_path($target, false)) {
-	$admin->print_error($MESSAGE['MEDIA']['TARGET_DOT_DOT_SLASH']);
+	$admin->print_error($MESSAGE['MEDIA_TARGET_DOT_DOT_SLASH']);
 }
 
 // Create relative path of the new dir name
@@ -60,17 +64,17 @@
 
 // Check to see if the folder already exists
 if(file_exists($directory)) {
-	$admin->print_error($MESSAGE['MEDIA']['DIR_EXISTS']);
+	$admin->print_error($MESSAGE['MEDIA_DIR_EXISTS']);
 }
 
 if ( sizeof(createFolderProtectFile( $directory )) )
 {
-	$admin->print_error($MESSAGE['MEDIA']['DIR_NOT_MADE']);
+	$admin->print_error($MESSAGE['MEDIA_DIR_NOT_MADE']);
 } else {
 	$usedFiles = array();
     // feature freeze
 	// require_once(ADMIN_PATH.'/media/dse.php');
-	$admin->print_success($MESSAGE['MEDIA']['DIR_MADE']);
+	$admin->print_success($MESSAGE['MEDIA_DIR_MADE']);
 }
 
 // Print admin

Property changes on: branches/2.8.x/wb/admin/media/create.php
___________________________________________________________________
Modified: svn:keywords
## -1 +1,4 ##
-Id
\ No newline at end of property
+Id
+Revision
+HeadURL
+Date
\ No newline at end of property
Index: branches/2.8.x/wb/admin/media/parameters.php
===================================================================
--- branches/2.8.x/wb/admin/media/parameters.php	(revision 1817)
+++ branches/2.8.x/wb/admin/media/parameters.php	(revision 1818)
@@ -10,8 +10,8 @@
  * @platform        WebsiteBaker 2.8.x
  * @requirements    PHP 5.2.2 and higher
  * @version         $Id$
- * @filesource		$HeadURL:  $
- * @lastmodified    $Date:  $
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
  *
  */
 
@@ -19,11 +19,13 @@
 if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
 
 function __unserialize($sObject) {  // found in php manual :-)
-	$__ret =preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $sObject );
+    if($sObject=='') { return array( 'global' => array( 'admin_only' => false,'show_thumbs' => false ) );}
+	$__ret = preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $sObject );
 	return unserialize($__ret);
 }
-$pathsettings = array();
-if(DEFAULT_THEME != ' wb_theme') {
+
+$pathsettings = array( 'global' => array( 'admin_only' => false,'show_thumbs' => false ) );
+if(DEFAULT_THEME != '') {
 	$query = $database->query ( "SELECT * FROM ".TABLE_PREFIX."settings where `name`='mediasettings'" );
 	if ($query && $query->numRows() > 0) {
 		$settings = $query->fetchRow();

Property changes on: branches/2.8.x/wb/admin/media/parameters.php
___________________________________________________________________
Modified: svn:keywords
## -1 +1,4 ##
-Id
\ No newline at end of property
+Id
+Revision
+HeadURL
+Date
\ No newline at end of property
Index: branches/2.8.x/wb/admin/media/index.php
===================================================================
--- branches/2.8.x/wb/admin/media/index.php	(revision 1817)
+++ branches/2.8.x/wb/admin/media/index.php	(revision 1818)
@@ -3,21 +3,29 @@
  *
  * @category        admin
  * @package         admintools
- * @author          Ryan Djurovich, WebsiteBaker Project
- * @copyright       2009-2011, Website Baker Org. e.V.
+ * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
+ * @copyright       2009-2012, WebsiteBaker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
  * @platform        WebsiteBaker 2.8.x
  * @requirements    PHP 5.2.2 and higher
  * @version         $Id$
- * @filesource		$HeadURL:  $
- * @lastmodified    $Date:  $
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
  *
  */
 
 // Print admin header
-require('../../config.php');
-require_once(WB_PATH.'/framework/class.admin.php');
+if(!defined('WB_URL'))
+{
+    $config_file = realpath('../../config.php');
+    if(file_exists($config_file) && !defined('WB_URL'))
+    {
+    	require($config_file);
+    }
+}
+if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
+
 $admin = new admin('Media', 'media');
 
 $starttime = explode(" ", microtime());
@@ -41,7 +49,7 @@
 $dirs = directory_list(WB_PATH.MEDIA_DIRECTORY);
 $currentHome = $admin->get_home_folder();
 
-if ($currentHome){
+if ($currentHome!=''){
 	$dirs = directory_list(WB_PATH.MEDIA_DIRECTORY.$currentHome);
 }
 else
@@ -48,10 +56,13 @@
 {
 	$dirs = directory_list(WB_PATH.MEDIA_DIRECTORY);
 }
+
 $array_lowercase = array_map('strtolower', $dirs);
 array_multisort($array_lowercase, SORT_ASC, SORT_STRING, $dirs);
 foreach($dirs AS $name) {
-	if(!isset($home_folders[str_replace(WB_PATH.MEDIA_DIRECTORY, '', $name)])) {
+
+	if(!isset($home_folders[str_replace(WB_PATH.MEDIA_DIRECTORY, '', $name)]) || $currentHome =='' )
+    {
 		$template->set_var('NAME', str_replace(WB_PATH, '', $name));
 		$template->parse('dir_list', 'dir_list_block', true);
 	}
@@ -64,7 +75,8 @@
 if($admin->get_permission('media_upload') != true) {
 	$template->set_var('DISPLAY_UPLOAD', 'hide');
 }
-if ($_SESSION['GROUP_ID'] != 1 && $pathsettings['global']['admin_only']) { // Only show admin the settings link
+if ($_SESSION['GROUP_ID'] != 1 && (isset($pathsettings['global']['admin_only']) && $pathsettings['global']['admin_only'])) {
+    // Only show admin the settings link
 	$template->set_var('DISPLAY_SETTINGS', 'hide');
 }
 // Workout if the up arrow should be shown
@@ -94,6 +106,7 @@
 // Insert language text and messages
 $template->set_var(array(
 					'MEDIA_DIRECTORY' => MEDIA_DIRECTORY,
+//					'MEDIA_DIRECTORY' => ($currentHome!='') ? MEDIA_DIRECTORY : $currentHome,
 					'TEXT_NAME' => $TEXT['TITLE'],
 					'TEXT_RELOAD' => $TEXT['RELOAD'],
 					'TEXT_TARGET_FOLDER' => $TEXT['TARGET_FOLDER'],

Property changes on: branches/2.8.x/wb/admin/media/index.php
___________________________________________________________________
Modified: svn:keywords
## -1 +1,4 ##
-Id
\ No newline at end of property
+Id
+Revision
+HeadURL
+Date
\ No newline at end of property
Index: branches/2.8.x/wb/admin/media/rename.php
===================================================================
--- branches/2.8.x/wb/admin/media/rename.php	(revision 1817)
+++ branches/2.8.x/wb/admin/media/rename.php	(revision 1818)
@@ -3,23 +3,30 @@
  *
  * @category        admin
  * @package         media
- * @author          Ryan Djurovich, WebsiteBaker Project
- * @copyright       2009-2011, Website Baker Org. e.V.
+ * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
+ * @copyright       2009-2012, WebsiteBaker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
  * @platform        WebsiteBaker 2.8.x
  * @requirements    PHP 5.2.2 and higher
  * @version         $Id$
- * @filesource		$HeadURL:  $
- * @lastmodified    $Date:  $
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
  *
  */
 
-// Create admin object
-require('../../config.php');
-require_once(WB_PATH.'/framework/class.admin.php');
-$admin = new admin('Media', 'media_rename', false);
+if(!defined('WB_URL'))
+{
+    $config_file = realpath('../../config.php');
+    if(file_exists($config_file) && !defined('WB_URL'))
+    {
+    	require($config_file);
+    }
+}
+if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
 
+$admin = new admin('Media', 'media', false);
+
 // Include the WB functions file
 require_once(WB_PATH.'/framework/functions.php');
 
@@ -31,9 +38,16 @@
 $rootlink = 'browse.php?dir=';
 // $file_id = intval($admin->get_get('id'));
 
+// Get the current dir
+$currentHome = $admin->get_home_folder();
+// check for correct directory
+if ($currentHome && stripos(WB_PATH.MEDIA_DIRECTORY.$rootlink,WB_PATH.MEDIA_DIRECTORY.$currentHome)===false) {
+	$rootlink = $currentHome;
+}
+
 // first Check to see if it contains ..
 if (!check_media_path($directory)) {
-	$admin->print_error($MESSAGE['MEDIA']['DIR_DOT_DOT_SLASH'],$rootlink, false);
+	$admin->print_error($MESSAGE['MEDIA_DIR_DOT_DOT_SLASH'],$rootlink, false);
 }
 
 // Get the temp id
@@ -91,7 +105,7 @@
 }
 
 if(!isset($rename_file)) {
-	$admin->print_error($MESSAGE['MEDIA']['FILE_NOT_FOUND'], $dirlink, false);
+	$admin->print_error($MESSAGE['MEDIA_FILE_NOT_FOUND'], $dirlink, false);
 }
 
 // Setup template object, parse vars to it, then parse it

Property changes on: branches/2.8.x/wb/admin/media/rename.php
___________________________________________________________________
Modified: svn:keywords
## -1 +1,4 ##
-Id
\ No newline at end of property
+Id
+Revision
+HeadURL
+Date
\ No newline at end of property
Index: branches/2.8.x/wb/admin/skel/themes/htt/setparameter.htt
===================================================================
--- branches/2.8.x/wb/admin/skel/themes/htt/setparameter.htt	(revision 1817)
+++ branches/2.8.x/wb/admin/skel/themes/htt/setparameter.htt	(revision 1818)
@@ -1,14 +1,14 @@
-<!-- BEGIN main_block -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Set Upload Parameters</title>
+<!-- BEGIN main_block -->
 
-
 <style type="text/css">
 body,td,th,input,textarea {
 	font-family: Verdana, Arial, Helvetica, sans-serif;
-	font-size: 10px;
+	font-size: 11px;
+    text-align:left;
 }
 body {
 	background-color: #FFF;
@@ -30,31 +30,47 @@
 	text-decoration: none;
 	color: #336699;
 }
+.bold { color: #2C50A3; }
+.path-name { width: 65%;}
+tbody.path-option tr th  { font-weight: normal;}
+
 </style>
 </head>
 <body>
 
 <table summary="" cellpadding="4" cellspacing="0" border="0" width="100%" style="border-bottom: 1px solid #666; width: 100%;">
-<tr style="background-color: #DDD;">
-	<td align="center">{TEXT_HEADER}</td>
+<tr style="background-color: #ddd;">
+	<td>{TEXT_HEADER}</td>
 </tr>
 </table>
 <form method="post" action="{ADMIN_URL}/media/setparameter.php">
 	{FTAN}
 <table summary="" cellpadding="4" cellspacing="0" border="0" width="100%" class="{DISPLAY_LIST_TABLE}">
-	<tr><td>{SETTINGS}</td><td><input type="checkbox" name="show_thumbs" {NO_SHOW_THUMBS_SELECTED}> {NO_SHOW_THUMBS}</td></tr>
-	<tr class="{DISPLAY_ADMIN}"><td></td>&nbsp;<td><input type="checkbox" name="admin_only" {ADMIN_ONLY_SELECTED}> {ADMIN_ONLY}</td></tr>
-	<tr><td colspan="2" style="border-bottom: 1px solid #666; line-height: 1px;">&nbsp;</td></tr>
+<tbody class="path-option">
+	<tr><th>{SETTINGS}</th><th><input type="checkbox" name="show_thumbs" {NO_SHOW_THUMBS_SELECTED} /> {NO_SHOW_THUMBS}</th></tr>
+	<tr class="{DISPLAY_ADMIN}"><th>&nbsp;</th><th><input type="checkbox" name="admin_only" {ADMIN_ONLY_SELECTED} /> {ADMIN_ONLY}</th></tr>
+	<tr><th colspan="2" style="border-bottom: 1px solid #666; line-height: 1px;">&nbsp;</th></tr>
+</tbody>
+</table>
+
+<table summary="" cellpadding="4" cellspacing="0" border="0" width="100%" class="{DISPLAY_LIST_TABLE}">
+<tbody>
 <!-- BEGIN list_block -->
-	<tr style="background-color: #{ROW_BG_COLOR};">
-		<td>{PATH_NAME}</td>
-		<td>{WIDTH} <input size="5" type="text" name="{FIELD_NAME_W}" value="{CUR_WIDTH}"> {HEIGHT} <input size="5" type="text" name="{FIELD_NAME_H}" value="{CUR_HEIGHT}"></td>
+	<tr style="background-color: {ROW_BG_COLOR};" class="{CAN_EDIT_CLASS}">
+		<td class="path-name">{PATH_NAME}</td>
+		<td>
+        {WIDTH}
+        <input size="5" type="text" name="{FIELD_NAME_W}" value="{CUR_WIDTH}"{READ_ONLY_DIR} />
+        {HEIGHT}
+        <input size="5" type="text" name="{FIELD_NAME_H}" value="{CUR_HEIGHT}"{READ_ONLY_DIR} />
+        </td>
 	</tr>
 <!-- END list_block -->
 	<tr>
-		<td><input type="button" onclick="javascript: window.location = 'browse.php'" value="{BACK}"></td>
-		<td><input type="submit" name="save" value="{SAVE_TEXT}"></td>
+		<td><input type="button" onclick="javascript:window.location='browse.php'" value="{BACK}" /></td>
+		<td><input type="submit" name="save" value="{SAVE_TEXT}" /></td>
 	</tr>
+</tbody>
 </table>
 </form>
 </body>
Index: branches/2.8.x/wb/admin/skel/themes/htt/media_rename.htt
===================================================================
--- branches/2.8.x/wb/admin/skel/themes/htt/media_rename.htt	(revision 1817)
+++ branches/2.8.x/wb/admin/skel/themes/htt/media_rename.htt	(revision 1818)
@@ -30,7 +30,7 @@
 		</script>
 	</td>
 	<td width="50" class="{DISPlAY_EXTENSION}">
-		<input type="text" name="extension" style="width: 50px;" value="{EXTENSION}" />
+		<input type="text" name="extension" readonly="readonly" style="width: 50px;" value="{EXTENSION}" />
 	</td>
 </tr>
 <tr>
Index: branches/2.8.x/wb/admin/skel/themes/htt/media.htt
===================================================================
--- branches/2.8.x/wb/admin/skel/themes/htt/media.htt	(revision 1817)
+++ branches/2.8.x/wb/admin/skel/themes/htt/media.htt	(revision 1818)
@@ -37,7 +37,7 @@
             <td ><input type="file" name="file1" /> </td>
           </tr>
           <tr>
-            <td><input type="file" size="20" name="file2" id="file2" style="visibility: visible;" /> </td>
+            <td><input type="file" name="file2" id="file2" style="visibility: visible;" /> </td>
           </tr>
           <tr>
             <td><input type="file" name="file3" id="file3" style="visibility: visible;" /> </td>
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1817)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1818)
@@ -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', '1817');
+if(!defined('REVISION')) define('REVISION', '1818');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/admin/users/save.php
===================================================================
--- branches/2.8.x/wb/admin/users/save.php	(revision 1817)
+++ branches/2.8.x/wb/admin/users/save.php	(revision 1818)
@@ -164,6 +164,16 @@
             	$username_code = '';
             }
 
+            // Include the WB functions file
+            if(!function_exists('media_filename')) { require(WB_PATH.'/framework/functions.php'); }
+
+            // Remove bad characters
+            $sHomeFolder = WB_PATH.MEDIA_DIRECTORY.'/home/'.( media_filename($username) );
+            if ( sizeof(createFolderProtectFile( $sHomeFolder )) )
+            {
+//            	msgQueue::add($MESSAGE['MEDIA_DIR_NOT_MADE']);
+            }
+
 			$sql  = 'UPDATE `'.TABLE_PREFIX.'users` SET ';
             // Update the database
             if($password == "") {
Index: branches/2.8.x/wb/admin/users/add.php
===================================================================
--- branches/2.8.x/wb/admin/users/add.php	(revision 1817)
+++ branches/2.8.x/wb/admin/users/add.php	(revision 1818)
@@ -141,6 +141,16 @@
 		{
             //if user is in administrator-group, get this group else just get the first one
             if($admin->is_group_match($groups_id,'1')) { $group_id = 1; $groups_id = '1'; }
+
+            // Include the WB functions file
+            if(!function_exists('media_filename')) { require(WB_PATH.'/framework/functions.php'); }
+
+            // Remove bad characters
+            $sHomeFolder = WB_PATH.MEDIA_DIRECTORY.'/home/'.( media_filename($username) );
+            if ( sizeof(createFolderProtectFile( $sHomeFolder )) )
+            {
+            	msgQueue::add($MESSAGE['MEDIA_DIR_NOT_MADE'].' ('.basename($sHomeFolder).') ' );
+            }
             // Inser the user into the database
 			$sql  = 'INSERT INTO `'.TABLE_PREFIX.'users` SET '.
                     '`group_id`     = '.intval($group_id).', '.
Index: branches/2.8.x/wb/templates/wb_theme/css/screen.css
===================================================================
--- branches/2.8.x/wb/templates/wb_theme/css/screen.css	(revision 1817)
+++ branches/2.8.x/wb/templates/wb_theme/css/screen.css	(revision 1818)
@@ -17,7 +17,11 @@
 .input_large { width :300px; }
 .input_full { width :100%; }
 /*  */
-table { border-collapse :separate; width :100%; }
+table {
+   border-collapse :separate;
+   width :100%;
+   table-layout:fixed;
+}
 table.layout { table-layout :auto; }
 table.header { margin :auto; width :100%; }
 table.header td { min-width :10%; }
@@ -115,9 +119,18 @@
 .note { border :2px #448844 solid; padding :10px; margin :10px auto; background :#eeffee; color :#004400; }
 .important { border :2px #888844 solid; padding :10px; margin-bottom :1em; background :#ffffee; color :#444400; }
 .warning { border :2px #884444 solid; padding :10px; margin-bottom :1em; background :#ffeeee; color :#440000; }
-.section { background-color :#fdfdfd; border :1px solid #999999; font-size :0.9em; height :85px; margin :5px; padding :0; width :98%; }
 .graphic { border :4px solid #fdfdfd; height :50px; padding-left :3px; width :50px; }
 .graphic img { background-color :#ffffff; border :1px solid #d0d0d0; padding :4px; vertical-align :middle; width :50px; height :50px; }
+
+.section {
+   background-color :#fdfdfd;
+   border :1px solid #999999;
+   font-size :0.9em;
+   height :85px;
+   margin :5px;
+   padding :0;
+   width :98%;
+}
 .description { padding :4px 0 0; text-align :left; }
 .title { text-align :left; padding :4px 5px 0px 3px; font-weight :bold; font-size :1.2em; margin-bottom :5px; }
    span.title { display :block; }
@@ -128,7 +141,7 @@
 div.settings_table { margin :0 auto; width :90%; }
 form.settings_table { border :1px none #eeee; font-family :verdana,arial,helvetica,sans-serif; margin :5px auto; padding :5px; }
    form.settings_table fieldset { border :1px none #eeeeee; display :block; line-height :1.0em; margin :1px auto; padding :3px 0px 3px 0px; }
-   form input[type="file"] { width :80%; border :1px solid #000000; background-color :#ccccff; }
+   input[type="file"] { width :100%; border :1px solid #000000; background-color :#ccccff; }
    legend.settings_table ,
    form.settings_table legend { border :none; color :#006699; font-size :140%; margin :5px; padding :0; }
    form.settings_table div.sub-row { background-color :transparent !important; background-color :#eeeeee; }
@@ -178,7 +191,7 @@
 table.permission_box thead { text-align :left; background :#d2e8e8; }
 table.permission_box tbody { text-align :left; }
 table.permission_box td label { text-align :left; vertical-align :text-top; font-size :0.8em; }
-/**/
+/* */
 div.pages_list { font-size :0.6em; width :100%; }
 table.pages_list table td, 
 table.pages_view td { font-size :1.2em; padding :0 2px; vertical-align :middle; margin :0 auto; height :30px; }
@@ -192,19 +205,34 @@
 a:link { display :inline; font-weight :bold; padding-top :0; text-decoration :none; vertical-align :baseline; }
 a:visited { color :#0066cc; }
 a:hover { color :#6699ff; text-decoration :underline; }
-/**/
+/* */
 .header_list_actions { text-align :left; width :150px; }
 .header_list_block { text-align :left; width :120px; }
 .header_list_page_id { padding-right :15px; text-align :right; width :30px; }
 .header_list_page_title, 
 .list_page_title { width :350px; }
-.list_page_title, .list_menu_title, .header_list_menu_title, .header_list_type { text-align :left; vertical-align :middle; }
+/**/
+.list_page_title, .list_menu_title, 
+.header_list_menu_title, .header_list_type { text-align :left; vertical-align :middle; }
+
 .header_list_pubdate_start, 
 .header_list_pubdate_end, 
 .list_pubdate_start, 
-.list_pubdate_end { text-align :left; white-space :nowrap; width :185px; }
-.header_list_sections_actions { text-align :left; width :30px; }
-.header_list_type { font-size :1em; padding :4px 0; text-align :left; }
+.list_pubdate_end {
+   text-align :left;
+   white-space :nowrap;
+   width :185px;
+}
+.header_list_sections_actions {
+   text-align :left;
+   width :30px;
+}
+.header_list_type {
+   font-size :1em;
+   padding :4px 0;
+   text-align :left;
+   width :30%;
+}
 .jsadmin_drag img { cursor :pointer; margin-top :0px; padding :0px 0; vertical-align :baseline; }
 .list_actions { height :20px; padding :0 1px; text-align :left; width :20px; }
 .list_page_code, 
@@ -220,18 +248,19 @@
 .page_list_show li { display :block; }
 .pages_list 
 .icon_col td img { border-style :none; display :inline; float :left; padding-right :7px; }
-.pages_list 
+.pages_list {  } 
 .icon_col td img { border-style :none; display :inline; float :left; padding-right :7px; }
 .pages_list table { background-color :#dcdcdc; font-size :1.3em; margin :0 auto; table-layout :fixed; width :100%; }
 .pages_list ul { font-weight :normal; margin :0; padding :0px; }
 .pages_list ul li { list-style-type :none; margin :1px 0; padding :0; vertical-align :baseline; }
+
 .sectionrow { font-size :1.1em; height :30px; table-layout :fixed; }
 .sectionrow a:link { color :#003366; font-weight :bold; text-decoration :none; }
 .sectionrow a:hover { color :#6699ff; }
+.sections_list { padding :2px 0px 2px 5px; font-size :1.0em; width :100%; }
 .sections_list { background :#dddddd; font-size :1em; font-weight :bold; padding-left :10px; }
 .sections_list,
 .pages_list_header { font-weight :bold; line-height :1.5em; margin-bottom :5px; text-align :left; }
-.sections_list { padding :2px 0px 2px 5px; font-size :1.0em; }
 .pages_list_header { padding :2px 0px 2px 5px; font-size :1.3em; height :25px; }
 .header_list_menu_title { padding-left :30px; }
 .value_page_code { color :#006400; font-weight :400; width :240px; }
Index: branches/2.8.x/wb/templates/wb_theme/css/browse.css
===================================================================
--- branches/2.8.x/wb/templates/wb_theme/css/browse.css	(revision 1817)
+++ branches/2.8.x/wb/templates/wb_theme/css/browse.css	(revision 1818)
@@ -3,4 +3,5 @@
 hr {margin:0;color:#003366;height:1px;}
 .hide {display:none;}
 a:link, a:visited, a:active {color:#003366;text-decoration:none;}
-a:hover {text-decoration:none;color:#336699;}
\ No newline at end of file
+a:hover {text-decoration:none;color:#336699;}
+.bold { font-weight :bold; }
Index: branches/2.8.x/wb/install/save.php
===================================================================
--- branches/2.8.x/wb/install/save.php	(revision 1817)
+++ branches/2.8.x/wb/install/save.php	(revision 1818)
@@ -427,64 +427,69 @@
 	$database->query($settings);
 
 	$settings_rows=	"INSERT INTO `".TABLE_PREFIX."settings` "
-	." (name, value) VALUES "
-	." ('wb_version', '".VERSION."'),"
-	." ('wb_revision', '".REVISION."'),"
- 	." ('wb_sp', '".SP."'),"
-	." ('website_title', '$website_title'),"
-	." ('website_description', ''),"
-	." ('website_keywords', ''),"
-	." ('website_header', ''),"
-	." ('website_footer', ''),"
-	." ('wysiwyg_style', 'font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;'),"
-	." ('er_level', ''),"
-	." ('default_language', '$default_language'),"
-	." ('app_name', 'wb_$session_rand'),"
-	." ('sec_anchor', 'section_'),"
-	." ('default_timezone', '$default_timezone'),"
-	." ('default_date_format', 'M d Y'),"
-	." ('default_time_format', 'g:i A'),"
-	." ('redirect_timer', '1500'),"
-	." ('home_folders', 'true'),"
-	." ('warn_page_leave', '1'),"
-	." ('default_template', 'round'),"
-	." ('default_theme', 'wb_theme'),"
-	." ('default_charset', 'utf-8'),"
-	." ('multiple_menus', 'true'),"
-	." ('page_level_limit', '4'),"
-	." ('intro_page', 'false'),"
-	." ('page_trash', 'inline'),"
-	." ('homepage_redirection', 'false'),"
-	." ('page_languages', 'true'),"
-	." ('wysiwyg_editor', 'fckeditor'),"
-	." ('manage_sections', 'true'),"
-	." ('section_blocks', 'true'),"
-	." ('smart_login', 'false'),"
-	." ('frontend_login', 'false'),"
-	." ('frontend_signup', 'false'),"
-	." ('search', 'public'),"
-	." ('page_extension', '.php'),"
-	." ('page_spacer', '-'),"
-	." ('dev_infos', 'false'),"
-	." ('pages_directory', '/pages'),"
-	." ('page_icon_dir', '/templates/*/title_images'),"
-	." ('rename_files_on_upload', 'ph.*?,cgi,pl,pm,exe,com,bat,pif,cmd,src,asp,aspx'),"
-	." ('media_directory', '/media'),"
-	." ('operating_system', '$operating_system'),"
-	." ('string_file_mode', '$file_mode'),"
-	." ('string_dir_mode', '$dir_mode'),"
-	." ('wbmailer_routine', 'phpmail'),"
-	." ('server_email', '$admin_email'),"		// avoid that mail provider (e.g. mail.com) reject mails like yourname@mail.com
-	." ('wbmailer_default_sendername', 'WB Mailer'),"
-	." ('wbmailer_smtp_host', ''),"
-	." ('wbmailer_smtp_auth', ''),"
-	." ('wbmailer_smtp_username', ''),"
-	." ('wbmailer_smtp_password', ''),"
-	." ('fingerprint_with_ip_octets', '2'),"
-	." ('secure_form_module', ''),"
-    ." ('groups_updated', '".time()."' ),"
-	." ('page_extended', 'true'),"
-	." ('mediasettings', '')";
+	." (setting_id, name, value) VALUES "
+	." ( 1, 'wb_version', '".VERSION."'),"
+	." ( 2, 'website_title', '$website_title'),"
+	." ( 3, 'website_description', ''),"
+	." ( 4, 'website_keywords', ''),"
+	." ( 5, 'website_header', ''),"
+	." ( 6, 'website_footer', ''),"
+	." ( 7, 'wysiwyg_style', 'font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;'),"
+	." ( 8, 'rename_files_on_upload', 'ph.*?,cgi,pl,pm,exe,com,bat,pif,cmd,src,asp,aspx,js,txt'),"
+	." ( 9, 'er_level', '0'),"
+	." (10, 'default_language', '$default_language'),"
+	." (11, 'app_name', 'wb_$session_rand'),"
+	." (12, 'sec_anchor', 'section_'),"
+	." (13, 'default_timezone', '$default_timezone'),"
+	." (14, 'default_date_format', 'M d Y'),"
+	." (15, 'default_time_format', 'h:i A'),"
+	." (16, 'redirect_timer', '1500'),"
+	." (17, 'home_folders', 'true'),"
+	." (18, 'warn_page_leave', '1'),"
+	." (19, 'default_template', 'round'),"
+	." (20, 'default_theme', 'wb_theme'),"
+	." (21, 'default_charset', 'utf-8'),"
+	." (22, 'multiple_menus', 'true'),"
+	." (23, 'page_level_limit', '6'),"
+	." (24, 'intro_page', 'false'),"
+	." (25, 'page_trash', 'inline'),"
+	." (26, 'homepage_redirection', 'false'),"
+	." (27, 'page_languages', 'true'),"
+	." (28, 'wysiwyg_editor', 'fckeditor'),"
+	." (29, 'manage_sections', 'true'),"
+	." (30, 'section_blocks', 'false'),"
+	." (31, 'smart_login', 'false'),"
+	." (32, 'frontend_login', 'false'),"
+	." (33, 'frontend_signup', 'false'),"
+	." (34, 'search', 'public'),"
+	." (35, 'page_extension', '.php'),"
+	." (36, 'page_spacer', '-'),"
+	." (37, 'pages_directory', '/pages'),"
+	." (38, 'rename_files_on_upload', 'ph.*?,cgi,pl,pm,exe,com,bat,pif,cmd,src,asp,aspx,js,txt'),"
+	." (39, 'media_directory', '/media'),"
+	." (40, 'operating_system', '$operating_system'),"
+	." (41, 'string_file_mode', '$file_mode'),"
+	." (42, 'string_dir_mode', '$dir_mode'),"
+	." (43, 'wbmailer_routine', 'phpmail'),"
+	." (44, 'server_email', '$admin_email'),"
+	." (45, 'wbmailer_default_sendername', 'WebsiteBaker Mailer'),"
+	." (46, 'wbmailer_smtp_host', ''),"
+	." (47, 'wbmailer_smtp_auth', ''),"
+	." (48, 'wbmailer_smtp_username', ''),"
+	." (49, 'wbmailer_smtp_password', ''),"
+	." (50, 'fingerprint_with_ip_octets', '2'),"
+	." (51, 'secure_form_module', ''),"
+	." (52, 'mediasettings', ''),"
+	." (53, 'wb_revision', '".REVISION."'),"
+ 	." (54, 'wb_sp', '".SP."'),"
+	." (55, 'page_icon_dir', '/templates/*/title_images'),"
+	." (56, 'dev_infos', 'false'),"
+	." (57, 'groups_updated', '".time()."'),"
+	." (58, 'website_signature', ''),"
+	." (59, 'confirmed_registration', '1'),"
+	." (60, 'page_extended', 'true'),"
+	." (61, 'modules_upgrade_list', 'news,wysiwyg,form'),"
+	." (62, 'system_locked', '0')";
 	$database->query($settings_rows);
 
 	// Users table
@@ -626,7 +631,7 @@
 	$insert_search_module_order = "INSERT INTO `".TABLE_PREFIX."search` VALUES ('', 'module_order', '$search_module_order', '')";
 	$database->query($insert_search_module_order);
 	// Search max lines of excerpt
-	$search_max_excerpt = addslashes('15');
+	$search_max_excerpt = addslashes('5');
 	$insert_search_max_excerpt = "INSERT INTO `".TABLE_PREFIX."search` VALUES ('', 'max_excerpt', '$search_max_excerpt', '')";
 	$database->query($insert_search_max_excerpt);
 	// max time to search per module
@@ -690,6 +695,10 @@
 		set_error($database->get_error());
 	}
 
+if ( sizeof(createFolderProtectFile( WB_PATH.MEDIA_DIRECTORY )) ) {  }
+if ( sizeof(createFolderProtectFile( WB_PATH.MEDIA_DIRECTORY.'/home' )) ) {  }
+if ( sizeof(createFolderProtectFile( WB_PATH.PAGES_DIRECTORY )) ) {  }
+
 // end of if install_tables
 
 $ThemeUrl = WB_URL.$admin->correct_theme_source('warning.html');
