aboutsummaryrefslogtreecommitdiffstats
path: root/admin/configuration.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-05-14 13:39:00 +0000
committerplegall <plg@piwigo.org>2005-05-14 13:39:00 +0000
commitb15c91743dcf2ee0ad1717f8bd0fce6aa1969c81 (patch)
tree2c05a2f64a09148ed7388eb81872c63805ec6fee /admin/configuration.php
parent06dbb3790190144202df48f6f6265810b8d0f63d (diff)
This commit was manufactured by cvs2svn to create tag1.4.1
'release-1_4_1'. git-svn-id: http://piwigo.org/svn/tags/release-1_4_1@790 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/configuration.php')
-rw-r--r--admin/configuration.php26
1 files changed, 20 insertions, 6 deletions
diff --git a/admin/configuration.php b/admin/configuration.php
index 9b3ca801a..35e92c5b9 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -66,12 +66,8 @@ if (isset($_POST['submit']))
{
array_push($errors, $lang['conf_prefix_thumbnail_error']);
}
- // mail must be formatted as follows : name@server.com
- $pattern = '/^[\w-]+(\.[\w-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$/';
- if (!preg_match($pattern, $_POST['mail_webmaster']))
- {
- array_push($errors, $lang['conf_mail_webmaster_error']);
- }
+ // as webmaster mail address shown on the website, it can be obfuscated
+ // and no comply with normal mail address pattern
break;
}
case 'comments' :
@@ -94,6 +90,22 @@ if (isset($_POST['submit']))
{
array_push($errors, $lang['periods_error']);
}
+ // maxwidth
+ if (isset($_POST['default_maxwidth'])
+ and !empty($_POST['default_maxwidth'])
+ and (!preg_match($int_pattern, $_POST['default_maxwidth'])
+ or $_POST['default_maxwidth'] < 50))
+ {
+ array_push($errors, $lang['maxwidth_error']);
+ }
+ // maxheight
+ if (isset($_POST['default_maxheight'])
+ and !empty($_POST['default_maxheight'])
+ and (!preg_match($int_pattern, $_POST['default_maxheight'])
+ or $_POST['default_maxheight'] < 50))
+ {
+ array_push($errors, $lang['maxheight_error']);
+ }
break;
}
case 'upload' :
@@ -255,6 +267,8 @@ switch ($page['section'])
'CONF_STYLE_SELECT'=>style_select($conf['default_template'], 'default_template'),
'CONF_RECENT'=>$conf['recent_period'],
'NB_COMMENTS_PAGE'=>$conf['nb_comment_page'],
+ 'MAXWIDTH'=>$conf['default_maxwidth'],
+ 'MAXHEIGHT'=>$conf['default_maxheight'],
'EXPAND_YES'=>$expand_yes,
'EXPAND_NO'=>$expand_no,
'SHOW_COMMENTS_YES'=>$show_yes,