Index: .hgsubstate
===================================================================
--- .hgsubstate	(revision 1860)
+++ .hgsubstate	(revision 1983)
@@ -1,1 +1,1 @@
-d56b02c87260d4e54872c54fba979e03c0b5422b inc/libs/clearbricks
+19ba094ceed74d06ddd0593332cb4d1a7d12c243 inc/libs/clearbricks
Index: admin/blog_pref.php
===================================================================
--- admin/blog_pref.php	(revision 1971)
+++ admin/blog_pref.php	(revision 1979)
@@ -297,5 +297,5 @@
 	echo
 	'<div class="multi-part" id="params" title="'.__('Parameters').'">'.
-	'<h3>'.__('Parameters').'</h3>'.
+	'<h3 class="out-of-screen-if-js">'.__('Parameters').'</h3>'.
 	'<form action="'.$action.'" method="post" id="blog-form">';
 	
@@ -440,5 +440,5 @@
 	form::field('comments_ttl',2,3,$blog_settings->system->comments_ttl)).
 	'</label></p>'.
-	'<p class="form-note">'.__('Leave blank to disable this feature.').'</p>'.	
+	'<p class="form-note">'.__('No limit: leave blank.').'</p>'.	
 	'<p><label for="wiki_comments" class="classic">'.
 	form::checkbox('wiki_comments','1',$blog_settings->system->wiki_comments).
@@ -455,5 +455,5 @@
 	'<p><label for="trackbacks_ttl" class="classic">'.sprintf(__('Leave trackbacks open for %s days').'.',
 	form::field('trackbacks_ttl',2,3,$blog_settings->system->trackbacks_ttl)).'</label></p>'.
-	'<p class="form-note">'.__('Leave blank to disable this feature.').'</p>'.	
+	'<p class="form-note">'.__('No limit: leave blank.').'</p>'.	
 	'<p><label for="comments_nofollow" class="classic">'.
 	form::checkbox('comments_nofollow','1',$blog_settings->system->comments_nofollow).
@@ -505,5 +505,9 @@
 	
 	echo
-	'<div class="fieldset"><h4>'.__('Media and images').'</h4>'.
+	'<div class="fieldset"><h4 id="medias-settings">'.__('Media and images').'</h4>'.
+		'<p class="form-note warning">'.
+	__('Please note that if you change current settings bellow, they will now apply to all new images in the media manager.').
+	' '.__('Be carefull if you share it with other blogs in your installation.').'</p>'.
+
 	'<div class="two-cols">'.
 	'<div class="col">'.
@@ -593,5 +597,5 @@
 	echo
 	'<div class="multi-part" id="users" title="'.__('Users').'">'.
-	'<h3>'.__('Users on this blog').'</h3>';
+	'<h3 class="out-of-screen-if-js">'.__('Users on this blog').'</h3>';
 	
 	if (empty($blog_users))
@@ -651,8 +655,14 @@
 				'<ul>';
 				if ($v['super']) {
-					echo '<li class="user_super">'.__('Super administrator').'</li>';
+					echo '<li class="user_super">'.__('Super administrator').'<br />'.
+					'<span class="form-note">'.__('All rights on all blogs.').'</span></li>';
 				} else {
 					foreach ($v['p'] as $p => $V) {
-						echo '<li '.($p == 'admin' ? 'class="user_admin"' : '').'>'.__($perm_types[$p]).'</li>';
+						echo '<li '.($p == 'admin' ? 'class="user_admin"' : '').'>'.__($perm_types[$p]);
+
+						if($p == 'admin') {
+							echo '<br /><span class="form-note">'.__('All rights on this blog.').'</span>';
+						}
+						echo '</li>';
 					}
 				}
Index: admin/categories.php
===================================================================
--- admin/categories.php	(revision 1963)
+++ admin/categories.php	(revision 1988)
@@ -118,5 +118,5 @@
 }
 if (!empty($_GET['unknown'])) {
-	dcPage::success(__('This category does not exist.'));
+	dcPage::error(__('This category does not exist.'));
 }
 if (!empty($_GET['move'])) {
Index: admin/js/_blog_pref.js
===================================================================
--- admin/js/_blog_pref.js	(revision 1782)
+++ admin/js/_blog_pref.js	(revision 1986)
@@ -16,4 +16,5 @@
 
 $(function() {
+	if( $('#blog_url').length > 0 ) {
 	checkQueryString();
 	$('#blog_url').focusout(checkQueryString);
Index: admin/media.php
===================================================================
--- admin/media.php	(revision 1952)
+++ admin/media.php	(revision 1982)
@@ -310,5 +310,7 @@
 if (count($items) == 0)
 {
-	echo '<p>'.__('No file.').'</p>';
+	echo 
+	'<p>'.__('No file.').'</p>'.
+	'<div class="files-group"></div>'; // need for jsUpload to append new media 
 }
 else
@@ -349,61 +351,12 @@
 '</div>';
 
-if ($core_media_writable)
-{
-	echo 
-	'<h3 class="hidden">'.sprintf(__('In %s:'),($d == '' ? '“'.__('Media manager').'”' : '“'.$d.'”')).'</h3>'.
-	'<div class="two-boxes odd fieldset">';
-	
-	if ($user_ui_enhanceduploader) {
-		echo
-		'<div class="enhanced_uploader">';
-	} else {
-		echo
-		'<div>';
-	}
-
-	echo
-	'<h4>'.__('Add files').'</h4>'.
-	'<p>'.__('Please take care to publish media that you own and that are not protected by copyright.').'</p>'.
-	'<form id="fileupload" action="'.html::escapeURL($page_url).'" method="post" enctype="multipart/form-data" aria-disabled="false">'.
-	'<p>'.form::hidden(array('MAX_FILE_SIZE'),DC_MAX_UPLOAD_SIZE).
-	$core->formNonce().'</p>'.
-	'<div class="fileupload-ctrl"><p class="queue-message"></p><ul class="files"></ul></div>';
-
-	echo
-	'<div class="fileupload-buttonbar clear">';
-
-	echo
-	'<p><label for="upfile">'.'<span class="add-label one-file">'.__('Choose file').'</span>'.'</label>'.
-	'<button class="button choose_files">'.__('Choose files').'</button>'.
-	'<input type="file" id="upfile" name="upfile[]"'.($user_ui_enhanceduploader?' multiple="mutiple"':'').' data-url="'.html::escapeURL($page_url).'" /></p>';
-
-	echo
-	'<p class="max-sizer form-note">&nbsp;'.__('Maximum file size allowed:').' '.files::size(DC_MAX_UPLOAD_SIZE).'</p>';
-
-	echo
-	'<p class="one-file"><label for="upfiletitle">'.__('Title:').'</label>'.form::field(array('upfiletitle','upfiletitle'),35,255).'</p>'.
-	'<p class="one-file"><label for="upfilepriv" class="classic">'.__('Private').'</label> '.
-	form::checkbox(array('upfilepriv','upfilepriv'),1).'</p>';
-
-
-
-	if (!$user_ui_enhanceduploader) {
-		echo
-		'<p class="one-file form-help info">'.__('To send several files at the same time, you can activate the enhanced uploader in').
-		' <a href="preferences.php?tab=user-options">'.__('My preferences').'</a></p>';
-	}
-
-	echo
-	'<p class="clear"><button class="button clean">'.__('Refresh').'</button>'.
-	'<input class="button cancel one-file" type="reset" value="'.__('Clear all').'"/>'.
-	'<input class="button start" type="submit" value="'.__('Upload').'"/></p>'.
-	'</div>';
-
-	echo
-	'<p style="clear:both;">'.form::hidden(array('d'),$d).'</p>'.
-	'</form>'.
-	'</div>'.
-	'</div>';
+echo
+'<div class="clearfix"><p class="info">'.sprintf(__('Current settings for medias and images are defined in %s'),
+'<a href="blog_pref.php#medias-settings">'.__('Blog parameters').'</a>').'</p></div>';
+
+if ($core_media_writable || $core_media_archivable) {
+	echo
+	'<div class="vertical-separator">'.
+	'<h3 class="out-of-screen-if-js">'.sprintf(__('In %s:'),($d == '' ? '“'.__('Media manager').'”' : '“'.$d.'”')).'</h3>';	
 }
 
@@ -412,6 +365,6 @@
 
 if ($core_media_writable || $core_media_archivable) {
-
-	echo '<div class="two-boxes even fieldset">';
+	echo 
+	'<div class="two-boxes odd">';
 
 	# Create directory
@@ -419,7 +372,7 @@
 	{
 		echo
-		'<form action="'.html::escapeURL($page_url).'" method="post">'.
+		'<form action="'.html::escapeURL($page_url).'" method="post" class="fieldset">'.
 		'<div id="new-dir-f">'.
-		'<h4>'.__('Create new directory').'</h4>'.
+		'<h4 class="pretty-title">'.__('Create new directory').'</h4>'.
 		$core->formNonce().
 		'<p><label for="newdir">'.__('Directory Name:').'</label>'.
@@ -435,11 +388,68 @@
 	{
 		echo
-		'<h4>'.__('Backup content').'</h4>'.
-		'<p>'.__('Compress this directory with its content as a zip file and download it.').'</p>'.
+		'<div class="fieldset">'.
+		'<h4 class="pretty-title">'.sprintf(__('Backup content of %s'),($d == '' ? '“'.__('Media manager').'”' : '“'.$d.'”')).'</h4>'.
 		'<p><a class="button submit" href="'.html::escapeURL($page_url).'&amp;zipdl=1">'.
-		__('Download').'</a></p>';
-	}
-
-	echo '</div>';
+		__('Download zip file').'</a></p>'.
+		'</div>';
+	}
+
+	echo 
+	'</div>';
+}
+
+if ($core_media_writable)
+{
+	echo
+	'<div class="two-boxes fieldset">';	
+	if ($user_ui_enhanceduploader) {
+		echo
+		'<div class="enhanced_uploader">';
+	} else {
+		echo
+		'<div>';
+	}
+
+	echo
+	'<h4>'.__('Add files').'</h4>'.
+	'<p>'.__('Please take care to publish media that you own and that are not protected by copyright.').'</p>'.
+	'<form id="fileupload" action="'.html::escapeURL($page_url).'" method="post" enctype="multipart/form-data" aria-disabled="false">'.
+	'<p>'.form::hidden(array('MAX_FILE_SIZE'),DC_MAX_UPLOAD_SIZE).
+	$core->formNonce().'</p>'.
+	'<div class="fileupload-ctrl"><p class="queue-message"></p><ul class="files"></ul></div>';
+
+	echo
+	'<div class="fileupload-buttonbar clear">';
+
+	echo
+	'<p><label for="upfile">'.'<span class="add-label one-file">'.__('Choose file').'</span>'.'</label>'.
+	'<button class="button choose_files">'.__('Choose files').'</button>'.
+	'<input type="file" id="upfile" name="upfile[]"'.($user_ui_enhanceduploader?' multiple="mutiple"':'').' data-url="'.html::escapeURL($page_url).'" /></p>';
+
+	echo
+	'<p class="max-sizer form-note">&nbsp;'.__('Maximum file size allowed:').' '.files::size(DC_MAX_UPLOAD_SIZE).'</p>';
+
+	echo
+	'<p class="one-file"><label for="upfiletitle">'.__('Title:').'</label>'.form::field(array('upfiletitle','upfiletitle'),35,255).'</p>'.
+	'<p class="one-file"><label for="upfilepriv" class="classic">'.__('Private').'</label> '.
+	form::checkbox(array('upfilepriv','upfilepriv'),1).'</p>';
+
+	if (!$user_ui_enhanceduploader) {
+		echo
+		'<p class="one-file form-help info">'.__('To send several files at the same time, you can activate the enhanced uploader in').
+		' <a href="preferences.php?tab=user-options">'.__('My preferences').'</a></p>';
+	}
+
+	echo
+	'<p class="clear"><button class="button clean">'.__('Refresh').'</button>'.
+	'<input class="button cancel one-file" type="reset" value="'.__('Clear all').'"/>'.
+	'<input class="button start" type="submit" value="'.__('Upload').'"/></p>'.
+	'</div>';
+
+	echo
+	'<p style="clear:both;">'.form::hidden(array('d'),$d).'</p>'.
+	'</form>'.
+	'</div>'.
+	'</div>';
 }
 
@@ -453,4 +463,9 @@
 '</div>'.
 '</form>';
+
+if ($core_media_writable || $core_media_archivable) {
+	echo 
+	'</div>';
+}
 
 call_user_func($close_f);
Index: admin/style/default.css
===================================================================
--- admin/style/default.css	(revision 1990)
+++ admin/style/default.css	(revision 1991)
@@ -295,6 +295,5 @@
 h2 {
 	color: #676e78;
-	font-size: 18px; /* ie < 9 sucks */
-	font-size: 1.8rem;
+	font-size: 1.5em;
 	padding: 0 0 1.5em;
 	font-weight: normal;
@@ -742,4 +741,5 @@
 	}
 div.warn, div.warning, div.info {
+	display: block;
 	padding: 1em 1em .33em 1em;
 	}
@@ -1126,8 +1126,9 @@
 	#content.with-help #help-button {
 		right: 282px; /* ie < 9 sucks */
-		right: 28.2rem;
+		right: 28rem;
 		background-color: #f5f5f5;
 		position: fixed;
-		top: 40px;
+		top: 54px;
+		z-index: 100;
 		border-top: 2px solid #FFD478;
 		border-left: 2px solid #FFD478;
Index: locales/en/plugins.po
===================================================================
--- locales/en/plugins.po	(revision 1955)
+++ locales/en/plugins.po	(revision 1989)
@@ -980,117 +980,158 @@
 msgstr ""
 
+msgid "One task to execute"
+msgstr ""
+
+#, php-format
+msgid "%s tasks to execute"
+msgstr ""
+
+msgid "There is a task to execute."
+msgstr ""
+
+#, php-format
+msgid_plural "There are %s tasks to execute."
+msgstr ""
+
+msgid "This task has never been executed."
+msgstr ""
+
+msgid "Last execution of this task was on %s."
+msgstr ""
+
+msgid "Manage tasks"
+msgstr ""
+
+msgid "Display count of late tasks on maintenance dashboard icon"
+msgstr ""
+
+msgid "Display list of late tasks on dashboard items"
+msgstr ""
+
+msgid "Failed to execute task."
+msgstr ""
+
+msgid "Task successfully executed."
+msgstr ""
+
+msgid "Empty templates cache directory"
+msgstr ""
+
+msgid "Templates cache directory emptied."
+msgstr ""
+
+msgid "Failed to empty templates cache directory."
+msgstr ""
+
+msgid "Count again comments and trackbacks"
+msgstr ""
+
+msgid "Comments and trackback counted."
+msgstr ""
+
+msgid "Failed to count comments and trackbacks."
+msgstr ""
+
+msgid "Search engine index"
+msgstr ""
+
+msgid "Index all comments for search engine"
+msgstr ""
+
+msgid "Next"
+msgstr ""
+
+#, php-format
+msgid "Indexing comment %d to %d."
+msgstr ""
+
+msgid "Comments index done."
+msgstr ""
+
+msgid "Failed to index comments."
+msgstr ""
+
+msgid "Index all entries for search engine"
+msgstr ""
+
+msgid "Indexing entry %d to %d."
+msgstr ""
+
+msgid "Entries index done."
+msgstr ""
+
+msgid "Failed to index entries."
+msgstr ""
+
+msgid "Delete all logs"
+msgstr ""
+
+msgid "Logs deleted."
+msgstr ""
+
+msgid "Failed to delete logs."
+msgstr ""
+
+msgid "optimize tables"
+msgstr ""
+
+msgid "Optimization successful."
+msgstr ""
+
+msgid "Failed to optimize tables."
+msgstr ""
+
+msgid "Download media folder of current blog"
+msgstr ""
+
+msgid "Download active theme of current blog"
+msgstr ""
+
+msgid "Every week"
+msgstr ""
+
+msgid "Every two weeks"
+msgstr ""
+
+msgid "Every month"
+msgstr ""
+
+msgid "Every two months"
+msgstr ""
+
+msgid "Use different periods for each task"
+msgstr ""
+
+msgid "Never"
+msgstr ""
+
+msgid "You have not sufficient permissions to view this page"
+msgstr ""
+
+msgid "Settings successfully updated"
+msgstr ""
+
+msgid "You should execute it now."
+msgstr ""
+
 msgid "Execute task"
 msgstr ""
 
-msgid "Task successfully executed."
-msgstr ""
-
-msgid "Failed to execute task."
-msgstr ""
-
-msgid "one task to update"
-msgstr ""
-
-#, php-format
-msgid "%s tasks to update"
-msgstr ""
-
-msgid "Show maintenance tasks to update."
-msgstr ""
-
-#, php-format
-msgid "Last execution of this task was on %s. You should execute it again."
-msgstr ""
-
-msgid "Failed to empty templates cache directory."
-msgstr ""
-
-msgid "Failed to reset comments and ping counters."
-msgstr ""
-
-msgid "Failed to index comments."
-msgstr ""
-
-msgid "Failed to index entries."
-msgstr ""
-
-msgid "Failed to delete logs."
-msgstr ""
-
-msgid "Failed to vacuum tables."
-msgstr ""
-
-msgid "Optimization successful."
-msgstr ""
-
-msgid "Comments and trackback counted."
-msgstr ""
-
-msgid "Templates cache directory emptied."
-msgstr ""
-
-msgid "Logs deleted."
-msgstr ""
-
-#, php-format
-msgid "Indexing entry %d to %d."
-msgstr ""
-
-msgid "next"
-msgstr ""
-
-msgid "Entries index done."
-msgstr ""
-
-msgid "Back"
-msgstr ""
-
-#, php-format
-msgid "Indexing comment %d to %d."
-msgstr ""
-
-msgid "Comments index done."
-msgstr ""
-
-msgid "Optimize database room"
-msgstr ""
-
-msgid "Vacuum tables"
-msgstr ""
-
-msgid "Counters"
-msgstr ""
-
-msgid "Reset comments and ping counters"
-msgstr ""
-
-msgid "Search engine index"
-msgstr ""
-
-msgid "This may take a very long time"
-msgstr ""
-
-msgid "Index all posts"
-msgstr ""
-
-msgid "Index all comments"
-msgstr ""
-
-msgid "Vacuum logs"
-msgstr ""
-
-msgid "Delete all logs"
-msgstr ""
-
-msgid "Empty templates cache directory"
-msgstr ""
-
-msgid "Empty directory"
-msgstr ""
-
-msgid "Download media folder of current blog"
-msgstr ""
-
-msgid "Download active theme of current blog"
+msgid "This may take a very long time."
+msgstr ""
+
+msgid "Settings"
+msgstr ""
+
+msgid "Display alert messages on late tasks"
+msgstr ""
+
+msgid "Recall time for all tasks:"
+msgstr ""
+
+msgid "Recall time per task:"
+msgstr ""
+
+msgid "You can place list of late tasks on your %s."
 msgstr ""
 
Index: locales/fr/plugins.po
===================================================================
--- locales/fr/plugins.po	(revision 1977)
+++ locales/fr/plugins.po	(revision 1989)
@@ -1200,53 +1200,28 @@
 
 #, php-format
-msgid "One task to update"
-msgid_plural "%s tasks to update"
-msgstr[0] "Une tâche à mettre à jour"
-msgstr[1] "%s tâches à mettre à jour"
-
-#, php-format
-msgid "Last updated on %s"
-msgstr ""
-
-msgid "There is a task to update."
-msgid_plural "There are %s tasks to update."
-msgstr[0] "Une tâche à mettre à jour"
-msgstr[1] "%s tâches à mettre à jour"
-
-msgid "Manage task"
-msgstr "gestion des tâches"
-
-msgid "Use different periods for each task"
-msgstr ""
-
-msgid "Never"
-msgstr ""
-
-msgid "Display count of expired tasks on maintenance dashboard icon"
-msgstr ""
-
-msgid "Display list of expired tasks on dashboard contents"
-msgstr ""
-
-msgid "Display alert message of expired tasks on plugin page"
-msgstr ""
-
-msgid "Recall time for all tasks"
-msgstr ""
-
-msgid "Recall time per task"
-msgstr ""
-
-msgid "Every week"
-msgstr ""
-
-msgid "Every two weeks"
-msgstr ""
-
-msgid "Every month"
-msgstr ""
-
-msgid "Every two months"
-msgstr ""
+msgid "One task to execute"
+msgid_plural "%s tasks to execute"
+msgstr[0] "Une tâche à exécuter"
+msgstr[1] "%s tâches à exécuter"
+
+msgid "There is a task to execute."
+msgid_plural "There are %s tasks to execute."
+msgstr[0] "Il y a une tâche à exécuter."
+msgstr[1] "Il y a %s tâches à exécuter."
+
+msgid "This task has never been executed."
+msgstr "Cette tâches n'a jamais été exécuté."
+
+msgid "Last execution of this task was on %s."
+msgstr "La dernière exécution de cette tâches était le %s."
+
+msgid "Manage tasks"
+msgstr "Gérer les tâches"
+
+msgid "Display count of late tasks on maintenance dashboard icon"
+msgstr "Afficher le nombre de tâches en retard sur l'icône maintenance du tableau de bord"
+
+msgid "Display list of late tasks on dashboard items"
+msgstr "Afficher la liste des tâches en retard dans les éléments du tableau de bord"
 
 msgid "Failed to execute task."
@@ -1265,23 +1240,22 @@
 msgstr "Impossible de vider le répertoire de cache des « templates »."
 
-msgid "Reset comments and ping counters"
-msgstr "Remet à zéro les compteurs de commentaires et de signalements"
+msgid "Count again comments and trackbacks"
+msgstr "Recompter les commentaires et rétroliens"
 
 msgid "Comments and trackback counted."
 msgstr "Commentaires et rétroliens comptés."
 
-msgid "Failed to reset comments and ping counters."
-msgstr "Impossible de remettre à zéro les compteurs de commentaires et de signalements."
+msgid "Failed to count comments and trackbacks."
+msgstr "Impossible de recompter les commentaires et rétroliens."
 
 msgid "Search engine index"
 msgstr "Index du moteur de recherche"
 
-msgid "Index all comments"
-msgstr "Indexation de tous les commentaires"
-
-msgid "next"
-msgstr "suivant"
-
-#, php-format
+msgid "Index all comments for search engine"
+msgstr "Indexer tous les commentaires pour le moteur de recherche"
+
+msgid "Next"
+msgstr "Suivant"
+
 msgid "Indexing comment %d to %d."
 msgstr "Indexation des commentaires %d à %d."
@@ -1293,8 +1267,7 @@
 msgstr "Impossible d'indexer les commentaires."
 
-msgid "Index all posts"
-msgstr "Indexation de tous les billets"
-
-#, php-format
+msgid "Index all entries for search engine"
+msgstr "Indexer tous les billets pour le moteur de recherche"
+
 msgid "Indexing entry %d to %d."
 msgstr "Indexation des billets %d à %d."
@@ -1315,12 +1288,12 @@
 msgstr "Impossible de supprimer les journaux."
 
-msgid "Vacuum tables"
-msgstr "Vidage des tables"
+msgid "optimize tables"
+msgstr "Optimiser les tables"
 
 msgid "Optimization successful."
 msgstr "Optimisation terminée avec succès."
 
-msgid "Failed to vacuum tables."
-msgstr "Impossible de vider les tables."
+msgid "Failed to optimize tables."
+msgstr "Impossible d'optimiser les tables."
 
 msgid "Download media folder of current blog"
@@ -1330,22 +1303,51 @@
 msgstr "Télécharger le theme actif du blog courant"
 
-msgid "Back"
-msgstr "Retour"
-
-#, php-format
-msgid "Last execution of this task was on %s."
-msgstr "La dernière exécution de cette tâches était le %s."
+msgid "Every week"
+msgstr "Chaque semaine"
+
+msgid "Every two weeks"
+msgstr "Toutes les deux semaines"
+
+msgid "Every month"
+msgstr "Chaque mois"
+
+msgid "Every two months"
+msgstr "Tous les deux mois"
+
+msgid "Use different periods for each task"
+msgstr "Utiliser une période diffèrente pour chaque tâche"
+
+msgid "Never"
+msgstr "Jamais"
+
+msgid "You have not sufficient permissions to view this page"
+msgstr "Vous n'avez pas les autorisations suffisantes pour accéder à cette page"
+
+msgid "Settings successfully updated"
+msgstr "Paramètres mis à jour avec succès"
 
 msgid "You should execute it now."
-msgstr "Vous devriez l'exécuter à nouveau."
-
-msgid "This task has never been executed."
-msgstr ""
+msgstr "Vous devriez l'exécuter dès maintenant."
 
 msgid "Execute task"
 msgstr "Exécuter la tâche"
 
-msgid "This may take a very long time"
-msgstr "Cela peut prendre un certain temps"
+msgid "This may take a very long time."
+msgstr "Cela peut prendre un certain temps."
+
+msgid "Settings"
+msgstr "Paramètres"
+
+msgid "Display alert messages on late tasks"
+msgstr "Afficher les messages d'alerte sur les tâches en retard."
+
+msgid "Recall time for all tasks:"
+msgstr "Délai de rappel pour toutes les tâches :"
+
+msgid "Recall time per task:"
+msgstr "Délai de rappel par tâche :"
+
+msgid "You can place list of late tasks on your %s."
+msgstr "Vous pouvez placer la liste des tâches en retard sur votre %s."
 
 #, php-format
Index: plugins/antispam/_admin.php
===================================================================
--- plugins/antispam/_admin.php	(revision 1519)
+++ plugins/antispam/_admin.php	(revision 1979)
@@ -73,4 +73,5 @@
 		' '.__('days').
 		'</label></p>'.
+		'<p><a href="plugin.php?p=antispam">'.__('Set spam filters on it\'s page.').'</a></p>'.
 		'</div>';
 	}
Index: plugins/importExport/inc/lib.ie.maintenance.php
===================================================================
--- plugins/importExport/inc/lib.ie.maintenance.php	(revision 1959)
+++ plugins/importExport/inc/lib.ie.maintenance.php	(revision 1989)
@@ -14,4 +14,5 @@
 class ieMaintenanceExportblog extends dcMaintenanceTask
 {
+	protected $perm = 'admin';
 	protected $tab = 'backup';
 	protected $group = 'zipblog';
Index: plugins/maintenance/_admin.php
===================================================================
--- plugins/maintenance/_admin.php	(revision 1969)
+++ plugins/maintenance/_admin.php	(revision 1989)
@@ -18,15 +18,14 @@
 	'index.php?pf=maintenance/icon.png',
 	preg_match('/plugin.php\?p=maintenance(&.*)?$/', $_SERVER['REQUEST_URI']),
-	$core->auth->isSuperAdmin()
+	$core->auth->check('admin', $core->blog->id)
 );
 
 // Admin behaviors
 $core->addBehavior('dcMaintenanceRegister', array('dcMaintenanceAdmin', 'dcMaintenanceRegister'));
-$core->addBehavior('adminPreferencesHeaders', array('dcMaintenanceAdmin', 'adminPreferencesHeaders'));
 $core->addBehavior('adminDashboardFavs', array('dcMaintenanceAdmin', 'adminDashboardFavs'));
 $core->addBehavior('adminDashboardFavsIcon', array('dcMaintenanceAdmin', 'adminDashboardFavsIcon'));
 $core->addBehavior('adminDashboardItems', array('dcMaintenanceAdmin', 'adminDashboardItems'));
-$core->addBehavior('adminPreferencesForm',	array('dcMaintenanceAdmin',	'adminPreferencesForm'));
-$core->addBehavior('adminBeforeUserOptionsUpdate',	array('dcMaintenanceAdmin',	'adminBeforeUserOptionsUpdate'));
+$core->addBehavior('adminDashboardOptionsForm',	array('dcMaintenanceAdmin',	'adminDashboardOptionsForm'));
+$core->addBehavior('adminAfterDashboardOptionsUpdate',	array('dcMaintenanceAdmin',	'adminAfterDashboardOptionsUpdate'));
 
 /**
@@ -60,21 +59,11 @@
 
 		$tasks[] = 'dcMaintenanceCache';
+		$tasks[] = 'dcMaintenanceIndexposts';
+		$tasks[] = 'dcMaintenanceIndexcomments';
 		$tasks[] = 'dcMaintenanceCountcomments';
-		$tasks[] = 'dcMaintenanceIndexcomments';
-		$tasks[] = 'dcMaintenanceIndexposts';
 		$tasks[] = 'dcMaintenanceLogs';
 		$tasks[] = 'dcMaintenanceVacuum';
 		$tasks[] = 'dcMaintenanceZipmedia';
 		$tasks[] = 'dcMaintenanceZiptheme';
-	}
-
-	/**
-	 * Dashboard headers.
-	 *
-	 * Add ajavascript to toggle tasks list.
-	 */
-	public static function adminPreferencesHeaders()
-	{
-		return dcPage::jsLoad('index.php?pf=maintenance/js/preferences.js');
 	}
 
@@ -122,11 +111,17 @@
 		// Check expired tasks
 		$maintenance = new dcMaintenance($core);
-		$expired = $maintenance->getExpired();
-		$expired = count($expired);
-		if (!$expired) {
-			return null;
-		}
-
-		$icon[0] .= '<br />'.sprintf(__('One task to update', '%s tasks to update', $expired), $expired);
+		$count = 0;
+		foreach($maintenance->getTasks() as $t)
+		{
+			if ($t->expired() !== false){
+				$count++;
+			}
+		}
+
+		if (!$count) {
+			return null;
+		}
+
+		$icon[0] .= '<br />'.sprintf(__('One task to execute', '%s tasks to execute', $count), $count);
 	}
 
@@ -145,25 +140,34 @@
 
 		$maintenance = new dcMaintenance($core);
-		$tasks = $maintenance->getExpired();
-		if (empty($tasks)) {
-			return null;
-		}
 
 		$lines = array();
-		foreach($tasks as $id => $ts) {
-			$lines[$ts] = 
-			'<li title="'.sprintf(__('Last updated on %s'),
-				dt::dt2str($core->blog->settings->system->date_format, $ts).' '.
-				dt::dt2str($core->blog->settings->system->time_format, $ts)
-			).'">'.$maintenance->getTask($id)->task().'</li>';
-		}
-		ksort($lines);
+		foreach($maintenance->getTasks() as $t)
+		{
+			$ts = $t->expired();
+			if ($ts === false){
+				continue;
+			}
+
+			$lines[] = 
+			'<li title="'.($ts === null ?
+				__('This task has never been executed.')
+				:
+				sprintf(__('Last execution of this task was on %s.'),
+					dt::dt2str($core->blog->settings->system->date_format, $ts).' '.
+					dt::dt2str($core->blog->settings->system->time_format, $ts)
+				)
+			).'">'.$t->task().'</li>';
+		}
+
+		if (empty($lines)) {
+			return null;
+		}
 
 		$items[] = new ArrayObject(array(
 			'<div id="maintenance-expired">'.
 			'<h3><img src="index.php?pf=maintenance/icon.png" alt="" /> '.__('Maintenance').'</h3>'.
-			'<p>'.sprintf(__('There is a task to update.', 'There are %s tasks to update.', count($tasks)), count($tasks)).'</p>'.
+			'<p class="warn">'.sprintf(__('There is a task to execute.', 'There are %s tasks to execute.', count($lines)), count($lines)).'</p>'.
 			'<ul>'.implode('',$lines).'</ul>'.
-			'<p><a href="plugin.php?p=maintenance">'.__('Manage task').'</a></p>'.
+			'<p><a href="plugin.php?p=maintenance">'.__('Manage tasks').'</a></p>'.
 			'</div>'
 			));
@@ -178,23 +182,7 @@
 	 * @param	$args	<b>object</b>	dcCore instance or record
 	 */
-	public static function adminPreferencesForm($core)
-	{
-		$core->auth->user_prefs->addWorkspace('maintenance');
-		$maintenance = new dcMaintenance($core);
-
-		$tasks = $maintenance->getTasks();
-		if (empty($tasks)) {
-			return null;
-		}
-
-		$full_combo_ts = array_merge(array(
-			__('Use different periods for each task') => 'seperate'), 
-			self::comboTs()
-		);
-
-		$task_combo_ts = array_merge(array(
-			__('Never') => 0), 
-			self::comboTs()
-		);
+	public static function adminDashboardOptionsForm($core)
+	{
+		$core->auth->user_prefs->addWorkspace('maintenance');
 
 		echo
@@ -202,44 +190,12 @@
 		'<h4>'.__('Maintenance').'</h4>'.
 
-		'<div class="two-boxes">'.
-
 		'<p><label for="maintenance_dashboard_icon" class="classic">'.
 		form::checkbox('maintenance_dashboard_icon', 1, $core->auth->user_prefs->maintenance->dashboard_icon).
-		__('Display count of expired tasks on maintenance dashboard icon').'</label></p>'.
+		__('Display count of late tasks on maintenance dashboard icon').'</label></p>'.
 
 		'<p><label for="maintenance_dashboard_item" class="classic">'.
 		form::checkbox('maintenance_dashboard_item', 1, $core->auth->user_prefs->maintenance->dashboard_item).
-		__('Display list of expired tasks on dashboard contents').'</label></p>'.
-
-		'<p><label for="maintenance_plugin_message" class="classic">'.
-		form::checkbox('maintenance_plugin_message', 1, $core->auth->user_prefs->maintenance->plugin_message).
-		__('Display alert message of expired tasks on plugin page').'</label></p>'.
-
-		'</div>'.
-
-		'<div class="two-boxes">'.
-
-		'<p><label for="maintenance_recall_time">'.__('Recall time for all tasks').'</label>'.
-		form::combo('maintenance_recall_time', $full_combo_ts, 'seperate', 'recall-for-all').
-		'</p>'.
-
-		'</div>'.
-
-		'<div id="maintenance-recall-time">'.
-		'<h5>'.__('Recall time per task').'</h5>';
-
-		foreach($tasks as $task) {
-			echo
-			'<div class="two-boxes">'.
-
-			'<p><label for="maintenance_ts_'.$task->id().'">'.$task->task().'</label>'.
-			form::combo('maintenance_ts_'.$task->id(), $task_combo_ts, $task->ts(), 'recall-per-task').
-			'</p>'.
-
-			'</div>';
-		}
-
-		echo 
-		'</div>'.
+		__('Display list of late tasks on dashboard items').'</label></p>'.
+
 		'</div>';
 	}
@@ -248,18 +204,11 @@
 	 * User preferences update.
 	 *
-	 * @param	$cur	<b>cursor</b>	Cursor of user options
 	 * @param	$user_id	<b>string</b>	User ID
 	 */
-	public static function adminBeforeUserOptionsUpdate($cur, $user_id=null)
+	public static function adminAfterDashboardOptionsUpdate($user_id=null)
 	{
 		global $core;
 
 		if (is_null($user_id)) {
-			return null;
-		}
-
-		$maintenance = new dcMaintenance($core);
-		$tasks = $maintenance->getTasks();
-		if (empty($tasks)) {
 			return null;
 		}
@@ -268,26 +217,4 @@
 		$core->auth->user_prefs->maintenance->put('dashboard_icon', !empty($_POST['maintenance_dashboard_icon']), 'boolean');
 		$core->auth->user_prefs->maintenance->put('dashboard_item', !empty($_POST['maintenance_dashboard_item']), 'boolean');
-		$core->auth->user_prefs->maintenance->put('plugin_message', !empty($_POST['maintenance_plugin_message']), 'boolean');
-
-		foreach($tasks as $task) {
-			if ($_POST['maintenance_recall_time'] == 'seperate') {
-				$ts = empty($_POST['maintenance_ts_'.$task->id()]) ? 0 : $_POST['maintenance_ts_'.$task->id()];
-			}
-			else {
-				$ts = $_POST['maintenance_recall_time'];
-			}
-			$core->auth->user_prefs->maintenance->put('ts_'.$task->id(), abs((integer) $ts), 'integer');
-		}
-	}
-
-	/* @ignore */
-	public static function comboTs()
-	{
-		return array(
-			__('Every week') 		=> 604800,
-			__('Every two weeks') 	=> 1209600,
-			__('Every month') 		=> 2592000,
-			__('Every two months') 	=> 5184000
-		);
 	}
 }
Index: plugins/maintenance/_define.php
===================================================================
--- plugins/maintenance/_define.php	(revision 1925)
+++ plugins/maintenance/_define.php	(revision 1989)
@@ -16,4 +16,5 @@
 	/* Description*/		"Maintain your installation",
 	/* Author */			"Olivier Meunier & Association Dotclear",
-	/* Version */			'1.3'
+	/* Version */			'1.3.1',
+	/* Permission */		'admin'
 );
Index: plugins/maintenance/inc/class.dc.maintenance.php
===================================================================
--- plugins/maintenance/inc/class.dc.maintenance.php	(revision 1969)
+++ plugins/maintenance/inc/class.dc.maintenance.php	(revision 1989)
@@ -25,8 +25,9 @@
 class dcMaintenance
 {
-	private $core;
+	public $core;
 	private $tasks = array();
 	private $tabs = array();
 	private $groups = array();
+	private $logs = null;
 
 	/**
@@ -44,4 +45,5 @@
 		$tabs = new ArrayObject();
 		$groups = new ArrayObject();
+		$logs = $this->getLogs();
 
 		# --BEHAVIOR-- dcMaintenanceRegister
@@ -75,5 +77,11 @@
 			}
 
-			$this->tasks[$task] = new $task($this->core, 'plugin.php?p=maintenance');
+			if (($t = new $task($this, 'plugin.php?p=maintenance')) === null
+			|| $t->perm() === null && !$this->core->auth->isSuperAdmin()
+			|| !$this->core->auth->check($t->perm(), $this->core->blog->id)) {
+				continue;
+			}
+
+			$this->tasks[$task] = $t;
 		}
 
@@ -230,27 +238,33 @@
 
 	/**
-	 * Get expired tasks.
-	 *
-	 * @return	<b>array</b>	Array of expired Task ID / date
-	 */
-	public function getExpired()
-	{
-		// Retrieve logs from this task
-		$rs = $this->core->log->getLogs(array(
-			'log_table' => 'maintenance',
-			'blog_id' => 'all'
-		));
-
-		$logs = array();
-		while ($rs->fetch()) {
-			// Check if task exists
-			if (($task = $this->getTask($rs->log_msg)) !== null) {
-				// Check if remider is used and tasks expired
-				if ($task->ts() && strtotime($rs->log_dt) + $task->ts() < time()) {
-					$logs[$rs->log_msg] = $rs->log_dt;
-				}
-			}
-		}
-		return $logs;
+	 * Get logs
+	 *
+	 * Return array(
+	 *		task id => array(
+	 *			timestamp of last execution,
+	 *			logged on current blog or not
+	 *		)
+	 * )
+	 *
+	 * @return	<b>array</b> List of logged tasks
+	 */
+	public function getLogs()
+	{
+		if ($this->logs === null) {
+			$rs = $this->core->log->getLogs(array(
+				'log_table' => 'maintenance',
+				'blog_id' => 'all'
+			));
+
+			$this->logs = array();
+			while ($rs->fetch()) {
+				$this->logs[$rs->log_msg] = array(
+					'ts' => strtotime($rs->log_dt),
+					'blog' => $rs->blog_id == $this->core->blog->id
+				);
+			}
+		}
+
+		return $this->logs;
 	}
 }
Index: plugins/maintenance/inc/class.dc.maintenance.task.php
===================================================================
--- plugins/maintenance/inc/class.dc.maintenance.task.php	(revision 1969)
+++ plugins/maintenance/inc/class.dc.maintenance.task.php	(revision 1989)
@@ -21,9 +21,13 @@
 class dcMaintenanceTask
 {
+	protected $maintenance;
 	protected $core;
 	protected $p_url;
 	protected $code;
-	protected $ts = 604800; // one week
+	protected $ts = 0;
+	protected $expired = 0;
 	protected $ajax = false;
+	protected $blog = false;
+	protected $perm = null;
 
 	protected $id;
@@ -43,11 +47,17 @@
 	 * use method init() to do it.
 	 *
-	 * @param	core	<b>dcCore</b>	dcCore instance
+	 * @param	maintenance	<b>dcMaintenance</b>	dcMaintenance instance
 	 * @param	p_url	<b>string</b>	Maintenance plugin url
 	 */
-	public function __construct($core, $p_url)
-	{
-		$this->core =& $core;
+	public function __construct($maintenance, $p_url)
+	{
+		$this->maintenance = $maintenance;
+		$this->core = $maintenance->core;
 		$this->init();
+
+		if ($this->perm() === null && !$this->core->auth->isSuperAdmin()
+		|| !$this->core->auth->check($this->perm(), $this->core->blog->id)) {
+			return null;
+		}
 
 		$this->p_url = $p_url;
@@ -64,8 +74,10 @@
 		}
 
-		$core->auth->user_prefs->addWorkspace('maintenance');
-		$ts = $core->auth->user_prefs->maintenance->get('ts_'.$this->id);
-		
+		$this->core->blog->settings->addNamespace('maintenance');
+		$ts = $this->core->blog->settings->maintenance->get('ts_'.$this->id);
+
 		$this->ts = abs((integer) $ts);
+
+		return true;
 	}
 
@@ -82,4 +94,29 @@
 
 	/**
+	 * Get task permission.
+	 *
+	 * Return user permission required to run this task 
+	 * or null for super admin.
+	 *
+	 * @return <b>mixed</b> Permission.
+	 */
+	public function perm()
+	{
+		return $this->perm;
+	}
+
+	/**
+	 * Get task scope.
+	 *.
+	 * Is task limited to current blog.
+	 *
+	 * @return <b>boolean</b> Limit to blog
+	 */
+	public function blog()
+	{
+		return $this->blog;
+	}
+
+	/**
 	 * Set $code for task having multiple steps.
 	 *
@@ -99,4 +136,36 @@
 	{
 		return $this->ts === false ? false : abs((integer) $this->ts);
+	}
+
+	/**
+	 * Get task expired.
+	 *
+	 * This return:
+	 * - Timstamp of last update if it expired
+	 * - False if it not expired or has no recall time
+	 * - Null if it has never been executed
+	 *
+	 * @return	<b>mixed</b>	Last update
+	 */
+	public function expired()
+	{
+		if ($this->expired === 0) {
+			if (!$this->ts()) {
+				$this->expired = false;
+			}
+			else {
+				$this->expired = null;
+				$logs = array();
+				foreach($this->maintenance->getLogs() as $id => $log)
+				{
+					if ($id != $this->id() || $this->blog && !$log['blog']) {
+						continue;
+					}
+
+					$this->expired = $log['ts'] + $this->ts() < time() ? $log['ts'] : false;
+				}
+			}
+		}
+		return $this->expired;
 	}
 
@@ -251,6 +320,5 @@
 	protected function log()
 	{
-		$maintenance = new dcMaintenance($this->core);
-		$maintenance->setLog($this->id);
+		$this->maintenance->setLog($this->id);
 	}
 }
Index: plugins/maintenance/inc/tasks/class.dc.maintenance.countcomments.php
===================================================================
--- plugins/maintenance/inc/tasks/class.dc.maintenance.countcomments.php	(revision 1925)
+++ plugins/maintenance/inc/tasks/class.dc.maintenance.countcomments.php	(revision 1984)
@@ -18,7 +18,7 @@
 	protected function init()
 	{
-		$this->task 		= __('Reset comments and ping counters');
+		$this->task 		= __('Count again comments and trackbacks');
 		$this->success 		= __('Comments and trackback counted.');
-		$this->error 		= __('Failed to reset comments and ping counters.');
+		$this->error 		= __('Failed to count comments and trackbacks.');
 	}
 
Index: plugins/maintenance/inc/tasks/class.dc.maintenance.indexcomments.php
===================================================================
--- plugins/maintenance/inc/tasks/class.dc.maintenance.indexcomments.php	(revision 1959)
+++ plugins/maintenance/inc/tasks/class.dc.maintenance.indexcomments.php	(revision 1989)
@@ -22,6 +22,6 @@
 	{
 		$this->name 		= __('Search engine index');
-		$this->task 		= __('Index all comments');
-		$this->step_task 	= __('next');
+		$this->task 		= __('Index all comments for search engine');
+		$this->step_task 	= __('Next');
 		$this->step 		= __('Indexing comment %d to %d.');
 		$this->success 		= __('Comments index done.');
Index: plugins/maintenance/inc/tasks/class.dc.maintenance.indexposts.php
===================================================================
--- plugins/maintenance/inc/tasks/class.dc.maintenance.indexposts.php	(revision 1959)
+++ plugins/maintenance/inc/tasks/class.dc.maintenance.indexposts.php	(revision 1989)
@@ -22,6 +22,6 @@
 	{
 		$this->name 		= __('Search engine index');
-		$this->task 		= __('Index all posts');
-		$this->step_task	= __('next');
+		$this->task 		= __('Index all entries for search engine');
+		$this->step_task	= __('Next');
 		$this->step 		= __('Indexing entry %d to %d.');
 		$this->success 		= __('Entries index done.');
Index: plugins/maintenance/inc/tasks/class.dc.maintenance.vacuum.php
===================================================================
--- plugins/maintenance/inc/tasks/class.dc.maintenance.vacuum.php	(revision 1925)
+++ plugins/maintenance/inc/tasks/class.dc.maintenance.vacuum.php	(revision 1984)
@@ -18,7 +18,7 @@
 	protected function init()
 	{
-		$this->task 		= __('Vacuum tables');
+		$this->task 		= __('optimize tables');
 		$this->success 		= __('Optimization successful.');
-		$this->error 		= __('Failed to vacuum tables.');
+		$this->error 		= __('Failed to optimize tables.');
 	}
 
Index: plugins/maintenance/inc/tasks/class.dc.maintenance.zipmedia.php
===================================================================
--- plugins/maintenance/inc/tasks/class.dc.maintenance.zipmedia.php	(revision 1955)
+++ plugins/maintenance/inc/tasks/class.dc.maintenance.zipmedia.php	(revision 1989)
@@ -14,4 +14,6 @@
 class dcMaintenanceZipmedia extends dcMaintenanceTask
 {
+	protected $perm = 'admin';
+	protected $blog = true;
 	protected $tab = 'backup';
 	protected $group = 'zipblog';
Index: plugins/maintenance/inc/tasks/class.dc.maintenance.ziptheme.php
===================================================================
--- plugins/maintenance/inc/tasks/class.dc.maintenance.ziptheme.php	(revision 1955)
+++ plugins/maintenance/inc/tasks/class.dc.maintenance.ziptheme.php	(revision 1989)
@@ -14,4 +14,6 @@
 class dcMaintenanceZiptheme extends dcMaintenanceTask
 {
+	protected $perm = 'admin';
+	protected $blog = true;
 	protected $tab = 'backup';
 	protected $group = 'zipblog';
Index: plugins/maintenance/index.php
===================================================================
--- plugins/maintenance/index.php	(revision 1969)
+++ plugins/maintenance/index.php	(revision 1989)
@@ -12,12 +12,12 @@
 if (!defined('DC_CONTEXT_ADMIN')) { return; }
 
-dcPage::checkSuper();
-
-// main class
+// Set env
+
+$core->blog->settings->addNamespace('maintenance');
 
 $maintenance = new dcMaintenance($core);
-
-// Set var
-
+$tasks = $maintenance->getTasks();
+
+$msg = '';
 $headers = '';
 $p_url = 'plugin.php?p=maintenance';
@@ -26,5 +26,43 @@
 
 $code = empty($_POST['code']) ? null : (integer) $_POST['code'];
-$tab = empty($_REQUEST['tab']) ? 'maintenance' : $_REQUEST['tab'];
+$tab = empty($_REQUEST['tab']) ? '' : $_REQUEST['tab'];
+
+// Save settings
+
+if (!empty($_POST['settings'])) {
+
+	try {
+		$core->blog->settings->maintenance->put(
+			'plugin_message', 
+			!empty($_POST['settings_plugin_message']), 
+			'boolean', 
+			'Display alert message of late tasks on plugin page', 
+			true, 
+			true
+		);
+
+		foreach($tasks as $t) {
+			if (!empty($_POST['settings_recall_time']) && $_POST['settings_recall_time'] == 'seperate') {
+				$ts = empty($_POST['settings_ts_'.$t->id()]) ? 0 : $_POST['settings_ts_'.$t->id()];
+			}
+			else {
+				$ts = $_POST['settings_recall_time'];
+			}
+			$core->blog->settings->maintenance->put(
+				'ts_'.$t->id(), 
+				abs((integer) $ts), 
+				'integer', 
+				sprintf('Recall time for task %s', $t->id()), 
+				true, 
+				$t->blog()
+			);
+		}
+		
+		http::redirect($p_url.'&done=1&tab='.$tab);
+	}
+	catch(Exception $e) {
+		$core->error->add($e->getMessage());
+	}
+}
 
 // Get task object
@@ -58,9 +96,22 @@
 }
 
-// Get expired tasks
-$core->auth->user_prefs->addWorkspace('maintenance');
-if ($core->auth->user_prefs->maintenance->plugin_message) {
-	$expired = $maintenance->getExpired();
-}
+// Combos
+
+$combo_ts = array(
+	__('Every week') 		=> 604800,
+	__('Every two weeks') 	=> 1209600,
+	__('Every month') 		=> 2592000,
+	__('Every two months') 	=> 5184000
+);
+
+$full_combo_ts = array_merge(array(
+	__('Use different periods for each task') => 'seperate'), 
+	$combo_ts
+);
+
+$task_combo_ts = array_merge(array(
+	__('Never') => 0), 
+	$combo_ts
+);
 
 // Display page
@@ -68,5 +119,6 @@
 echo '<html><head>
 <title>'.__('Maintenance').'</title>'.
-dcPage::jsPageTabs($tab);
+dcPage::jsPageTabs($tab).
+dcPage::jsLoad('index.php?pf=maintenance/js/settings.js');;
 
 if ($task && $task->ajax()) {
@@ -85,7 +137,27 @@
 <body>';
 
+// Check if there is somthing to display according to user permissions
+if (empty($tasks)) {
+	echo dcPage::breadcrumb(
+		array(
+			__('Plugins') => '',
+			'<a href="'.$p_url.'">'.__('Maintenance').'</a>' => '',
+			'<span class="page-title">'.html::escapeHTML($task->name()).'</span>' => ''
+		)
+	).
+	'<p class="warn">'.__('You have not sufficient permissions to view this page.').'</p>'.
+	'</body></html>';
+
+	return null;
+}
+
 // Success message
 
-$msg = $task && !empty($_GET['done']) ? dcPage::success($task->success(),true,true,false) : '';
+if (!empty($_GET['done']) && $tab == 'settings') {
+	$msg = dcPage::success(__('Settings successfully updated'), true, true, false);
+}
+elseif (!empty($_GET['done']) && $task) {
+	$msg = dcPage::success($task->success(), true, true, false);
+}
 
 if ($task && ($res = $task->step()) !== null) {
@@ -120,5 +192,5 @@
 	'</form>'.
 	'<p class="step-back">'.
-		'<a class="back" href="'.$p_url.'">'.__('Back').'</a>'.
+		'<a class="back" href="'.$p_url.'&tab='.$task->tab().'">'.__('Back').'</a>'.
 	'</p>'.
 	'</div>';
@@ -142,8 +214,8 @@
 	{
 		$res_group = '';
-		foreach($maintenance->getGroups($core) as $group_id => $group_name)
+		foreach($maintenance->getGroups() as $group_id => $group_name)
 		{
 			$res_task = '';
-			foreach($maintenance->getTasks($core) as $t)
+			foreach($tasks as $t)
 			{
 				if ($t->group() != $group_id || $t->tab() != $tab_id) {
@@ -156,17 +228,22 @@
 				html::escapeHTML($t->task()).'</label>';
 
-				if (array_key_exists($t->id(), $expired)) {
-					$res_task .= 
-					'<br /> <span class="warn">'.sprintf(
-						__('Last execution of this task was on %s.'),
-						dt::dt2str(__('%Y-%m-%d %H:%M'), $expired[$t->id()])
-					).' '.
-					__('You should execute it now.').'</span>';
-				}
-				elseif ($t->ts()) {
-					$res_task .= 
-					'<br /> <span class="warn">'.
-					__('This task has never been executed.').' '.
-					__('You should execute it now.').'</span>';
+				// Expired task alert message
+				$ts = $t->expired();
+				if ($core->blog->settings->maintenance->plugin_message && $ts !== false) {
+					if ($ts === null) {
+						$res_task .= 
+						'<br /> <span class="warn">'.
+						__('This task has never been executed.').' '.
+						__('You should execute it now.').'</span>';
+					}
+					else {
+						$res_task .= 
+						'<br /> <span class="warn">'.sprintf(
+							__('Last execution of this task was on %s.'),
+							dt::str($core->blog->settings->system->date_format, $ts).' '.
+							dt::str($core->blog->settings->system->time_format, $ts)
+						).' '.
+						__('You should execute it now.').'</span>';
+					}
 				}
 
@@ -192,5 +269,5 @@
 			form::hidden(array('tab'), $tab_id).
 			$core->formNonce().'</p>'.
-			'<p class="form-note info">'.__('This may take a very long time').'.</p>'.
+			'<p class="form-note info">'.__('This may take a very long time.').'</p>'.
 			'</form>'.
 			'</div>';
@@ -200,5 +277,5 @@
 	// Advanced tasks (that required a tab)
 
-	foreach($maintenance->getTasks($core) as $t)
+	foreach($tasks as $t)
 	{
 		if ($t->group() !== null) {
@@ -218,4 +295,45 @@
 		'</div>';
 	}
+
+	// Settings
+
+	echo 
+	'<div id="settings" class="multi-part" title="'.__('Settings').'">'.
+	'<h3>'.__('Settings').'</h3>'.
+	'<form action="'.$p_url.'" method="post">'.
+
+	'<p><label for="settings_plugin_message" class="classic">'.
+	form::checkbox('settings_plugin_message', 1, $core->blog->settings->maintenance->plugin_message).
+	__('Display alert messages on late tasks').'</label></p>'.
+
+	'<p><label for="settings_recall_time">'.__('Recall time for all tasks:').'</label>'.
+	form::combo('settings_recall_time', $full_combo_ts, 'seperate', 'recall-for-all').
+	'</p>'.
+
+	'<p>'.__('Recall time per task:').'</p>';
+
+	foreach($tasks as $t)
+	{
+		echo
+		'<div class="two-boxes">'.
+
+		'<p><label for="settings_ts_'.$t->id().'">'.$t->task().'</label>'.
+		form::combo('settings_ts_'.$t->id(), $task_combo_ts, $t->ts(), 'recall-per-task').
+		'</p>'.
+
+		'</div>';
+	}
+
+	echo 
+	'<p><input type="submit" value="'.__('Save').'" /> '.
+	form::hidden(array('tab'), 'settings').
+	form::hidden(array('settings'), 1).
+	$core->formNonce().'</p>'.
+	'</form>'.
+	'<p class="info">'.sprintf(
+		__('You can place list of late tasks on your %s.'),
+		'<a href="preferences.php#user-favorites">'.__('Dashboard').'</a>'
+	).'</a></p>'.
+	'</div>';
 }
 
Index: lugins/maintenance/js/preferences.js
===================================================================
--- plugins/maintenance/js/preferences.js	(revision 1969)
+++ 	(revision )
@@ -1,14 +1,0 @@
-$(function(){
-	$('#maintenance-recall-time h5').toggleWithLegend($('#maintenance-recall-time').children().not('h5'),{
-		user_pref: 'dcx_maintenance_recall_time',
-		legend_click:true
-	});
-	$('.recall-for-all').change(function(){
-		var v=$(this).val();
-		if(v=='seperate'){
-			$('.recall-per-task').removeAttr('disabled');
-		}else{
-			$('.recall-per-task').attr('disabled','disabled');
-		}
-	});
-});
Index: plugins/maintenance/js/settings.js
===================================================================
--- plugins/maintenance/js/settings.js	(revision 1984)
+++ plugins/maintenance/js/settings.js	(revision 1984)
@@ -0,0 +1,11 @@
+$(function(){
+
+	$('.recall-for-all').change(function(){
+		var v=$(this).val();
+		if(v=='seperate'){
+			$('.recall-per-task').removeAttr('disabled');
+		}else{
+			$('.recall-per-task').attr('disabled','disabled');
+		}
+	});
+});
Index: plugins/pages/page.php
===================================================================
--- plugins/pages/page.php	(revision 1964)
+++ plugins/pages/page.php	(revision 1981)
@@ -456,5 +456,5 @@
 					'</p>'.
 					'<p class="form-note warn">'.
-					__('Warning: If you set the URL manually, it may conflict with another entry.').
+					__('Warning: If you set the URL manually, it may conflict with another page.').
 					'</p></div>'
 	))));
Index: plugins/widgets/index.php
===================================================================
--- plugins/widgets/index.php	(revision 1971)
+++ plugins/widgets/index.php	(revision 1993)
@@ -247,5 +247,4 @@
 $widget_elements = new stdClass;
 $widget_elements->content =
-'<h3 class="clear">'.__('Help for this page').'</h3>'.
 '<h4>'.__('Use of widgets').'</h4>'.
 '<p>'.__('Widgets may be used to add various blocks of content to be displayed on your public pages. To add a widget, '.
