Skip to content

Commit 613433f

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1'
2 parents ab3c7df + ab0d78d commit 613433f

File tree

5 files changed

+21
-20
lines changed

5 files changed

+21
-20
lines changed

TODO.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ Server
2626
Mail module
2727
--------------------------------------
2828

29-
- Show mail statistics in the interface. The mail statistics are stored
30-
in the database table mail_traffic and are collected by the file
31-
server/cron_daily.php
32-
-- For Courier this works but not Dovecot. Maybe the intention needs
33-
reviewed as some clients think this should be the number of emails
34-
and not the size of the emails. (I agree that size is important)
35-
lathama
3629

3730
Administration module
3831
--------------------------------------

interface/lib/classes/tform_base.inc.php

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -974,16 +974,21 @@ function validateField($field_name, $field_value, $validators) {
974974
}
975975
}
976976
case 'ISEMAIL':
977-
if(function_exists('filter_var')) {
978-
if(filter_var($field_value, FILTER_VALIDATE_EMAIL) === false) {
979-
$errmsg = $validator['errmsg'];
980-
if(isset($this->wordbook[$errmsg])) {
981-
$this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
982-
} else {
983-
$this->errorMessage .= $errmsg."<br />\r\n";
977+
if($validator['allowempty'] != 'y') $validator['allowempty'] = 'n';
978+
if($validator['allowempty'] == 'y' && $field_value == '') {
979+
//* Do nothing
980+
} else {
981+
if(function_exists('filter_var')) {
982+
if(filter_var($field_value, FILTER_VALIDATE_EMAIL) === false) {
983+
$errmsg = $validator['errmsg'];
984+
if(isset($this->wordbook[$errmsg])) {
985+
$this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
986+
} else {
987+
$this->errorMessage .= $errmsg."<br />\r\n";
988+
}
984989
}
985-
}
986-
} else $this->errorMessage .= "function filter_var missing <br />\r\n";
990+
} else $this->errorMessage .= "function filter_var missing <br />\r\n";
991+
}
987992
break;
988993
case 'ISINT':
989994
if(function_exists('filter_var') && $field_value < 2147483647) {

interface/web/client/form/client.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@
501501
'type' => 'TOLOWER')
502502
),
503503
'validators' => array (
504-
0 => array ( 'type' => 'ISEMAIL', 'errmsg'=> 'email_error_isemail'),
504+
0 => array ( 'type' => 'ISEMAIL', 'allowempty' => 'y', 'errmsg'=> 'email_error_isemail'),
505505
),
506506
'default' => '',
507507
'value' => '',

interface/web/client/form/reseller.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@
499499
'type' => 'TOLOWER')
500500
),
501501
'validators' => array (
502-
0 => array ( 'type' => 'ISEMAIL', 'errmsg'=> 'paypal_email_error_isemail'),
502+
0 => array ( 'type' => 'ISEMAIL', 'allowempty' => 'y', 'errmsg'=> 'paypal_email_error_isemail'),
503503
),
504504
'default' => '',
505505
'value' => '',

server/plugins-available/mongo_clientdb_plugin.inc.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,14 @@ class mongo_clientdb_plugin {
5252
function onInstall() {
5353
global $conf;
5454

55-
if($conf['services']['db'] == true && class_exists('MongoClient')) {
55+
/*if($conf['services']['db'] == true && class_exists('MongoClient')) {
5656
return true;
5757
} else {
5858
return false;
59-
}
59+
}*/
60+
61+
// Disable mongodb plugin in ISPConfig 3.1
62+
return false;
6063
}
6164

6265

0 commit comments

Comments
 (0)