Index: inc/admin/lib.dc.page.php
===================================================================
--- inc/admin/lib.dc.page.php	(revision 1179)
+++ inc/admin/lib.dc.page.php	(revision 1187)
@@ -22,10 +22,10 @@
 	{
 		global $core;
-		
+
 		if ($core->blog && $core->auth->check($permissions,$core->blog->id))
 		{
 			return;
 		}
-		
+
 		if (session_id()) {
 			$core->session->destroy();
@@ -33,10 +33,10 @@
 		http::redirect(DC_AUTH_PAGE);
 	}
-	
+
 	# Check super admin
 	public static function checkSuper()
 	{
 		global $core;
-		
+
 		if (!$core->auth->isSuperAdmin())
 		{
@@ -47,5 +47,5 @@
 		}
 	}
-	
+
 	# Top of admin page
 	public static function open($title='', $head='')
@@ -59,5 +59,5 @@
 			'<p>'.__('Blog:').' <strong title="'.html::escapeHTML($core->blog->url).'">'.
 			html::escapeHTML($core->blog->name).'</strong>';
-			
+
 			if ($core->auth->blog_count > 20) {
 				$blog_box .= ' - <a href="blogs.php">'.__('Change blog').'</a>';
@@ -80,7 +80,7 @@
 			'<noscript><p><input type="submit" value="'.__('ok').'" /></p></noscript>';
 		}
-		
+
 		$safe_mode = isset($_SESSION['sess_safe_mode']) && $_SESSION['sess_safe_mode'];
-		
+
 		# Display
 		header('Content-Type: text/html; charset=UTF-8');
@@ -94,13 +94,13 @@
 		'  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'."\n".
 		'  <title>'.$title.' - '.html::escapeHTML($core->blog->name).' - '.html::escapeHTML(DC_VENDOR_NAME).' - '.DC_VERSION.'</title>'."\n".
-		
+
 		'  <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />'."\n".
 		'  <meta name="GOOGLEBOT" content="NOSNIPPET" />'."\n".
-		
+
 		self::jsLoadIE7().
-		'  	<link rel="stylesheet" href="style/default.css" type="text/css" media="screen" />'."\n"; 
+		'  	<link rel="stylesheet" href="style/default.css" type="text/css" media="screen" />'."\n";
 		if (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl') {
 			echo
-			'  	<link rel="stylesheet" href="style/default-rtl.css" type="text/css" media="screen" />'."\n"; 
+			'  	<link rel="stylesheet" href="style/default-rtl.css" type="text/css" media="screen" />'."\n";
 		}
 
@@ -110,12 +110,12 @@
 			echo '<link rel="icon" type="image/png" href="images/favicon.png" />';
 		}
-		
+
 		echo
 		self::jsCommon().
 		$head;
-		
+
 		# --BEHAVIOR-- adminPageHTMLHead
 		$core->callBehavior('adminPageHTMLHead');
-		
+
 		echo
 		"</head>\n".
@@ -123,9 +123,9 @@
 		($safe_mode ? ' safe-mode' : '').
 		'">'."\n".
-		
+
 		'<div id="header">'.
 		'<ul id="prelude"><li><a href="#content">'.__('Go to the content').'</a></li><li><a href="#main-menu">'.__('Go to the menu').'</a></li></ul>'."\n".
-		'<div id="top"><h1><a href="index.php">'.DC_VENDOR_NAME.'</a></h1></div>'."\n";	
-		
+		'<div id="top"><h1><a href="index.php">'.DC_VENDOR_NAME.'</a></h1></div>'."\n";
+
 		echo
 		'<div id="info-boxes">'.
@@ -143,10 +143,10 @@
 		'</div>'.
 		'</div>';
-		
+
 		echo
 		'<div id="wrapper">'."\n".
 		'<div id="main">'."\n".
 		'<div id="content">'."\n";
-		
+
 		# Safe mode
 		if ($safe_mode)
@@ -157,5 +157,5 @@
 			'</div>';
 		}
-		
+
 		if ($core->error->flag()) {
 			echo
@@ -165,5 +165,5 @@
 		}
 	}
-	
+
 	public static function close()
 	{
@@ -171,15 +171,15 @@
 
 		$menu =& $GLOBALS['_menu'];
-		
+
 		echo
 		"</div>\n".		// End of #content
 		"</div>\n".		// End of #main
-		
+
 		'<div id="main-menu">'."\n";
-		
+
 		foreach ($menu as $k => $v) {
 			echo $menu[$k]->draw();
 		}
-		
+
 		$text = sprintf(__('Thank you for using %s.'),'Dotclear '.DC_VERSION);
 
@@ -195,17 +195,17 @@
 		'<div id="footer"><a href="http://dotclear.org/" title="'.$text.'"><img src="style/dc_logo_footer.png" alt="'.$text.'" /></a></div>'."\n".
 		"</div>\n";		// End of #wrapper
-		
+
 		if (defined('DC_DEV') && DC_DEV === true) {
 			echo self::debugInfo();
 		}
-		
+
 		echo
 		'</body></html>';
 	}
-	
+
 	public static function openPopup($title='', $head='')
 	{
 		global $core;
-		
+
 		# Display
 		header('Content-Type: text/html; charset=UTF-8');
@@ -219,33 +219,33 @@
 		'  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'."\n".
 		'  <title>'.$title.' - '.html::escapeHTML($core->blog->name).' - '.html::escapeHTML(DC_VENDOR_NAME).' - '.DC_VERSION.'</title>'."\n".
-		
+
 		'  <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />'."\n".
 		'  <meta name="GOOGLEBOT" content="NOSNIPPET" />'."\n".
-		
+
 		self::jsLoadIE7().
-		'  	<link rel="stylesheet" href="style/default.css" type="text/css" media="screen" />'."\n"; 
+		'  	<link rel="stylesheet" href="style/default.css" type="text/css" media="screen" />'."\n";
 		if (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl') {
 			echo
-			'  	<link rel="stylesheet" href="style/default-rtl.css" type="text/css" media="screen" />'."\n"; 
-		}
-		
+			'  	<link rel="stylesheet" href="style/default-rtl.css" type="text/css" media="screen" />'."\n";
+		}
+
 		echo
 		self::jsCommon().
 		$head;
-		
+
 		# --BEHAVIOR-- adminPageHTMLHead
 		$core->callBehavior('adminPageHTMLHead');
-		
+
 		echo
 		"</head>\n".
 		'<body id="dotclear-admin" class="popup">'."\n".
-		
+
 		'<div id="top"><h1>'.DC_VENDOR_NAME.'</h1></div>'."\n";
-		
+
 		echo
 		'<div id="wrapper">'."\n".
 		'<div id="main">'."\n".
 		'<div id="content">'."\n";
-		
+
 		if ($core->error->flag()) {
 			echo
@@ -255,5 +255,5 @@
 		}
 	}
-	
+
 	public static function closePopup()
 	{
@@ -269,5 +269,5 @@
 	{
 		global $core;
-		
+
 		$res = '';
 		if ($msg != '') {
@@ -281,17 +281,17 @@
 		return $res;
 	}
-	
+
 	private static function debugInfo()
 	{
 		$global_vars = implode(', ',array_keys($GLOBALS));
-		
+
 		$res =
 		'<div id="debug"><div>'.
 		'<p>memory usage: '.memory_get_usage().' ('.files::size(memory_get_usage()).')</p>';
-		
+
 		if (function_exists('xdebug_get_profiler_filename'))
 		{
 			$res .= '<p>Elapsed time: '.xdebug_time_index().' seconds</p>';
-			
+
 			$prof_file = xdebug_get_profiler_filename();
 			if ($prof_file) {
@@ -303,5 +303,5 @@
 				$res .= '<p><a href="'.html::escapeURL($prof_url).'">Trigger profiler</a></p>';
 			}
-			
+
 			/* xdebug configuration:
 			zend_extension = /.../xdebug.so
@@ -317,17 +317,17 @@
 			*/
 		}
-		
+
 		$res .=
 		'<p>Global vars: '.$global_vars.'</p>'.
 		'</div></div>';
-		
+
 		return $res;
 	}
-	
+
 	public static function help($page,$index='')
 	{
 		# Deprecated but we keep this for plugins.
 	}
-	
+
 	public static function helpBlock()
 	{
@@ -336,10 +336,10 @@
 			return;
 		};
-		
+
 		global $__resources;
 		if (empty($__resources['help'])) {
 			return;
 		}
-		
+
 		$content = '';
 		foreach ($args as $v)
@@ -349,5 +349,5 @@
 				continue;
 			}
-			
+
 			if (!isset($__resources['help'][$v])) {
 				continue;
@@ -357,5 +357,5 @@
 				continue;
 			}
-			
+
 			$fc = file_get_contents($f);
 			if (preg_match('|<body[^>]*?>(.*?)</body>|ms',$fc,$matches)) {
@@ -365,9 +365,9 @@
 			}
 		}
-		
+
 		if (trim($content) == '') {
 			return;
 		}
-		
+
 		echo
 		'<div id="help"><hr /><div class="help-content clear"><h2>'.__('Help').'</h2>'.
@@ -375,5 +375,5 @@
 		'</div></div>';
 	}
-	
+
 	public static function jsLoad($src)
 	{
@@ -384,10 +384,10 @@
 		}
 	}
-	
+
 	public static function jsVar($n,$v)
 	{
 		return $n." = '".html::escapeJS($v)."';\n";
 	}
-	
+
 	public static function jsCommon()
 	{
@@ -398,9 +398,9 @@
 		self::jsLoad('js/common.js').
 		self::jsLoad('js/prelude.js').
-		
+
 		'<script type="text/javascript">'."\n".
 		"//<![CDATA[\n".
 		self::jsVar('dotclear.nonce',$GLOBALS['core']->getNonce()).
-		
+
 		self::jsVar('dotclear.img_plus_src','images/expand.png').
 		self::jsVar('dotclear.img_plus_alt',__('uncover')).
@@ -409,5 +409,5 @@
 		self::jsVar('dotclear.img_menu_on','images/menu_on.png').
 		self::jsVar('dotclear.img_menu_off','images/menu_off.png').
-		
+
 		self::jsVar('dotclear.msg.help',
 			__('help')).
@@ -481,5 +481,5 @@
 		"</script>\n";
 	}
-	
+
 	public static function jsLoadIE7()
 	{
@@ -490,5 +490,5 @@
 		'<![endif]-->'."\n";
 	}
-	
+
 	public static function jsConfirmClose()
 	{
@@ -502,5 +502,5 @@
 			$args = '';
 		}
-		
+
 		return
 		self::jsLoad('js/confirm-close.js').
@@ -512,5 +512,5 @@
 		"</script>\n";
 	}
-	
+
 	public static function jsPageTabs($default=null)
 	{
@@ -518,5 +518,5 @@
 			$default = "'".html::escapeJS($default)."'";
 		}
-		
+
 		return
 		self::jsLoad('js/jquery/jquery.pageTabs.js').
@@ -558,5 +558,5 @@
 	'<script type="text/javascript">'."\n".
 	"//<![CDATA[\n".
-	
+
 	"datePicker.prototype.months[0] = '".html::escapeJS(__('January'))."'; ".
 	"datePicker.prototype.months[1] = '".html::escapeJS(__('February'))."'; ".
@@ -571,5 +571,5 @@
 	"datePicker.prototype.months[10] = '".html::escapeJS(__('November'))."'; ".
 	"datePicker.prototype.months[11] = '".html::escapeJS(__('December'))."'; ".
-	
+
 	"datePicker.prototype.days[0] = '".html::escapeJS(__('Monday'))."'; ".
 	"datePicker.prototype.days[1] = '".html::escapeJS(__('Tuesday'))."'; ".
@@ -579,10 +579,10 @@
 	"datePicker.prototype.days[5] = '".html::escapeJS(__('Saturday'))."'; ".
 	"datePicker.prototype.days[6] = '".html::escapeJS(__('Sunday'))."'; ".
-	
+
 	"datePicker.prototype.img_src = 'images/date-picker.png'; ".
-	
+
 	"datePicker.prototype.close_msg = '".html::escapeJS(__('close'))."'; ".
 	"datePicker.prototype.now_msg = '".html::escapeJS(__('now'))."'; ".
-	
+
 	"\n//]]>\n".
 	"</script>\n";
@@ -594,9 +594,9 @@
 	'<link rel="stylesheet" type="text/css" href="style/jsToolBar/jsToolBar.css" />'.
 	'<script type="text/javascript" src="js/jsToolBar/jsToolBar.js"></script>';
-	
+
 	if (isset($GLOBALS['core']->auth) && $GLOBALS['core']->auth->getOption('enable_wysiwyg')) {
 		$res .= '<script type="text/javascript" src="js/jsToolBar/jsToolBar.wysiwyg.js"></script>';
 	}
-	
+
 	$res .=
 	'<script type="text/javascript" src="js/jsToolBar/jsToolBar.dotclear.js"></script>'.
@@ -651,23 +651,23 @@
 	"jsToolBar.prototype.elements.ul.title = '".html::escapeJS(__('Unordered list'))."'; ".
 	"jsToolBar.prototype.elements.ol.title = '".html::escapeJS(__('Ordered list'))."'; ".
-	
+
 	"jsToolBar.prototype.elements.link.title = '".html::escapeJS(__('Link'))."'; ".
 	"jsToolBar.prototype.elements.link.href_prompt = '".html::escapeJS(__('URL?'))."'; ".
 	"jsToolBar.prototype.elements.link.hreflang_prompt = '".html::escapeJS(__('Language?'))."'; ".
-	
+
 	"jsToolBar.prototype.elements.img.title = '".html::escapeJS(__('External image'))."'; ".
 	"jsToolBar.prototype.elements.img.src_prompt = '".html::escapeJS(__('URL?'))."'; ".
-	
+
 	"jsToolBar.prototype.elements.img_select.title = '".html::escapeJS(__('Media chooser'))."'; ".
 	"jsToolBar.prototype.elements.post_link.title = '".html::escapeJS(__('Link to an entry'))."'; ";
-	
+
 	if (!$GLOBALS['core']->auth->check('media,media_admin',$GLOBALS['core']->blog->id)) {
 		$res .= "jsToolBar.prototype.elements.img_select.disabled = true;\n";
 	}
-	
+
 	$res .=
 	"\n//]]>\n".
 	"</script>\n";
-	
+
 	return $res;
 }
@@ -678,5 +678,5 @@
 		$base_url = path::clean(dirname(preg_replace('/(\?.*$)?/','',$_SERVER['REQUEST_URI']))).'/';
 	}
-	
+
 	$params = array_merge($params,array(
 		'sess_id='.session_id(),
@@ -684,5 +684,5 @@
 		'xd_check='.$GLOBALS['core']->getNonce()
 		));
-	
+
 	return
 	'<link rel="stylesheet" type="text/css" href="style/jsUpload/style.css" />'."\n".
@@ -697,5 +697,5 @@
 		<span class="upload-filecancel cancel">'.__('Cancel').'</span>
 		{% if (!o.files.error && !i && !o.options.autoUpload) { %}
-		<input type="submit" class="button start" value="'.__('Send').'"/>
+		<input type="submit" style="visibility: hidden;" class="button start"  value="'.__('Send').'"/>
 		{% } %}
 		<span class="upload-filemsg"></span>
@@ -740,5 +740,5 @@
 	self::jsLoad('js/jsUpload/jquery.fileupload-resize.js').
 	self::jsLoad('js/jsUpload/jquery.fileupload-ui.js').
-	
+
 	'<script type="text/javascript">'."\n".
 	"//<![CDATA[\n".
