aboutsummaryrefslogtreecommitdiffstats
path: root/admin/configuration.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/configuration.php')
-rw-r--r--admin/configuration.php39
1 files changed, 26 insertions, 13 deletions
diff --git a/admin/configuration.php b/admin/configuration.php
index f0267ea44..f1b943cfd 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | Piwigo - a PHP based photo gallery |
// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2008-2014 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 |
// +-----------------------------------------------------------------------+
@@ -134,6 +134,10 @@ $comments_order = array(
'DESC' => l10n('Show latest comments first'),
);
+$mail_themes = array(
+ 'clear' => 'Clear',
+ 'dark' => 'Dark',
+ );
//------------------------------ verification and registration of modifications
if (isset($_POST['submit']))
@@ -148,13 +152,21 @@ 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']) )
{
- array_push($page['errors'], l10n('No order field selected'));
+ $page['errors'][] = l10n('No order field selected');
}
else
{
@@ -179,7 +191,7 @@ if (isset($_POST['submit']))
}
else
{
- array_push($page['errors'], l10n('No order field selected'));
+ $page['errors'][] = l10n('No order field selected');
}
}
@@ -207,7 +219,7 @@ if (isset($_POST['submit']))
or $_POST['nb_comment_page'] < 5
or $_POST['nb_comment_page'] > 50)
{
- array_push($page['errors'], l10n('The number of comments a page must be between 5 and 50 included.'));
+ $page['errors'][] = l10n('The number of comments a page must be between 5 and 50 included.');
}
foreach( $comments_checkboxes as $checkbox)
{
@@ -225,7 +237,7 @@ if (isset($_POST['submit']))
if (!preg_match($int_pattern, $_POST['nb_categories_page'])
or $_POST['nb_categories_page'] < 4)
{
- array_push($page['errors'], l10n('The number of albums a page must be above 4.'));
+ $page['errors'][] = l10n('The number of albums a page must be above 4.');
}
foreach( $display_checkboxes as $checkbox)
{
@@ -268,7 +280,7 @@ WHERE param = \''.$row['param'].'\'
pwg_query($query);
}
}
- array_push($page['infos'], l10n('Information data registered in database'));
+ $page['infos'][] = l10n('Information data registered in database');
}
//------------------------------------------------------ $conf reinitialization
@@ -282,10 +294,7 @@ if ('sizes' == $page['section'] and isset($_GET['action']) and 'restore_settings
pwg_query('DELETE FROM '.CONFIG_TABLE.' WHERE param = \'disabled_derivatives\'');
clear_derivative_cache();
- array_push(
- $page['infos'],
- l10n('Your configuration settings are saved')
- );
+ $page['infos'][] = l10n('Your configuration settings are saved');
}
//----------------------------------------------------- template initialization
@@ -324,7 +333,7 @@ switch ($page['section'])
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> !'));
+ $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']) )
@@ -350,6 +359,8 @@ switch ($page['section'])
'monday' => $lang['day'][1],
),
'week_starts_on_options_selected' => $conf['week_starts_on'],
+ 'mail_theme' => $conf['mail_theme'],
+ 'mail_theme_options' => $mail_themes,
'order_by' => $order_by,
'order_by_options' => $sort_fields,
)
@@ -400,7 +411,7 @@ switch ($page['section'])
{
// Reload user
$edit_user = build_user($conf['guest_id'], false);
- array_push($page['infos'], l10n('Information data registered in database'));
+ $page['infos'][] = l10n('Information data registered in database');
}
$page['errors'] = array_merge($page['errors'], $errors);
@@ -440,6 +451,8 @@ switch ($page['section'])
// when submitting the form and an error remains
if (!isset($page['sizes_loaded_in_tpl']))
{
+ $is_gd = (pwg_image::get_library()=='gd')? true : false;
+ $template->assign('is_gd', $is_gd);
$template->assign(
'sizes',
array(