Index: /trunk/admin/configuration.php
===================================================================
--- /trunk/admin/configuration.php	(revision 11586)
+++ /trunk/admin/configuration.php	(revision 11587)
@@ -103,10 +103,19 @@
   );
   
-$order_options = array(
-    ' ORDER BY date_available DESC, file ASC, id ASC' => 'Post date DESC, File name ASC',
-    ' ORDER BY date_available ASC, file ASC, id ASC' => 'Post date ASC, File name ASC',
-    ' ORDER BY file DESC, date_available DESC, id ASC' => 'File name DESC, Post date DESC',
-    ' ORDER BY file ASC, date_available DESC, id ASC' => 'File name ASC, Post date DESC',
-    'custom' => l10n('Custom'),
+// image order management
+$sort_fields = array(
+  '' => '',
+  'rank' => l10n('Rank'),
+  'file' => l10n('File name'),
+  'date_creation' => l10n('Creation date'),
+  'date_available' => l10n('Post date'),
+  'average_rate' => l10n('Average rate'),
+  'hit' => l10n('Most visited'),
+  'id' => 'Id',
+  );
+
+$sort_directions = array(
+  'ASC' => l10n('ascending'),
+  'DESC' => l10n('descending'),
   );
 
@@ -119,55 +128,29 @@
   {
     case 'main' :
-    {
-      $order_regex = '#^(([ \w\']{2,}) (ASC|DESC),{1}){1,}$#';
-      // process 'order_by_perso' string
-      if ($_POST['order_by'] == 'custom' AND !empty($_POST['order_by_perso']))
-      {
-        $_POST['order_by_perso'] = stripslashes(trim($_POST['order_by_perso']));
-        $_POST['order_by'] = str_ireplace(
-          array('order by ', 'asc', 'desc', '"'),
-          array(null, 'ASC', 'DESC', '\''),
-          $_POST['order_by_perso']
-          );
-        
-        if (preg_match($order_regex, $_POST['order_by'].','))
+    {      
+      if ( !isset($conf['order_by_custom']) and !isset($conf['order_by_inside_category_custom']) )
+      {
+        if ( !empty($_POST['order_by_field']) )
         {
-          $_POST['order_by'] = ' ORDER BY '.addslashes($_POST['order_by']);
+          $order_by = array();
+          $order_by_inside_category = array();
+          for ($i=0; $i<count($_POST['order_by_field']); $i++)
+          {
+            if ($_POST['order_by_field'][$i] == '')
+            {
+              array_push($page['errors'], l10n('No field selected'));
+            }
+            else
+            {
+              if ($_POST['order_by_field'][$i] != 'rank')
+              {
+                $order_by[] = $_POST['order_by_field'][$i].' '.$_POST['order_by_direction'][$i];
+              }
+              $order_by_inside_category[] = $_POST['order_by_field'][$i].' '.$_POST['order_by_direction'][$i];
+            }
+          }
+          $_POST['order_by'] = 'ORDER BY '.implode(', ', $order_by);
+          $_POST['order_by_inside_category'] = 'ORDER BY '.implode(', ', $order_by_inside_category);
         }
-        else
-        {
-          array_push($page['errors'], l10n('Invalid order string').' &laquo; '.$_POST['order_by'].' &raquo;');
-        }
-      }
-      else if ($_POST['order_by'] == 'custom')
-      {
-        array_push($page['errors'], l10n('Invalid order string'));
-      }
-      // process 'order_by_inside_category_perso' string
-      if ($_POST['order_by_inside_category'] == 'as_order_by')
-      {
-        $_POST['order_by_inside_category'] = $_POST['order_by'];
-      }
-      else if ($_POST['order_by_inside_category'] == 'custom' AND !empty($_POST['order_by_inside_category_perso']))
-      {
-        $_POST['order_by_inside_category_perso'] = stripslashes(trim($_POST['order_by_inside_category_perso']));
-        $_POST['order_by_inside_category'] = str_ireplace(
-          array('order by ', 'asc', 'desc', '"'),
-          array(null, 'ASC', 'DESC', '\''),
-          $_POST['order_by_inside_category_perso']
-          );
-        
-        if (preg_match($order_regex, $_POST['order_by_inside_category'].','))
-        {
-          $_POST['order_by_inside_category'] = ' ORDER BY '.addslashes($_POST['order_by_inside_category']);
-        }
-        else
-        {
-          array_push($page['errors'], l10n('Invalid order string').' &laquo; '.$_POST['order_by_inside_category'].' &raquo;');
-        }
-      }
-      else if ($_POST['order_by_inside_category'] == 'custom')
-      {
-        array_push($page['errors'], l10n('Invalid order string'));
       }
       
@@ -295,33 +278,48 @@
 {
   case 'main' :
-  {
-    // process 'order_by' string
-    if (array_key_exists($conf['order_by'], $order_options))
-    {
-      $order_by_selected = $conf['order_by'];
-      $order_by_perso = null;
+  {   
+    
+    function order_by_is_local()
+    {
+      @include(PHPWG_ROOT_PATH. 'local/config/config.inc.php');
+      if (isset($conf['local_dir_site']))
+      {
+        @include(PHPWG_ROOT_PATH.PWG_LOCAL_DIR. 'config/config.inc.php');
+      }
+      
+      return isset($conf['order_by']) or isset($conf['order_by_inside_category']);
+    }
+    
+    if (order_by_is_local())
+    {
+      array_push($page['warnings'], l10n('You have specified <i>$conf[\'order_by\']</i> in your local configuration file, this parameter in deprecated, please remove it or rename it into <i>$conf[\'order_by_custom\']</i> !'));
+    }
+    
+    if ( isset($conf['order_by_custom']) or isset($conf['order_by_inside_category_custom']) )
+    {
+      $order_by = array(array(
+        'FIELD' => '',    
+        'DIRECTION' => 'ASC', 
+        ));
+        
+      $template->assign('ORDER_BY_IS_CUSTOM', true);
     }
     else
     {
-      $order_by_selected = 'custom';
-      $order_by_perso = str_replace(' ORDER BY ', null, $conf['order_by']);
-    }
-    // process 'order_by_inside_category' string
-    if ($conf['order_by_inside_category'] == $conf['order_by'])
-    {
-      $order_by_inside_category_selected = 'as_order_by';
-      $order_by_inside_category_perso = null;
-    }
-    else if (array_key_exists($conf['order_by_inside_category'], $order_options))
-    {
-      $order_by_inside_category_selected = $conf['order_by_inside_category'];
-      $order_by_inside_category_perso = null;
-    }
-    else
-    {
-      $order_by_inside_category_selected = 'custom';
-      $order_by_inside_category_perso = str_replace(' ORDER BY ', null, $conf['order_by_inside_category']);
-    }
-     
+      $out = array();
+      $order_by = trim($conf['order_by_inside_category']);
+      $order_by = str_replace('ORDER BY ', null, $order_by);
+      $order_by = explode(', ', $order_by);
+      foreach ($order_by as $field)
+      {
+        $field= explode(' ', $field);
+        $out[] = array(
+          'FIELD' => $field[0],    
+          'DIRECTION' => $field[1],    
+        );
+      }
+      $order_by = $out;
+    }
+  
     $template->assign(
       'main',
@@ -335,15 +333,9 @@
           ),
         'week_starts_on_options_selected' => $conf['week_starts_on'],
-        'order_by_options' => $order_options,
-        'order_by_selected' => $order_by_selected,
-        'order_by_perso' => $order_by_perso,
-        'order_by_inside_category_options' => 
-          array_merge(
-            array('as_order_by'=>l10n('As default order')), 
-            $order_options
-            ),
-        'order_by_inside_category_selected' => $order_by_inside_category_selected,
-        'order_by_inside_category_perso' => $order_by_inside_category_perso,
-        ));
+        'order_by' => $order_by,
+        'order_field_options' => $sort_fields,
+        'order_direction_options' => $sort_directions,
+        )
+      );
 
     foreach ($main_checkboxes as $checkbox)
Index: /trunk/admin/themes/default/template/configuration.tpl
===================================================================
--- /trunk/admin/themes/default/template/configuration.tpl	(revision 11586)
+++ /trunk/admin/themes/default/template/configuration.tpl	(revision 11587)
@@ -101,37 +101,45 @@
       <span class="property">
         {'Default photos order'|@translate}
-        {html_options name="order_by" options=$main.order_by_options selected=$main.order_by_selected}
-        <input type="text" name="order_by_perso" size="40" value="{$main.order_by_perso}" 
-            {if $main.order_by_selected != 'custom'}style="display:none;"{/if}/>
-      </span>
-    </li>
-    <li>
-      &nbsp;
-      <span class="property">
-        {'Default photos order inside album'|@translate}
-        {html_options name="order_by_inside_category" options=$main.order_by_inside_category_options selected=$main.order_by_inside_category_selected}
-        <input type="text" name="order_by_inside_category_perso" size="40" value="{$main.order_by_inside_category_perso}" 
-            {if $main.order_by_inside_category_selected != 'custom'}style="display:none;"{/if}>
+        
+        {foreach from=$main.order_by item=order}
+        <span class="filter {if $ORDER_BY_IS_CUSTOM}transparent{/if}">
+          <a class="removeFilter" title="{'remove this filter'|@translate}"><span>[x]</span></a>
+          <select name="order_by_field[]" {if $ORDER_BY_IS_CUSTOM}disabled{/if}>
+            {html_options options=$main.order_field_options selected=$order.FIELD }
+          </select>
+          <select name="order_by_direction[]" {if $ORDER_BY_IS_CUSTOM}disabled{/if}>
+            {html_options options=$main.order_direction_options selected=$order.DIRECTION }
+          </select>  
+        </span>
+        {/foreach}
+        
+        {if !$ORDER_BY_IS_CUSTOM}
+          <a class="addFilter" title="{'Add a filter'|@translate}"><span>[+]</span></a>
+        {else}
+          <span class="order_by_is_custom">{'You can\'t define a default photo order because you have a custom setting in your local configuration.'|@translate}</span>
+        {/if}
       </span>
     </li>
     
+{if !$ORDER_BY_IS_CUSTOM}
 {footer_script require='jquery'}{literal}
 jQuery(document).ready(function () {
-  $('select[name="order_by"]').change(function () {
-    if ($(this).val() == 'custom') {
-      $('input[name="order_by_perso"]').show();
-    } else {
-      $('input[name="order_by_perso"]').hide();
-    }
+  $('.addFilter').click(function() {
+    rel = $(this).attr('rel');
+    $(this).prev('span.filter').clone().insertBefore($(this));
+    $(this).prev('span.filter').children('select[name="order_by_field[]"]').val('');
+    $(this).prev('span.filter').children('select[name="order_by_direction[]"]').val('ASC');
+      
+    $(".removeFilter").click(function () {
+      $(this).parent('span.filter').remove();
+    });
   });
-  $('select[name="order_by_inside_category"]').change(function () {
-    if ($(this).val() == 'custom') {
-      $('input[name="order_by_inside_category_perso"]').show();
-    } else {
-      $('input[name="order_by_inside_category_perso"]').hide();
-    }
+  
+  $(".removeFilter").click(function () {
+    $(this).parent('span.filter').remove();
   });
 });
 {/literal}{/footer_script}
+{/if}
   </ul>
 </fieldset>
Index: /trunk/admin/themes/default/theme.css
===================================================================
--- /trunk/admin/themes/default/theme.css	(revision 11586)
+++ /trunk/admin/themes/default/theme.css	(revision 11587)
@@ -1049,2 +1049,13 @@
 div.token-input-dropdown ul li em {font-weight: bold;font-style: normal;}
 div.token-input-dropdown ul li.token-input-selected-dropdown-item {background-color: #3b5998;color: #fff;}
+
+#mainConfCheck a.addFilter {background: url(icon/plus.gif) no-repeat 0 4px;width:19px;height:19px;display:inline-block;}
+#mainConfCheck a.addFilter:hover {background-position:0 5px;border:none;}
+#mainConfCheck a.addFilter span {display:none;}
+#mainConfCheck a.removeFilter {background: url(icon/remove_filter.png) no-repeat top left;width:7px;height:7px;display:inline-block;}
+#mainConfCheck a.removeFilter:hover {background: url(icon/remove_filter_hover.png);border:none;}
+#mainConfCheck a.removeFilter span {display:none;}
+#mainConfCheck span.property span.filter:first-child a.removeFilter {display:none;} /* can't delete the first field */
+#mainConfCheck span.filter {margin-right:10px;}
+#mainConfCheck .transparent {opacity:0.5;filter:alpha(opacity=50);}
+#mainConfCheck .order_by_is_custom {display:block;font-weight:normal;font-style:italic;}
Index: /trunk/include/common.inc.php
===================================================================
--- /trunk/include/common.inc.php	(revision 11586)
+++ /trunk/include/common.inc.php	(revision 11587)
@@ -107,4 +107,15 @@
   @include(PHPWG_ROOT_PATH.PWG_LOCAL_DIR. 'config/config.inc.php');
 }
+
+// that's for migration from 2.2, will be deprecated in 2.4
+if (isset($conf['order_by']))
+{
+  $conf['order_by_custom'] = $conf['order_by'];
+}
+if (isset($conf['order_by_inside_category']))
+{
+  $conf['order_by_inside_category_custom'] = $conf['order_by_inside_category'];
+}
+
 include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$conf['dblayer'].'.inc.php');
 
@@ -143,4 +154,14 @@
 
 load_plugins();
+
+// users can have defined a custom order pattern, incompatible with GUI form
+if (isset($conf['order_by_custom']))
+{
+  $conf['order_by'] = $conf['order_by_custom'];
+}
+if (isset($conf['order_by_inside_category_custom']))
+{
+  $conf['order_by_inside_category'] = $conf['order_by_inside_category_custom'];
+}
 
 include(PHPWG_ROOT_PATH.'include/user.inc.php');
Index: /trunk/include/config_default.inc.php
===================================================================
--- /trunk/include/config_default.inc.php	(revision 11586)
+++ /trunk/include/config_default.inc.php	(revision 11587)
@@ -44,33 +44,13 @@
 // +-----------------------------------------------------------------------+
 
-// order_by : how to change the order of display for images in a category ?
-//
-// There are several fields that can order the display :
-//
-//  - date_available : the date of the adding to the gallery
-//  - file : the name of the file
-//  - id : element identifier
-//  - date_creation : date of element creation
-//
-// Once you've chosen which field(s) to use for ordering, you must chose the
-// ascending or descending order for each field.  examples :
-//
-// 1. $conf['order_by'] = " order by date_available desc, file asc";
-//    will order pictures by date_available descending & by filename ascending
-//
-// 2. $conf['order_by'] = " order by file asc";
-//    will only order pictures by file ascending without taking into account
-//    the date_available
-$conf['order_by'] = ' ORDER BY date_available DESC, file ASC, id ASC';
+// order_by_custom and order_by_inside_category_custom : for non common pattern
+// you can define special ORDER configuration
+//
+// $conf['order_by_custom'] = ' ORDER BY date_available DESC, file ASC, id ASC';
 
 // order_by_inside_category : inside a category, images can also be ordered
 // by rank. A manually defined rank on each image for the category.
 //
-// In addition to fields of #images table, you can use the
-// #image_category.rank column
-//
-// $conf['order_by_inside_category'] = ' ORDER BY rank';
-// will sort images by the manually defined rank of images in this album.
-$conf['order_by_inside_category'] = $conf['order_by'];
+// $conf['order_by_inside_category_custom'] = $conf['order_by_custom'];
 
 // file_ext : file extensions (case sensitive) authorized
Index: /trunk/install/config.sql
===================================================================
--- /trunk/install/config.sql	(revision 11586)
+++ /trunk/install/config.sql	(revision 11587)
@@ -53,6 +53,6 @@
 INSERT INTO piwigo_config (param,value,comment) VALUES ('week_starts_on','monday','Monday may not be the first day of the week');
 INSERT INTO piwigo_config (param,value,comment) VALUES ('updates_ignored','a:3:{s:7:"plugins";a:0:{}s:6:"themes";a:0:{}s:9:"languages";a:0:{}}','Extensions ignored for update');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('order_by',' ORDER BY date_available DESC, file ASC, id ASC','default photo order');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('order_by_inside_category',' ORDER BY date_available DESC, file ASC, id ASC','default photo order inside category');
+INSERT INTO piwigo_config (param,value,comment) VALUES ('order_by','ORDER BY date_available DESC, file ASC, id ASC','default photo order');
+INSERT INTO piwigo_config (param,value,comment) VALUES ('order_by_inside_category','ORDER BY date_available DESC, file ASC, id ASC','default photo order inside category');
 INSERT INTO piwigo_config (param,value) VALUES ('upload_form_websize_resize','true');
 INSERT INTO piwigo_config (param,value) VALUES ('upload_form_websize_maxwidth','800');
Index: /trunk/install/db/108-database.php
===================================================================
--- /trunk/install/db/108-database.php	(revision 11587)
+++ /trunk/install/db/108-database.php	(revision 11587)
@@ -0,0 +1,127 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based photo gallery                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2011 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+if (!defined('PHPWG_ROOT_PATH'))
+{
+  die('Hacking attempt!');
+}
+
+$upgrade_description = 'add order parameters to bdd #2';
+
+$order_regex = '#^(( *)(id|file|name|date_available|date_creation|hit|average_rate|comment|author|filesize|width|height|high_filesize|high_width|high_height|rank) (ASC|DESC),{1}){1,}$#';
+
+// local file is writable
+if ( is_writable($local_file = PHPWG_ROOT_PATH. 'local/config/config.inc.php') )
+{
+  $order_by = str_ireplace(
+    array('order by ', 'asc', 'desc'),
+    array(null, 'ASC', 'DESC'),
+    trim($conf['order_by_inside_category'])
+    );
+    
+  // for a simple patern
+  if ( preg_match($order_regex, $order_by.',') )
+  {
+    $order_by = 'ORDER BY '.$order_by;
+    // update database
+    $query = '
+    UPDATE '.PREFIX_TABLE.'config
+      SET value = \''.preg_replace('# rank (ASC|DESC)(,?)#', null, $order_by).'\'
+      WHERE param = \'order_by\'
+    ;';
+    pwg_query($query);
+    $query = '
+    UPDATE '.PREFIX_TABLE.'config
+      SET value = \''.$order_by.'\'
+      WHERE param = \'order_by_inside_category\'
+    ';
+    pwg_query($query);
+    
+    // update local file (delete lines)
+    $local_config = file($local_file);
+    $new_local_config = array();
+    foreach ($local_config as $line)
+    {
+      if (strpos($line, 'order_by') === false)
+      {
+        $new_local_config[] = $line;
+      }
+    }
+    var_dump($new_local_config);
+    file_put_contents(
+      $local_file,
+      implode("", $new_local_config)
+      );
+  }
+  // for a complex patern
+  else
+  {
+    // update database with default param
+    $query = '
+    UPDATE '.PREFIX_TABLE.'config
+      SET value = \'ORDER BY date_available DESC, file ASC, id ASC\'
+      WHERE param = \'order_by\'
+    ;';
+    pwg_query($query);
+    $query = '
+    UPDATE '.PREFIX_TABLE.'config
+      SET value = \'ORDER BY date_available DESC, file ASC, id ASC\'
+      WHERE param = \'order_by_inside_category\'
+    ';
+    pwg_query($query);
+    
+    // update local file (rename lines)
+    $local_config = file_get_contents($local_file);
+    $new_local_config = str_replace(
+      array("['order_by']", "['order_by_inside_category']"),
+      array("['order_by_custom']", "['order_by_inside_category_custom']"),
+      $local_config
+      );
+    file_put_contents($local_file, $new_local_config);
+  }
+  
+}
+// local file is locked
+else
+{
+  // update database with default param
+  $query = '
+  UPDATE '.PREFIX_TABLE.'config
+    SET value = \'ORDER BY date_available DESC, file ASC, id ASC\'
+    WHERE param = \'order_by\'
+  ;';
+  pwg_query($query);
+  $query = '
+  UPDATE '.PREFIX_TABLE.'config
+    SET value = \'ORDER BY date_available DESC, file ASC, id ASC\'
+    WHERE param = \'order_by_inside_category\'
+  ';
+  pwg_query($query);
+}
+
+echo
+"\n"
+. $upgrade_description
+."\n"
+;
+?>
Index: /trunk/language/cs_CZ/admin.lang.php
===================================================================
--- /trunk/language/cs_CZ/admin.lang.php	(revision 11586)
+++ /trunk/language/cs_CZ/admin.lang.php	(revision 11587)
@@ -794,12 +794,8 @@
 $lang['Type in a search term'] = 'Zadejte hledaný výraz';
 $lang['Activate icon "new" next to albums and pictures'] = 'Aktivovat ikonu "nové" vedle alb a obrázků';
-$lang['As default order'] = 'Jako výchozí pořadí';
 $lang['Compact'] = 'Kompaktní';
 $lang['Complete'] = 'Kompletní';
-$lang['Custom'] = 'Běžný';
 $lang['Deactivate all'] = 'Deaktivovat vše';
 $lang['Default photos order'] = 'Výchozí pořadí fotografií';
-$lang['Default photos order inside album'] = 'Výchozí pořadí fotografií uvnitř album';
-$lang['Invalid order string'] = 'Neplatný řetězec výběru';
 $lang['Restore'] = 'Obnovit';
 $lang['Restore default configuration. You will lost your plugin settings!'] = 'Obnovit výchozí konfiguraci. Přijdete o nastavení v pluginech!';
Index: /trunk/language/en_UK/admin.lang.php
===================================================================
--- /trunk/language/en_UK/admin.lang.php	(revision 11586)
+++ /trunk/language/en_UK/admin.lang.php	(revision 11587)
@@ -152,5 +152,4 @@
 $lang['Are you sure you want to delete this plugin?'] = "Are you sure you want to delete this plugin?";
 $lang['Are you sure you want to install this plugin?'] = "Are you sure you want to install this plugin?";
-$lang['As default order'] = "As default order";
 $lang['Associate to album'] = "Associate to album";
 $lang['associate to group'] = "associate to group";
@@ -205,5 +204,4 @@
 $lang['created'] = "created";
 $lang['Current name'] = "Current name";
-$lang['Custom'] = "Custom";
 $lang['Database synchronization with files'] = "Database synchronization with files";
 $lang['Database'] = "Database";
@@ -214,5 +212,4 @@
 $lang['Default display'] = "Default display";
 $lang['Default photos order'] = "Default photos order";
-$lang['Default photos order inside album'] = "Default photos order inside album";
 $lang['Default user cannot be deleted'] = "Default user cannot be deleted";
 $lang['Default user does not exist'] = "The default user does not exist";
@@ -364,5 +361,4 @@
 $lang['Installed Themes'] = "Installed Themes";
 $lang['Instructions to use Piwigo'] = "Instructions to use Piwigo";
-$lang['Invalid order string'] = 'Invalid order string';
 $lang['Invert'] = 'Invert';
 $lang['IP'] = "IP";
@@ -775,5 +771,7 @@
 $lang['You cannot delete your account'] = "You cannot delete your account";
 $lang['You cannot move an album in its own sub album'] = "You cannot move an album in its own sub album";
+$lang['You can\'t define a default photo order because you have a custom setting in your local configuration.'] = 'You can\'t define a default photo order because you have a custom setting in your local configuration.';
 $lang['You have %d orphan tags: %s.'] = 'You have %d orphan tags: %s.';
+$lang['You have specified <i>$conf[\'order_by\']</i> in your local configuration file, this parameter in deprecated, please remove it or rename it into <i>$conf[\'order_by_custom\']</i> !'] = 'You have specified <i>$conf[\'order_by\']</i> in your local configuration file, this parameter in deprecated, please remove it or rename it into <i>$conf[\'order_by_custom\']</i> !';
 $lang['You have subscribed to receiving notifications by mail.'] = "You have subscribed to receive notifications by mail.";
 $lang['You have unsubscribed from receiving notifications by mail.'] = "You have unsubscribed from being notified by mail.";
Index: /trunk/language/fr_FR/admin.lang.php
===================================================================
--- /trunk/language/fr_FR/admin.lang.php	(revision 11586)
+++ /trunk/language/fr_FR/admin.lang.php	(revision 11587)
@@ -849,8 +849,7 @@
 $lang['new'] = 'nouveau';
 $lang['Default photos order'] = "Ordre par défaut des photos";
-$lang['Default photos order inside album'] = "Ordre par défaut des photos dans un album";
-$lang['Invalid order string'] = 'Chaîne SQL incorrecte';
-$lang['As default order'] = "Comme l'ordre par défaut";
-$lang['Custom'] = "Personnalisé";
 $lang['Activate icon "new" next to albums and pictures'] = 'Afficher l\'icône "nouveau" à côté des albums et des photos';
+$lang['You can\'t define a default photo order because you have a custom setting in your local configuration.'] = 'Vous ne pouvez définir l\'ordre par défaut des photos car vous avez un paramètre personnalisé dans votre configuration locale.';
+$lang['You have specified <i>$conf[\'order_by\']</i> in your local configuration file, this parameter in deprecated, please remove it or rename it into <i>$conf[\'order_by_custom\']</i> !'] = 'Vous avez spécifié <i>$conf[\'order_by\']</i> dans votre fichier de configuration, ce paramètre est obsolète, veuillez le supprimer ou le renommer en <i>$conf[\'order_by_custom\']</i> !';
+
 ?>
Index: /trunk/language/he_IL/admin.lang.php
===================================================================
--- /trunk/language/he_IL/admin.lang.php	(revision 11586)
+++ /trunk/language/he_IL/admin.lang.php	(revision 11587)
@@ -804,12 +804,8 @@
 $lang['Graphics Library'] = 'ספריית גרפיקה';
 $lang['Activate icon "new" next to albums and pictures'] = 'הפעל כפתו "חדש" ליד אלבומים';
-$lang['As default order'] = 'כסדר ברירת מחדל';
 $lang['Compact'] = 'קומפקטי';
 $lang['Complete'] = 'סיים';
-$lang['Custom'] = 'מותאם אישית';
 $lang['Deactivate all'] = 'בטל פעולה להכל';
 $lang['Default photos order'] = 'סדר ברירת מחדל לתמונות';
-$lang['Default photos order inside album'] = 'סדר ברירת מחדל לתמונות באלבום';
-$lang['Invalid order string'] = 'מחרוזת סדר לא חוקית';
 $lang['Restore'] = 'שחזר';
 $lang['Restore default configuration. You will lost your plugin settings!'] = 'שחזר להגדרות ברירת מחדל. הגדרות ההתקן יאבדו!';
Index: /trunk/language/it_IT/admin.lang.php
===================================================================
--- /trunk/language/it_IT/admin.lang.php	(revision 11586)
+++ /trunk/language/it_IT/admin.lang.php	(revision 11587)
@@ -849,8 +849,4 @@
 $lang['new'] = 'nuovo';
 $lang['Default photos order'] = 'Ordinamento di default delle foto';
-$lang['Default photos order inside album'] = 'Ordinamento di default delle foto in un album';
-$lang['Invalid order string'] = 'Stringa SQL non corretta';
-$lang['As default order'] = 'Come ordinamento di default';
-$lang['Custom'] = 'Personalizzare';
 $lang['Activate icon "new" next to albums and pictures'] = 'Visualizzare l\'icona "nuovo" a fianco degli album e delle foto';
 ?>
Index: /trunk/language/ja_JP/admin.lang.php
===================================================================
--- /trunk/language/ja_JP/admin.lang.php	(revision 11586)
+++ /trunk/language/ja_JP/admin.lang.php	(revision 11587)
@@ -727,9 +727,6 @@
 $lang['Complete'] = '完了';
 $lang['Activate icon "new" next to albums and pictures'] = 'アルバムと写真のとなりに、\'起動アイコン　"新" があります';
-$lang['As default order'] = 'デフォルト順として';
-$lang['Custom'] = 'カスタム';
 $lang['Deactivate all'] = '全て非活性する';
 $lang['Default photos order'] = 'デフォルト写真順番';
-$lang['Default photos order inside album'] = 'デフォルト写真順はアルバム中';
 $lang['Delete orphan tags'] = '捨てられたタグを削除する';
 $lang['delete photo'] = '写真を削除する';
Index: /trunk/language/lv_LV/admin.lang.php
===================================================================
--- /trunk/language/lv_LV/admin.lang.php	(revision 11586)
+++ /trunk/language/lv_LV/admin.lang.php	(revision 11587)
@@ -791,12 +791,8 @@
 $lang['Searching...'] = 'Meklē...';
 $lang['Type in a search term'] = 'Ierakstiet meklējamo vārdu';
-$lang['As default order'] = 'Kā pēc noklusējuma';
 $lang['Compact'] = 'Kompaktēt';
 $lang['Complete'] = 'Pabeigt';
-$lang['Custom'] = 'Pielāgots';
 $lang['Deactivate all'] = 'Deaktivēt visu';
 $lang['Default photos order'] = 'Foto kārtojums pēc noklusējuma';
-$lang['Default photos order inside album'] = 'Foto kārtojums pēc noklusējuma albumā';
-$lang['Invalid order string'] = 'Kļūdaina kārtojuma rinda';
 $lang['Restore'] = 'Atjaunot';
 $lang['Restore default configuration. You will lost your plugin settings!'] = 'Atjaunot noklusējuma konfigurāciju. Jūs zaudēsit savus spraudņa iestatījumus!';
Index: /trunk/language/pl_PL/admin.lang.php
===================================================================
--- /trunk/language/pl_PL/admin.lang.php	(revision 11586)
+++ /trunk/language/pl_PL/admin.lang.php	(revision 11587)
@@ -791,12 +791,8 @@
 $lang['Type in a search term'] = 'Wpisz frazę do wyszukania';
 $lang['Activate icon "new" next to albums and pictures'] = 'Aktywuj ikonę "nowe" obok albumów i zdjęć';
-$lang['As default order'] = 'Jako sortowanie domyślne';
 $lang['Compact'] = 'Minimalne';
 $lang['Complete'] = 'Pełne';
-$lang['Custom'] = 'Własne';
 $lang['Deactivate all'] = 'Deaktywuj wszystko';
 $lang['Default photos order'] = 'Domślne sortowanie zdjęć';
-$lang['Default photos order inside album'] = 'Domyślne sortowanie zdjęć w albumie';
-$lang['Invalid order string'] = 'Niepoprawny ciąg sortowania';
 $lang['Restore'] = 'Przywróć';
 $lang['Restore default configuration. You will lost your plugin settings!'] = 'Przywróć domyślną konfigurację. Stracisz ustawienia wtyczek!';
Index: /trunk/language/ru_RU/admin.lang.php
===================================================================
--- /trunk/language/ru_RU/admin.lang.php	(revision 11586)
+++ /trunk/language/ru_RU/admin.lang.php	(revision 11587)
@@ -790,12 +790,8 @@
 $lang['display'] = 'показать';
 $lang['Activate icon "new" next to albums and pictures'] = 'Активировать иконку "new" рядом с альбомами и фотографиями';
-$lang['As default order'] = 'Порядок по умолчанию';
 $lang['Compact'] = 'Компактный';
 $lang['Complete'] = 'Полный';
-$lang['Custom'] = 'Пользовательский';
 $lang['Deactivate all'] = 'Деактивировать все';
 $lang['Default photos order'] = 'Порядок фотографий по умолчанию';
-$lang['Default photos order inside album'] = 'Порядок фотографий в альбоме по умолчанию';
-$lang['Invalid order string'] = 'Недопустимое значение сортировки';
 $lang['Restore'] = 'Восстановить';
 $lang['Restore default configuration. You will lost your plugin settings!'] = 'Восстановление конфигурации по умолчанию. Ваши настройки плагинов будут потеряны!';
Index: /trunk/language/sk_SK/admin.lang.php
===================================================================
--- /trunk/language/sk_SK/admin.lang.php	(revision 11586)
+++ /trunk/language/sk_SK/admin.lang.php	(revision 11587)
@@ -841,10 +841,5 @@
 $lang['Graphics Library'] = 'Grafická knižnica';
 $lang['Activate icon "new" next to albums and pictures'] = 'Aktivovať ikonu "new" pre ďalšie albumy a fotky'; 
-$lang['As default order'] = 'Ako predvolené zoradenie'; 
-$lang['Custom'] = 'Voliteľné'; 
 $lang['Default photos order'] = 'Predvolené zoradenie fotiek'; 
-$lang['Default photos order inside album'] = 'Predvolené zoradenie fotografií vo vnútri albumu'; 
-$lang['Invalid order string'] = 'Neplatný zoraďovací sled';
-
 
 ?>
Index: /trunk/language/sv_SE/admin.lang.php
===================================================================
--- /trunk/language/sv_SE/admin.lang.php	(revision 11586)
+++ /trunk/language/sv_SE/admin.lang.php	(revision 11587)
@@ -798,12 +798,8 @@
 $lang['Type in a search term'] = 'Ange nytt sökord';
 $lang['Activate icon "new" next to albums and pictures'] = 'Aktivera ikonen "ny" intill album och bilder';
-$lang['As default order'] = 'Standardordning';
 $lang['Compact'] = 'Kompakt';
 $lang['Complete'] = 'Komplett';
-$lang['Custom'] = 'Anpassad';
 $lang['Deactivate all'] = 'Avaktivera allt';
 $lang['Default photos order'] = 'Standardordning för bilder';
-$lang['Default photos order inside album'] = 'Standardordning för bilder i ett album';
-$lang['Invalid order string'] = 'Fel ordningssträng';
 $lang['Restore'] = 'Återställ';
 $lang['Restore default configuration. You will lost your plugin settings!'] = 'Återställ standardkonfiguration. Du kommer att förlora inställingarna för din plugins!';
Index: /trunk/language/tr_TR/admin.lang.php
===================================================================
--- /trunk/language/tr_TR/admin.lang.php	(revision 11586)
+++ /trunk/language/tr_TR/admin.lang.php	(revision 11587)
@@ -831,8 +831,5 @@
 $lang['Graphics Library'] = 'Grafik Arşivi';
 $lang['Activate icon "new" next to albums and pictures'] = 'Resimlerin yanındaki "yeni" simgesini etkinleştir';
-$lang['As default order'] = 'Varsayılan düzen olarak';
-$lang['Custom'] = 'özel';
 $lang['Default photos order'] = 'Varsayılan resim düzeni';
-$lang['Default photos order inside album'] = 'Albüm içindeki varsayılan resim düzeni';
-$lang['Invalid order string'] = 'Geçersiz düzen';
+
 ?>
