Index: /extensions/File_Uploader/admin/admin_upload.php
===================================================================
--- /extensions/File_Uploader/admin/admin_upload.php	(revision 19874)
+++ /extensions/File_Uploader/admin/admin_upload.php	(revision 19875)
@@ -3,4 +3,5 @@
 
 include_once(PHPWG_ROOT_PATH . 'include/functions.inc.php');
+include_once(PHPWG_ROOT_PATH . 'admin/include/functions_upload.inc.php');
 
 global $template, $conf, $user, $page;
@@ -15,5 +16,5 @@
 			$file_uploader_errors['file'] = $file_uploader_upload_file['errors'];
 	} else {
-		$file_uploader_errors['file']['no_file'] = 'Specify a file to upload';
+		$file_uploader_errors['file']['no_file'] = l10n('Specify a file to upload');
 	}
 	
@@ -37,5 +38,6 @@
 
 function file_uploader_upload_file($file_uploader_file) {
-	include_once(dirname(__FILE__).'/install/config_default.inc.php');
+	require(FILE_UPLOADER_PATH.'install/config_default.inc.php');
+	require_once(FILE_UPLOADER_PATH.'install/functions.inc.php');
 	
 	global $conf;
@@ -43,4 +45,5 @@
 	
 	$file_uploader_file_tmp = $file_uploader_file['tmp_name'];
+	$file_uploader_file_title = substr($file_uploader_file['name'], 0, strrpos($file_uploader_file['name'], '.'));
 	$file_uploader_file_name = preg_replace('/[^a-zA-Z0-9s.]/', '_', $file_uploader_file['name']);
 	$file_uploader_file_name_wo_extension = substr($file_uploader_file_name, 0, strrpos($file_uploader_file_name, '.'));
@@ -58,4 +61,5 @@
 	$return = array();
 	
+	$return['title'] = $file_uploader_file_title;
 	$return['name_wo_extension'] = $file_uploader_file_name_wo_extension;
 	$return['extension'] = $file_uploader_file_extension;
@@ -64,4 +68,7 @@
 	$return['size'] = $file_uploader_file_size;
 	$return['overwrite'] = false;
+	
+	//Check if the folder file_uploader exists
+	file_uploader_folder($file_uploader_galleries_folder, $file_uploader_galleries_dir, $file_uploader_galleries_folder_name);
 	
 	//If the directory does not exist, we create it
@@ -74,6 +81,19 @@
 			$category_rank = pwg_db_fetch_assoc(pwg_query('SELECT MAX(rank) FROM '.CATEGORIES_TABLE.';'));
 			$category_rank = $category_rank['MAX(rank)'] + 1;
-			$file_uploader_physical_category_id = pwg_db_fetch_assoc(pwg_query('SELECT id FROM '.CATEGORIES_TABLE.' WHERE name = "'.$file_uploader_galleries_folder.'";'));
-			pwg_query('INSERT INTO '.CATEGORIES_TABLE.' (id, name, dir, rank, status, visible, uppercats, global_rank, site_id) VALUES ('.$next_id.', "'.$file_uploader_file_category.'", "'.$file_uploader_file_category.'", '.$category_rank.', "private", "'.boolean_to_string($conf['newcat_default_visible']).'", "'.$file_uploader_physical_category_id.'", '.$category_rank.', 1);');
+			$file_uploader_physical_category = pwg_db_fetch_assoc(pwg_query('SELECT id FROM '.CATEGORIES_TABLE.' WHERE dir = "'.$file_uploader_galleries_folder.'";'));
+			$insert = array(
+				'id' => $next_id,
+				'name' => $file_uploader_file_category,
+				'id_uppercat' => $file_uploader_physical_category['id'],
+				'comment' => 'Created by the File Uploader plugin',
+				'dir' => $file_uploader_file_category,
+				'rank' => $category_rank,
+				'status' => 'private',
+				'visible' => boolean_to_string($conf['newcat_default_visible']),
+				'uppercats' => $next_id.','.$file_uploader_physical_category['id'],
+				'global_rank' => $category_rank,
+				'site_id' => '1',
+			);
+			single_insert(CATEGORIES_TABLE, $insert);
 		}
 	
@@ -117,5 +137,5 @@
 
 function file_uploader_upload_thumbnail($file_uploader_thumbnail, $file_uploader_file_name_wo_extension, $file_uploader_file_extension, $file_uploader_file_folder) {
-	include_once(dirname(__FILE__).'/install/config_default.inc.php');
+	require(FILE_UPLOADER_PATH.'install/config_default.inc.php');
 	
 	$file_uploader_thumbnail_tmp = $file_uploader_thumbnail['tmp_name'];
@@ -179,5 +199,5 @@
 	$insert = array(
 		'file' => substr(strrchr($file_path, '/'), 1),
-		'name' => pwg_db_real_escape_string($file_uploader_file_properties['title']),
+		'name' => ($file_uploader_file_properties['title'] != '') ? pwg_db_real_escape_string($file_uploader_file_properties['title']) : $file_uploader_file['title'],
 		'comment' => pwg_db_real_escape_string($file_uploader_file_properties['description']),
 		'date_available' => $dbnow,
@@ -199,12 +219,15 @@
 	}
 	
+	if (!is_array($image_id))
+		$image_id = array($image_id);
+	
 	if(isset($file_uploader_file_properties['category']) and count($file_uploader_file_properties['category']) > 0) {
 		associate_images_to_categories(
-			array($image_id),
+			$image_id,
 			array($file_uploader_file_properties['category'], $physical_category_id['id'])
 		);
 	}
 	
-	@fill_caddie(array($image_id));
+	@fill_caddie($image_id);
 }
 
@@ -214,4 +237,20 @@
 display_select_cat_wrapper($query, array(), 'category_parent_options');
 
+//Add parameters to template
+$upload_max_filesize = min(get_ini_size('upload_max_filesize'), get_ini_size('post_max_size'));
+if ($upload_max_filesize == get_ini_size('upload_max_filesize')) {
+	$upload_max_filesize = get_ini_size('upload_max_filesize', true);
+} else {
+	$upload_max_filesize = get_ini_size('post_max_filesize', true);
+}
+$upload_max_filesize_display = round($upload_max_filesize/1024, 0, PHP_ROUND_HALF_DOWN);
+
+$template->assign(
+    array(
+		'upload_max_filesize' => $upload_max_filesize,
+		'upload_max_filesize_display' => $upload_max_filesize_display,
+    )
+);
+
 $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin_upload.tpl')); 
 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
Index: /extensions/File_Uploader/admin/admin_upload.tpl
===================================================================
--- /extensions/File_Uploader/admin/admin_upload.tpl	(revision 19874)
+++ /extensions/File_Uploader/admin/admin_upload.tpl	(revision 19875)
@@ -15,4 +15,8 @@
 				<input name="file_uploader_file" type="file" value=""{if isset($file_uploader_errors.file)} class="file_uploader_error"{/if}>
 				{foreach from=$file_uploader_errors.file item=error_description}<span class="file_uploader_error_description" title="{$error_description}">!</span>{/foreach}
+				<input type="hidden" name="MAX_FILE_SIZE" value="{$upload_max_filesize}">
+			</p>
+			<p class="file_uploader_center">
+				{'file_uploader_upload_max_filesize'|@translate} {$upload_max_filesize_display} Kio.
 			</p>
 		</fieldset>
Index: /extensions/File_Uploader/install/config_default.inc.php
===================================================================
--- /extensions/File_Uploader/install/config_default.inc.php	(revision 19874)
+++ /extensions/File_Uploader/install/config_default.inc.php	(revision 19875)
@@ -1,4 +1,5 @@
 <?php
 $file_uploader_galleries_folder = 'file_uploader';
+$file_uploader_galleries_folder_name = 'File Uploader';
 $file_uploader_galleries_dir = PHPWG_ROOT_PATH.'galleries/'.$file_uploader_galleries_folder.'/';
 
@@ -32,7 +33,7 @@
 );
 
-$config_default = array(
-	'new_tab' => 1,
-	'overwrite' => 0,
+$file_uploader_default_config = array(
+	'new_tab' => '1',
+	'overwrite' => '0',
 	'pdf2tab_extensions' => array('pdf', 'docx', 'doc', 'odt', 'xlsx', 'xls', 'ods', 'pptx', 'ppt', 'odp'),
 );
Index: /extensions/File_Uploader/install/functions.inc.php
===================================================================
--- /extensions/File_Uploader/install/functions.inc.php	(revision 19874)
+++ /extensions/File_Uploader/install/functions.inc.php	(revision 19875)
@@ -5,23 +5,21 @@
 }
 
-function file_uploader_update_db() {
+function file_uploader_update_db($file_uploader_default_config) {
 	global $conf;
-	include(dirname(__FILE__).'/config_default.inc.php');
-
+	
 	$config = array();
-	if (isset($conf['file_uploader']))
+	
+	if (isset($conf['file_uploader'])) {
 		$conf_file_uploader = unserialize($conf['file_uploader']);
-	
-	if (isset($conf_file_uploader)) {
-		foreach ($config_default as $key => $value) {
+		foreach ($file_uploader_default_config as $key => $value) {
 			if (isset($conf_file_uploader[$key]))
 				$config[$key] = $conf_file_uploader[$key];
 			else
-				$config[$key] = $config_default[$key];
+				$config[$key] = $file_uploader_default_config[$key];
 		}
 		file_uploader_delete_conf("file_uploader");
 		file_uploader_install($config);
 	} else {
-		file_uploader_install($config_default);
+		file_uploader_install($file_uploader_default_config);
 	}
 }
@@ -32,15 +30,15 @@
 }
 
-function file_uploader_folder($file_uploader_galleries_folder, $file_uploader_galleries_dir) {
+function file_uploader_folder($file_uploader_galleries_folder, $file_uploader_galleries_dir, $file_uploader_galleries_folder_name) {
 	//If the directory does not exist, we create it
 	if (!file_exists($file_uploader_galleries_dir))
 		if(!mkdir($file_uploader_galleries_dir))
 			array_push($page['errors'], l10n('Unable to create folder ').$file_uploader_galleries_dir);
-		//If the physical category si not in database, we add it
-		else if (pwg_db_num_rows(pwg_query('SELECT id FROM '.CATEGORIES_TABLE.' WHERE name = "'.$file_uploader_galleries_folder.'";')) == 0){
+		//If the physical category is not in database, we add it
+		else if (pwg_db_num_rows(pwg_query('SELECT id FROM '.CATEGORIES_TABLE.' WHERE dir = "'.$file_uploader_galleries_folder.'";')) == 0){
 			$next_id = pwg_db_nextval('id', CATEGORIES_TABLE);
 			$category_rank = pwg_db_fetch_assoc(pwg_query('SELECT MAX(rank) FROM '.CATEGORIES_TABLE.';'));
 			$category_rank = $category_rank['MAX(rank)'] + 1;
-			pwg_query('INSERT INTO '.CATEGORIES_TABLE.' (id, name, dir, rank, status, visible, uppercats, global_rank, site_id) VALUES ('.$next_id.', "'.$file_uploader_galleries_folder.'", "'.$file_uploader_file_category.'", '.$category_rank.', "private", "true", "'.$next_id.'", '.$category_rank.', 1);');
+			pwg_query('INSERT INTO '.CATEGORIES_TABLE.' (id, name, comment, dir, rank, status, visible, uppercats, global_rank, site_id) VALUES ('.$next_id.', "'.$file_uploader_galleries_folder_name.'", "Created by the File Uploader plugin", "'.$file_uploader_galleries_folder.'", '.$category_rank.', "private", "true", "'.$next_id.'", '.$category_rank.', 1);');
 		}
 }
Index: /extensions/File_Uploader/language/da_DK/plugin.lang.php
===================================================================
--- /extensions/File_Uploader/language/da_DK/plugin.lang.php	(revision 19874)
+++ /extensions/File_Uploader/language/da_DK/plugin.lang.php	(revision 19875)
@@ -46,5 +46,5 @@
 $lang[': Check to overwrite files during upload if a file with the same name already exists.'] = ': Sæt flueben for at overskrive filer ved upload, hvis en fil med det samme navn allerede findes.';
 $lang['Album:'] = 'Album:';
-$lang['Can\'t copy file to galleries directory'] = 'Kan ikke kopiere filen til galleri-mappen';
+$lang['Can\'t upload file to galleries directory'] = 'Kan ikke kopiere filen til galleri-mappen';
 $lang['Choose a file'] = 'Vælg en fil';
 $lang['Configuration'] = 'Opsætning';
Index: /extensions/File_Uploader/language/de_DE/plugin.lang.php
===================================================================
--- /extensions/File_Uploader/language/de_DE/plugin.lang.php	(revision 19874)
+++ /extensions/File_Uploader/language/de_DE/plugin.lang.php	(revision 19875)
@@ -45,5 +45,5 @@
 $lang[': Check to overwrite files during upload if a file with the same name already exists.'] = ': Auswählen um Dateien zu überschreiben falls sie schon mit gleichen Namen existieren.';
 $lang['Album:'] = 'Album:';
-$lang['Can\'t copy file to galleries directory'] = 'Kann Datei nicht in Galerie Ordner kopieren';
+$lang['Can\'t upload file to galleries directory'] = 'Kann Datei nicht in Galerie Ordner kopieren';
 $lang['Choose a file'] = 'Wähle eine Datei';
 $lang['Choose a thumbnail'] = 'Wähle eine Vorschaubild';
Index: /extensions/File_Uploader/language/el_GR/plugin.lang.php
===================================================================
--- /extensions/File_Uploader/language/el_GR/plugin.lang.php	(revision 19874)
+++ /extensions/File_Uploader/language/el_GR/plugin.lang.php	(revision 19875)
@@ -48,5 +48,5 @@
 $lang['Choose a thumbnail'] = 'Επιλέξτε μια μικρογραφία';
 $lang['Choose a file'] = 'Επιλέξτε ένα αρχείο';
-$lang['Can\'t copy file to galleries directory'] = 'Δεν είναι δυνατή η αντιγραφή του αρχείου σε κατάλογο γκαλερί ';
+$lang['Can\'t upload file to galleries directory'] = 'Δεν είναι δυνατή η αντιγραφή του αρχείου σε κατάλογο γκαλερί ';
 $lang['Album:'] = 'Λεύκωμα: ';
 $lang[': Check to overwrite files during upload if a file with the same name already exists.'] = ': Ελέγξτε να αντικαταστήσετε τα αρχεία κατά τη διάρκεια της αποστολής, αν ένα αρχείο με το ίδιο όνομα υπάρχει ήδη.';
Index: /extensions/File_Uploader/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/File_Uploader/language/en_UK/plugin.lang.php	(revision 19874)
+++ /extensions/File_Uploader/language/en_UK/plugin.lang.php	(revision 19875)
@@ -21,5 +21,5 @@
 $lang['file_uploader_error_already_exist'] = 'File with this name already exists. You should rename this file. If you want to overwrite the file, modify the configuration in the configuration tab.';
 $lang['Invalid file name'] = 'Invalid file name';
-$lang['Can\'t copy file to galleries directory'] = 'Can\'t copy file to galleries directory';
+$lang['Can\'t upload file to galleries directory'] = 'Can\'t upload file to galleries directory';
 $lang['The thumbnail must be a picture'] = 'The thumbnail must be a picture';
 $lang['File uploaded and synchronized'] = 'File uploaded and synchronized';
@@ -29,4 +29,5 @@
 $lang['Choose a file'] = 'Choose a file';
 $lang['File to upload:'] = 'File to upload:';
+$lang['file_uploader_upload_max_filesize'] = 'Your server impose a maximum file size of';
 $lang['Choose a thumbnail'] = 'Choose a thumbnail';
 $lang['Thumbnail to upload:'] = 'Thumbnail to upload:';
@@ -41,5 +42,5 @@
 $lang['Open files in a new tab'] = 'Open files in a new tab';
 $lang['Overwrite files without notice'] = 'Overwrite files without notice';
-$lang['file_uploader_pdf2tab_supported_extensions_description'] = 'Type in the extensions PDF2Tab will handle. The extensions are case insensitive.';
+$lang['file_uploader_pdf2tab_supported_extensions_description'] = 'Type in the extensions the plugin will open in new tabs or download. The extensions are case insensitive.';
 $lang['file_uploader_pdf2tab_hint_text'] = 'Type in an extension';
 
Index: /extensions/File_Uploader/language/es_ES/plugin.lang.php
===================================================================
--- /extensions/File_Uploader/language/es_ES/plugin.lang.php	(revision 19874)
+++ /extensions/File_Uploader/language/es_ES/plugin.lang.php	(revision 19875)
@@ -46,5 +46,5 @@
 $lang[': Check to overwrite files during upload if a file with the same name already exists.'] = ': marca para sobrescribir los archivos durante la subida si un archivo con el mismo nombre ya existe.';
 $lang['Album:'] = 'Album';
-$lang['Can\'t copy file to galleries directory'] = 'No se pudo copiar el archivo al directorio de la galeria.';
+$lang['Can\'t upload file to galleries directory'] = 'No se pudo copiar el archivo al directorio de la galeria.';
 $lang['Choose a file'] = 'Elige un archivo';
 $lang['Choose a thumbnail'] = 'Elige una miniatura';
Index: /extensions/File_Uploader/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/File_Uploader/language/fr_FR/plugin.lang.php	(revision 19874)
+++ /extensions/File_Uploader/language/fr_FR/plugin.lang.php	(revision 19875)
@@ -21,5 +21,5 @@
 $lang['file_uploader_error_already_exist'] = 'Un fichier avec le même nom existe déjà. Vous devriez renommer ce fichier. Si vous voulez remplacer le fichier, modifiez la configuration dans l\'onglet configuration';
 $lang['Invalid file name'] = 'Nom de fichier non valide';
-$lang['Can\'t copy file to galleries directory'] = 'Copie ver le répertoire galleries impossible';
+$lang['Can\'t upload file to galleries directory'] = 'Copie ver le répertoire galleries impossible';
 $lang['The thumbnail must be a picture'] = 'La miniature doit être une image';
 $lang['File uploaded and synchronized'] = 'Fichier transféré et synchronisé';
@@ -29,4 +29,5 @@
 $lang['Choose a file'] = 'Choisir un fichier';
 $lang['File to upload:'] = 'Fichier à transférer :';
+$lang['file_uploader_upload_max_filesize'] = 'Votre serveur impose une taille des fichiers maximale de';
 $lang['Choose a thumbnail'] = 'Choisir une miniature';
 $lang['Thumbnail to upload:'] = 'Miniature à transférer :';
@@ -41,5 +42,5 @@
 $lang['Open files in a new tab'] = 'Ouvrir les fichiers dans un nouvel onglet';
 $lang['Overwrite files without notice'] = 'Remplacer les fichiers sans avertissement';
-$lang['file_uploader_pdf2tab_supported_extensions_description'] = 'Entrer les extensions que le plugin prendra en charge. Les extensions ne sont pas sensibles à la casse.';
+$lang['file_uploader_pdf2tab_supported_extensions_description'] = 'Entrer les extensions que le plugin ouvrira dans un nouvel onglet ou téléchargera. Les extensions ne sont pas sensibles à la casse.';
 $lang['file_uploader_pdf2tab_hint_text'] = 'Entrer une extension';
 
Index: /extensions/File_Uploader/language/hu_HU/plugin.lang.php
===================================================================
--- /extensions/File_Uploader/language/hu_HU/plugin.lang.php	(revision 19874)
+++ /extensions/File_Uploader/language/hu_HU/plugin.lang.php	(revision 19875)
@@ -26,5 +26,5 @@
 $lang['Piwigo is a free software (opensource software), you can use it for free and this is not going to change. Donations are collected by the Piwigo Foundation (non profit organization) to cover project fees.'] = 'A Piwigo egy free szoftver (opensource szoftver), melyet ingyenesen használhat és ez nem fog változni. Az adományok a Piwigo Foundation (non profit szervezet) projekt költségeinek fedezetére fordítódnak.';
 $lang['Unable to create folder '] = 'Nem sikerült létrehozni a mappát';
-$lang['Can\'t copy file to galleries directory'] = 'Nem lehet a fájlt a galéria könyvtárba másolni';
+$lang['Can\'t upload file to galleries directory'] = 'Nem lehet a fájlt a galéria könyvtárba másolni';
 $lang['Overwrite files without notice'] = 'Fájlok felülírása figyelmeztetés nélkül';
 $lang['Specify a file to upload'] = 'Adja meg a feltöltendő fájlt';
Index: /extensions/File_Uploader/language/tr_TR/plugin.lang.php
===================================================================
--- /extensions/File_Uploader/language/tr_TR/plugin.lang.php	(revision 19874)
+++ /extensions/File_Uploader/language/tr_TR/plugin.lang.php	(revision 19875)
@@ -57,5 +57,5 @@
 $lang['Choose a thumbnail'] = 'Bir küçük resim (thumbnail) seçin';
 $lang['Choose a file'] = 'Bir dosya seçin';
-$lang['Can\'t copy file to galleries directory'] = 'Dosya galeriler dizinine kopyalanamadı';
+$lang['Can\'t upload file to galleries directory'] = 'Dosya galeriler dizinine kopyalanamadı';
 $lang['Album:'] = 'Albüm:';
 $lang[': Check to overwrite files during upload if a file with the same name already exists.'] = ': Yükleme sırasında aynı isimde dosya varsa üzerine yazılması için işaretleyin.';
Index: /extensions/File_Uploader/main.inc.php
===================================================================
--- /extensions/File_Uploader/main.inc.php	(revision 19874)
+++ /extensions/File_Uploader/main.inc.php	(revision 19875)
@@ -16,4 +16,5 @@
 define('FILE_UPLOADER_PATH' , PHPWG_PLUGINS_PATH.FILE_UPLOADER_DIR.'/');
 define('FILE_UPLOADER_ADMIN',   get_root_url() . 'admin.php?page=plugin-'.FILE_UPLOADER_DIR);
+define('FILE_UPLOADER_PDF2TAB_PATH' , FILE_UPLOADER_PATH.'/plugin_pdf2tab/');
 define('FILE_UPLOADER_PDF2TAB_ABSOLUTE_PATH' , dirname(__FILE__).'/plugin_pdf2tab/');
 
@@ -39,5 +40,5 @@
  * +-----------------------------------------------------------------------+ */
 $conf_file_uploader = unserialize($conf['file_uploader']);
-if ($conf_file_uploader['new_tab'] == 1) {
+if (isset($conf_file_uploader['new_tab']) && $conf_file_uploader['new_tab'] == 1) {
 	load_language('plugin.lang', FILE_UPLOADER_PATH);
 	include_once(FILE_UPLOADER_PDF2TAB_ABSOLUTE_PATH.'include/thumbnails.inc.php');
@@ -55,7 +56,8 @@
 	global $template;
 
-	//add a stylesheet
-	$template->append('head_elements', '<link rel="stylesheet" type="text/css" href="'.FILE_UPLOADER_PATH.'admin/admin.css">');
-	$template->append('head_elements', '<link rel="stylesheet" type="text/css" href="'.FILE_UPLOADER_PDF2TAB_ABSOLUTE_PATH.'css/admin.css">');
+	if (defined('IN_ADMIN') and IN_ADMIN) {
+		$template->append('head_elements', '<link rel="stylesheet" type="text/css" href="'.FILE_UPLOADER_PATH.'admin/admin.css">');
+		$template->append('head_elements', '<link rel="stylesheet" type="text/css" href="'.FILE_UPLOADER_PDF2TAB_PATH.'css/admin.css">');
+	}
 }
 ?>
Index: /extensions/File_Uploader/maintain.inc.php
===================================================================
--- /extensions/File_Uploader/maintain.inc.php	(revision 19874)
+++ /extensions/File_Uploader/maintain.inc.php	(revision 19875)
@@ -3,22 +3,21 @@
 
 function plugin_install() {
-	include_once(dirname(__FILE__).'/install/config_default.inc.php');
-	include_once(dirname(__FILE__).'/install/functions.inc.php');
+	require_once('install/functions.inc.php');
+	require('install/config_default.inc.php');
 
-	file_uploader_install($config_default);
-	
-	file_uploader_folder($file_uploader_galleries_folder, $file_uploader_galleries_dir);
+	file_uploader_install($file_uploader_default_config);
+	file_uploader_folder($file_uploader_galleries_folder, $file_uploader_galleries_dir, $file_uploader_galleries_folder_name);
 }
 
 function plugin_activate() {
-	include_once(dirname(__FILE__).'/install/config_default.inc.php');
-	include_once(dirname(__FILE__).'/install/functions.inc.php');
+	require_once('install/functions.inc.php');
+	require('install/config_default.inc.php');
 	
-	file_uploader_update_db();
-	file_uploader_folder($file_uploader_galleries_folder, $file_uploader_galleries_dir);
+	file_uploader_update_db($file_uploader_default_config);
+	file_uploader_folder($file_uploader_galleries_folder, $file_uploader_galleries_dir, $file_uploader_galleries_folder_name);
 }
 
 function plugin_uninstall() {
-	include_once(dirname(__FILE__).'/install/functions.inc.php');
+	require_once('install/functions.inc.php');
 
 	file_uploader_delete_conf("file_uploader");
