Index: /extensions/de_activate_all_languages/initadmin.php
===================================================================
--- /extensions/de_activate_all_languages/initadmin.php	(revision 31448)
+++ /extensions/de_activate_all_languages/initadmin.php	(revision 31448)
@@ -0,0 +1,125 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | de_activate all language plugin for piwigo                            |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
+include_once(PHPWG_ROOT_PATH.'admin/include/languages.class.php');
+
+//add prefiltre photo
+add_event_handler('loc_begin_admin', 'plugDalPf',60);
+add_event_handler('loc_begin_admin_page', 'plugDal_action');
+
+function plugDalPf(){
+  global $template, $conf;
+  $admin_base_url = $_SERVER['REQUEST_URI'];
+   $template->assign(
+    array(
+		'U_DAL' => $admin_base_url . '&amp;deactivatelanguage',
+		'U_DALA' => $admin_base_url . '&amp;activatelanguage',
+  ));
+  
+  if(isset($conf['de_activate_all_language'])){
+  $template->assign('U_RDAL',($admin_base_url . '&amp;reactivatelanguage'));
+  }
+  
+  $template->set_prefilter('languages', 'plugDalPT');
+}
+
+function plugDalPT($content, &$smarty){
+  global $template;
+  $search = '#</h2>
+</div>#';
+  $replacement = '</h2>
+</div>
+<p style="text-align: left;padding:10px">
+<a href="{$U_DAL}" name="submitDal" onclick="return confirm(\'{\'Are you sure?\'|@translate|@escape:javascript}\');"><span class="icon-check-empty"></span>{\'Deactivate all language\'|@translate}</a>
+{if isset ($U_RDAL)}
+| <a href="{$U_RDAL}" name="submitrdal" onclick="return confirm(\'{\'Are you sure?\'|@translate|@escape:javascript}\');"><span class="icon-check"></span>{\'Activate language Deactivate\'|@translate}</a>
+{/if}
+| <a href="{$U_DALA}" name="submitDala" onclick="return confirm(\'{\'Are you sure?\'|@translate|@escape:javascript}\');"><span class="icon-check"></span>{\'Activate all language\'|@translate}</a>
+</p>
+ ';
+  return preg_replace($search, $replacement, $content);
+}
+ 
+function plugDal_action(){
+  load_language('plugin.lang', DAL_PATH);
+  global $template, $conf;
+  
+  if (isset($_GET['deactivatelanguage'])) {
+	$admin_base_url=explode('&deactivatelanguage', $_SERVER['REQUEST_URI']);
+    $activelang=array();
+	$query = 'SELECT * FROM '.LANGUAGES_TABLE.';';
+	$result=pwg_query($query);
+	while ($row = pwg_db_fetch_assoc($result))
+	  {
+        $activelang[]=array(
+		  'id'=>$row['id'],
+		  'version'=>$row['version'],
+		  'name'=>$row['name'],		  
+		);
+      }
+	if(count($activelang)!=1){
+	conf_update_param('de_activate_all_language', $activelang);
+	}
+	
+	$default_language = get_default_language();
+    $query = 'DELETE FROM '.LANGUAGES_TABLE.' WHERE id!= \''.$default_language.'\';';
+	pwg_query($query);
+	redirect($admin_base_url[0]);
+	  }
+	  
+  if (isset($_GET['activatelanguage'])) {
+	$admin_base_url=explode('&activatelanguage', $_SERVER['REQUEST_URI']);
+	$languages = new languages();
+	$languages->get_db_languages();
+	
+	foreach ($languages as $key => $language){
+		foreach ($language as $key => $lang){
+		//var_dump($lang);
+		  if (isset($lang['code'])){
+			$query = 'INSERT INTO '.LANGUAGES_TABLE.'(id, version, name) VALUES(\''.$lang['code'].'\',\''.$lang['version'].'\',\''.$lang['name'].'\');';
+			$q = 'SELECT 1 FROM ' . LANGUAGES_TABLE . ' WHERE id= \'' . $lang['code'] . '\';';
+			$test = pwg_query($q);
+			$row = pwg_db_fetch_assoc($test);
+			if (count($row) == 0) {
+              $query = 'INSERT INTO '.LANGUAGES_TABLE.'(id, version, name) VALUES(\''.$lang['code'].'\',\''.$lang['version'].'\',\''.$lang['name'].'\');';
+			  pwg_query($query);
+			}
+		  }
+		}
+	}
+	redirect($admin_base_url[0]);
+  }
+
+  if (isset($_GET['reactivatelanguage'])) {
+	$admin_base_url=explode('&reactivatelanguage', $_SERVER['REQUEST_URI']);
+	$reaclang = safe_unserialize($conf['de_activate_all_language']);
+	foreach ($reaclang as $key => $lang){
+	  if($lang['id']!=get_default_language()){
+		$query = 'INSERT INTO '.LANGUAGES_TABLE.'(id, version, name) VALUES(\''.$lang['id'].'\',\''.$lang['version'].'\',\''.$lang['name'].'\');';
+		pwg_query($query);
+	  }
+	}
+	conf_delete_param('de_activate_all_language', $activelang);
+	redirect($admin_base_url[0]);
+  }	    
+	  
+}
Index: /extensions/de_activate_all_languages/language/en_UK/description.txt
===================================================================
--- /extensions/de_activate_all_languages/language/en_UK/description.txt	(revision 31448)
+++ /extensions/de_activate_all_languages/language/en_UK/description.txt	(revision 31448)
@@ -0,0 +1,1 @@
+Add the option deactivate / activate all languages on the language management page
Index: /extensions/de_activate_all_languages/language/en_UK/index.php
===================================================================
--- /extensions/de_activate_all_languages/language/en_UK/index.php	(revision 31448)
+++ /extensions/de_activate_all_languages/language/en_UK/index.php	(revision 31448)
@@ -0,0 +1,9 @@
+<?php
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/de_activate_all_languages/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/de_activate_all_languages/language/en_UK/plugin.lang.php	(revision 31448)
+++ /extensions/de_activate_all_languages/language/en_UK/plugin.lang.php	(revision 31448)
@@ -0,0 +1,26 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | de_activate all language plugin for piwigo                            |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 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['Deactivate all language'] = 'Deactivate all language';
+$lang['Activate all language'] = 'Activate all language';
+$lang['Activate language Deactivate'] = 'Activate language Deactivate';
+
+?>
Index: /extensions/de_activate_all_languages/language/fr_FR/description.txt
===================================================================
--- /extensions/de_activate_all_languages/language/fr_FR/description.txt	(revision 31448)
+++ /extensions/de_activate_all_languages/language/fr_FR/description.txt	(revision 31448)
@@ -0,0 +1,1 @@
+Ajoute l'action Désactiver toutes les langues sur la page de gestion des langues
Index: /extensions/de_activate_all_languages/language/fr_FR/index.php
===================================================================
--- /extensions/de_activate_all_languages/language/fr_FR/index.php	(revision 31448)
+++ /extensions/de_activate_all_languages/language/fr_FR/index.php	(revision 31448)
@@ -0,0 +1,30 @@
+<?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 = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/de_activate_all_languages/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/de_activate_all_languages/language/fr_FR/plugin.lang.php	(revision 31448)
+++ /extensions/de_activate_all_languages/language/fr_FR/plugin.lang.php	(revision 31448)
@@ -0,0 +1,26 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | de_activate all language plugin for piwigo                            |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 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['Deactivate all language'] = 'Désactiver toutes les langues';
+$lang['Activate all language'] = 'Activer toutes les langues';
+$lang['Activate language Deactivate'] = 'Réactiver les langues désactiver';
+
+?>
Index: /extensions/de_activate_all_languages/language/index.php
===================================================================
--- /extensions/de_activate_all_languages/language/index.php	(revision 31448)
+++ /extensions/de_activate_all_languages/language/index.php	(revision 31448)
@@ -0,0 +1,30 @@
+<?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 = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/de_activate_all_languages/main.inc.php
===================================================================
--- /extensions/de_activate_all_languages/main.inc.php	(revision 31448)
+++ /extensions/de_activate_all_languages/main.inc.php	(revision 31448)
@@ -0,0 +1,43 @@
+<?php
+/*
+Plugin Name: de_activate all language
+Version: auto
+Description: Add the option Deactivate / Activate all languages on the language management page
+Plugin URI: http://piwigo.org/ext/extension_view.php?eid=826
+Author: ddtddt
+Author URI: http://temmii.com/piwigo/
+*/
+
+// +-----------------------------------------------------------------------+
+// | de_activate all language plugin for piwigo                            |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 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!');
+
+// +-----------------------------------------------------------------------+
+// | Define plugin constants                                               |
+// +-----------------------------------------------------------------------+
+
+define('DAL_ID', basename(dirname(__FILE__)));
+define('DAL_PATH', PHPWG_PLUGINS_PATH.DAL_ID.'/');
+
+// Plugin for admin
+if (script_basename() == 'admin') {
+    include_once(dirname(__FILE__) . '/initadmin.php');
+}
