aboutsummaryrefslogtreecommitdiffstats
path: root/admin/configuration.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2013-11-15 15:41:11 +0000
committermistic100 <mistic@piwigo.org>2013-11-15 15:41:11 +0000
commit80d803116771269f8118916c77d02b9b142a8c1b (patch)
tree7caebfe0658bde0753e017a07224de5b81502c88 /admin/configuration.php
parent1951be5673a9e495d70c246b3cdbb381b264c596 (diff)
bug 2883: filter order_by for duplicated values
git-svn-id: http://piwigo.org/svn/trunk@25489 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/configuration.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/admin/configuration.php b/admin/configuration.php
index 4aad5f49d..4b5329139 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -152,9 +152,17 @@ if (isset($_POST['submit']))
{
if ( !empty($_POST['order_by']) )
{
+ $used = array();
foreach ($_POST['order_by'] as $i => $val)
{
- if (empty($val)) unset($_POST['order_by'][$i]);
+ if (empty($val) or isset($used[$val]))
+ {
+ unset($_POST['order_by'][$i]);
+ }
+ else
+ {
+ $used[$val] = true;
+ }
}
if ( !count($_POST['order_by']) )
{