Index: /extensions/PersoFavicon/admin.php
===================================================================
--- /extensions/PersoFavicon/admin.php	(revision 31466)
+++ /extensions/PersoFavicon/admin.php	(revision 31466)
@@ -0,0 +1,130 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Personal Favicon by plugin for Piwigo                                 |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2016 ddtddt               http://temmii.com/piwigo/ |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+global $template, $conf, $user, $page;
+include_once(PHPWG_ROOT_PATH .'admin/include/tabsheet.class.php');
+$my_base_url = get_admin_plugin_menu_link(__FILE__);
+
+// +-----------------------------------------------------------------------+
+// | Check Access and exit when user status is not ok                      |
+// +-----------------------------------------------------------------------+
+check_status(ACCESS_ADMINISTRATOR);
+
+//-------------------------------------------------------- sections definitions
+
+	  if (!is_webmaster())
+  {
+    array_push($page['errors'], l10n('This section is reserved for the webmaster'));
+  }
+  else
+  {
+// Gest Tab
+if (!isset($_GET['tab']))
+    $page['tab'] = 'pfi';
+else
+    $page['tab'] = $_GET['tab'];
+$tabsheet = new tabsheet();
+  $tabsheet->add('pfi',l10n('pfi_ajout'),PFI_ADMIN.'-pfi');
+  $tabsheet->add('help',l10n('help'),PFI_ADMIN.'-help');
+$tabsheet->select($page['tab']);
+$tabsheet->assign();
+
+switch ($page['tab'])
+{
+// Onglet gestion de onglet ajout icône
+  case 'pfi':
+$blockdesc = 'pfi';
+$template->assign(
+	$blockdesc,
+	array(
+	  'meta'=>l10n('pfi_name'),
+	  ));
+
+$filename = PHPWG_ROOT_PATH.PWG_LOCAL_DIR .'favicon.ico';
+if (file_exists($filename)) {$template->assign('ICO',$filename);}
+
+if (isset($_POST['submitpfi']))
+{
+
+$content_dir = PHPWG_ROOT_PATH.PWG_LOCAL_DIR;	
+$tmp_file = $_FILES['pfi']['tmp_name'];
+
+if ($_FILES['pfi']['error'] !== UPLOAD_ERR_OK){
+  include_once(PHPWG_ROOT_PATH .'admin/include/functions_upload.inc.php');
+  $error_message = file_upload_error_message($_FILES['pfi']['error']);
+  array_push( $page['errors'], $error_message);
+  break;
+}
+
+if( !is_uploaded_file($tmp_file) ){
+  array_push( $page['errors'], l10n('pfi_erreur_vide') );
+  break;
+}
+
+$type_file = strrchr($_FILES['pfi']['name'], '.');
+if( !strstr($type_file, 'ico')){
+  array_push( $page['errors'], l10n('pfi_erreur_ext'));
+  break;
+}
+	
+$taille_maxi = 5120;
+$taille = filesize($_FILES['pfi']['tmp_name']);
+if($taille>$taille_maxi){
+  array_push($page['errors'], l10n('pfi_erreur_taille'));
+  break;
+}	
+
+$filename = PHPWG_ROOT_PATH.PWG_LOCAL_DIR .'favicon.ico';
+if (file_exists($filename)){
+  array_push($page['infos'], l10n('pfi_erreur_exist'));
+}
+
+$name_file = $_FILES['pfi']['name'];
+if( preg_match('#[\x00-\x1F\x7F-\x9F/\\\\]#', $name_file) ){
+  array_push( $page['infos'], l10n('pfi_erreur_nom') );
+  break;
+}
+else if(
+!move_uploaded_file($tmp_file, $content_dir . 'favicon.ico') )
+{
+array_push( $page['errors'], l10n('pfi_erreur_mouve') );
+break;
+}
+  array_push( $page['infos'], l10n('pfi_ok') );
+}
+  break;
+
+  case 'help':
+  $blockdesc = 'help';
+$template->assign(
+	$blockdesc,
+	array(
+	  'meta'=>l10n('pfi_name'),
+	  ));
+  
+	break;
+	
+} 
+$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); 
+$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
+}
+?>
Index: /extensions/PersoFavicon/admin.tpl
===================================================================
--- /extensions/PersoFavicon/admin.tpl	(revision 31466)
+++ /extensions/PersoFavicon/admin.tpl	(revision 31466)
@@ -0,0 +1,34 @@
+<div class="titrePage">
+  <h2>{'pfi_h2'|@translate}</h2>
+</div>
+{if isset ($pfi)}
+  {if isset ($ICO)}
+	<div style="text-align:left; padding:20px;">
+		{'pfi_actu'|@translate} <img class="thumbnail" src="{$ICO}"><br><br>
+		{'pfi_actu2'|@translate}
+	</div>
+  {/if}	
+		<form method="post" enctype="multipart/form-data" onsubmit="return(confirm('{'pfi_validdef'|@translate}'));">
+			<fieldset>
+				<legend>{'pfi_select'|@translate}</legend>
+					<input class="file" name="pfi" type="file" value="">
+		<br>	
+		<br>
+			<div>
+				<input class="submit" name="submitpfi" type="submit" value="{'pfi_envoie'|@translate}" {$TAG_INPUT_ENABLED} />
+			</div>
+			</fieldset>
+		</form>
+{/if}
+{if isset ($help)}
+  <fieldset>
+    <legend>{'pfi_aide1T'|@translate}</legend>
+    <div style="text-align:left;padding:10px;">{'pfi_aide1'|@translate}</div>
+  </fieldset>
+  {if $ENABLE_SYNCHRONIZATION}
+	<fieldset>
+	  <legend>FTP</legend>
+	  <div style="text-align:left;padding:10px;">{'pfi_aide2'|@translate}</div>
+	</fieldset>
+  {/if}
+{/if}
Index: /extensions/PersoFavicon/index.php
===================================================================
--- /extensions/PersoFavicon/index.php	(revision 31465)
+++ /extensions/PersoFavicon/index.php	(revision 31466)
@@ -1,25 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery                                  |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2009 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
 // Recursive call
 $url = '../';
Index: /extensions/PersoFavicon/language/en_UK/index.php
===================================================================
--- /extensions/PersoFavicon/language/en_UK/index.php	(revision 31465)
+++ /extensions/PersoFavicon/language/en_UK/index.php	(revision 31466)
@@ -1,25 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery                                  |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2009 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
 // Recursive call
 $url = '../';
Index: /extensions/PersoFavicon/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/PersoFavicon/language/en_UK/plugin.lang.php	(revision 31465)
+++ /extensions/PersoFavicon/language/en_UK/plugin.lang.php	(revision 31466)
@@ -1,3 +1,22 @@
 <?php
+// +-----------------------------------------------------------------------+
+// | Personal Favicon by plugin for Piwigo                                 |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2016 ddtddt               http://temmii.com/piwigo/ |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
 
 $lang['This section is reserved for the webmaster'] = 'This section is reserved for the webmaster';
@@ -18,4 +37,5 @@
 $lang['pfi_ok'] = 'The file has been uploaded';
 $lang['pfi_erreur_mouve'] = 'Unable to copy file in the "local" directory';
+$lang['PersoFavicon'] = 'PersoFavicon';
 
 //tab help
Index: /extensions/PersoFavicon/language/fr_FR/index.php
===================================================================
--- /extensions/PersoFavicon/language/fr_FR/index.php	(revision 31465)
+++ /extensions/PersoFavicon/language/fr_FR/index.php	(revision 31466)
@@ -1,25 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery                                  |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2009 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
 // Recursive call
 $url = '../';
Index: /extensions/PersoFavicon/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/PersoFavicon/language/fr_FR/plugin.lang.php	(revision 31465)
+++ /extensions/PersoFavicon/language/fr_FR/plugin.lang.php	(revision 31466)
@@ -1,4 +1,22 @@
 <?php
-
+// +-----------------------------------------------------------------------+
+// | Personal Favicon by plugin for Piwigo                                 |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2016 ddtddt               http://temmii.com/piwigo/ |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
 $lang['This section is reserved for the webmaster'] = 'Cette section est réservée au webmaster';
 
@@ -18,4 +36,5 @@
 $lang['pfi_ok'] = 'Le fichier a bien été transféré';
 $lang['pfi_erreur_mouve'] = 'Impossible de copier le fichier dans le répertoire "local"';
+$lang['PersoFavicon'] = 'Favicon personel';
 
 //tab help
Index: /extensions/PersoFavicon/main.inc.php
===================================================================
--- /extensions/PersoFavicon/main.inc.php	(revision 31465)
+++ /extensions/PersoFavicon/main.inc.php	(revision 31466)
@@ -6,17 +6,42 @@
 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=462
 Author: ddtddt
-Author URI: http://piwigo.org/
+Author URI: http://temmii.com/piwigo/
 */
 
+// +-----------------------------------------------------------------------+
+// | Personal Favicon by plugin for Piwigo                                 |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2016 ddtddt               http://temmii.com/piwigo/ |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
 define('PFI_DIR' , basename(dirname(__FILE__)));
 define('PFI_PATH' , PHPWG_PLUGINS_PATH . PFI_DIR . '/');
+define('PFI_ADMIN',get_root_url().'admin.php?page=plugin-'.PFI_DIR);
+
+add_event_handler('loading_lang', 'PersoFavicon_loading_lang');	  
+function PersoFavicon_loading_lang(){
+  load_language('plugin.lang', PFI_PATH);
+}
 
 //Ajout du menu admin
 add_event_handler('get_admin_plugin_menu_links', 'PersoFavicon_admin_menu');
-function PersoFavicon_admin_menu($menu)
-{
-  array_push($menu, array(
-	'NAME' => 'PersoFavicon',
-    'URL' => get_admin_plugin_menu_link(PFI_PATH . 'admin/admin.php')));
+function PersoFavicon_admin_menu($menu){
+  $menu[] = array(
+    'NAME' => l10n('PersoFavicon'),
+    'URL' => PFI_ADMIN,
+  );
   return $menu;
 }
@@ -25,29 +50,21 @@
 // Remplace le code dans le header
 add_event_handler('loc_begin_page_header', 'Change_Favicon', 55 );
-
-function Change_Favicon()
- {
+function Change_Favicon(){
 	global $template;
 	$template->set_prefilter('header', 'Favicon');
- }
+}
 
-function Favicon($content, &$smarty)
- {
+function Favicon($content, &$smarty){
   $search = '#<link rel="shortcut icon".*?favicon.ico">#';
+  global $conf;
+  $favicon_name = & $conf['PersoFavicon'];
 
-	global $conf;
-  
-$favicon_name = & $conf['PersoFavicon'];
-
-	if (!empty($favicon_name))
-		{
-  $replacement = '<link rel="shortcut icon" type="image/x-icon" href="'.PHPWG_ROOT_PATH.PWG_LOCAL_DIR.$favicon_name.'.ico">';
-		}
-	else
-		{
-  $replacement = '<link rel="shortcut icon" type="image/x-icon" href="'.PHPWG_ROOT_PATH.PWG_LOCAL_DIR.'favicon.ico">';
-		}
+  if (!empty($favicon_name)){
+    $replacement = '<link rel="shortcut icon" type="image/x-icon" href="'.PHPWG_ROOT_PATH.PWG_LOCAL_DIR.$favicon_name.'.ico">';
+  }else{
+    $replacement = '<link rel="shortcut icon" type="image/x-icon" href="'.PHPWG_ROOT_PATH.PWG_LOCAL_DIR.'favicon.ico">';
+  }
   return preg_replace($search, $replacement, $content);
- }
+}
  
 ?>
Index: /extensions/PersoFavicon/obsolete.list
===================================================================
--- /extensions/PersoFavicon/obsolete.list	(revision 31466)
+++ /extensions/PersoFavicon/obsolete.list	(revision 31466)
@@ -0,0 +1,2 @@
+admin/admin.php
+admin/admin.tpl
