Skip to content

Commit f08ff6d

Browse files
committed
Merge remote-tracking branch 'origin/develop' into 5374-mail-last-accessed-frontend
2 parents d576cad + 72c4f4f commit f08ff6d

File tree

205 files changed

+826
-509
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+826
-509
lines changed

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
.idea
22
/nbproject/private/
33
.phplint-cache
4+
5+
# Vim and patch specific excludes
46
*.swp
7+
*.orig
8+
*.rej
59

610
# macOS-specific things to exclude
711

@@ -50,4 +54,7 @@ Temporary Items
5054

5155
# Visual Studio code coverage results
5256
*.coverage
53-
*.coveragexml
57+
*.coveragexml
58+
59+
# Visual Studio IDE cache/options directory
60+
.vs/

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ ISPConfig is a open source project and community contributions are very welcome.
33

44
This document is under development and will be continuously improved.
55

6+
Please do not refactor existing code and do not change the signature or the behaviour of central functions or libraries. Such changes may only be made by the core development team. We have had many bad experiences with such changes affecting the stability of ISPConfig, so we no longer accept submissions containing such changes. Merge requests containing such changes will be closed and not merged.
7+
68
# Issues
79
* Before opening a new issue, use the search function to check if there isn't a bug report / feature request already.
810
* If you are reporting a bug, please share your OS and PHP (CLI) version.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
ALTER TABLE `spamfilter_policy`
2+
CHANGE `warnvirusrecip` `warnvirusrecip` VARCHAR(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT 'N',
3+
CHANGE `warnbannedrecip` `warnbannedrecip` VARCHAR(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT 'N',
4+
CHANGE `warnbadhrecip` `warnbadhrecip` VARCHAR(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT 'N';
5+
ALTER TABLE `sys_ini` CHANGE `default_logo` `default_logo` TEXT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL;
6+
ALTER TABLE `sys_ini` CHANGE `custom_logo` `custom_logo` TEXT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL;

install/sql/ispconfig3.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,9 +1533,9 @@ CREATE TABLE `spamfilter_policy` (
15331533
`addr_extension_spam` varchar(64) default NULL,
15341534
`addr_extension_banned` varchar(64) default NULL,
15351535
`addr_extension_bad_header` varchar(64) default NULL,
1536-
`warnvirusrecip` enum('N','Y') default 'N',
1537-
`warnbannedrecip` enum('N','Y') default 'N',
1538-
`warnbadhrecip` enum('N','Y') default 'N',
1536+
`warnvirusrecip` VARCHAR(1) NULL default 'N',
1537+
`warnbannedrecip` VARCHAR(1) NULL default 'N',
1538+
`warnbadhrecip` VARCHAR(1) NULL default 'N',
15391539
`newvirus_admin` varchar(64) default NULL,
15401540
`virus_admin` varchar(64) default NULL,
15411541
`banned_admin` varchar(64) default NULL,
@@ -1742,8 +1742,8 @@ CREATE TABLE `sys_group` (
17421742
CREATE TABLE `sys_ini` (
17431743
`sysini_id` int(11) unsigned NOT NULL auto_increment,
17441744
`config` longtext,
1745-
`default_logo` text NOT NULL,
1746-
`custom_logo` text NOT NULL,
1745+
`default_logo` text NULL,
1746+
`custom_logo` text NULL,
17471747
PRIMARY KEY (`sysini_id`)
17481748
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
17491749

install/tpl/system.ini.master

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,4 @@ session_timeout=0
7575
session_allow_endless=0
7676
min_password_length=8
7777
min_password_strength=3
78+
show_delete_on_forms=n

interface/lib/classes/dns_wizard.inc.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ function create(array $data)
268268
"expire" => $expire,
269269
"minimum" => $minimum,
270270
"ttl" => $ttl,
271-
"active" => 'Y',
271+
"active" => 'N', // Activated later when all DNS records are added.
272272
"xfer" => $xfer,
273273
"also_notify" => $also_notify,
274274
"update_acl" => $update_acl,
@@ -301,6 +301,9 @@ function create(array $data)
301301
}
302302
}
303303

304+
// Activate the DNS zone.
305+
$app->db->datalogUpdate('dns_soa', array('active' => 'Y'), 'id', $dns_soa_id);
306+
304307
return 'ok';
305308

306309
} else {

interface/lib/classes/ispcmail.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ public function send($recipients) {
823823
$recipname = trim(str_replace('"', '', $recipname));
824824

825825
if($rec_string != '') $rec_string .= ', ';
826-
if($recipname && !is_numeric($recipname)) $rec_string .= $recipname . '<' . $recip . '>';
826+
if($recipname && !is_numeric($recipname)) $rec_string .= '"' . $recipname . '"<' . $recip . '>';
827827
else $rec_string .= $recip;
828828
}
829829
$to = $this->_encodeHeader($rec_string, $this->mail_charset);

interface/lib/classes/tform_base.inc.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ function getHTML($record, $tab, $action = 'NEW') {
478478
if(isset($record[$key])) {
479479
$val = $record[$key];
480480
} else {
481-
$val = '';
481+
$val = $field['default'];
482482
}
483483

484484
// If Datasource is set, get the data from there
@@ -621,11 +621,7 @@ function getHTML($record, $tab, $action = 'NEW') {
621621
break;
622622

623623
default:
624-
if(isset($record[$key])) {
625-
$new_record[$key] = $app->functions->htmlentities($record[$key]);
626-
} else {
627-
$new_record[$key] = '';
628-
}
624+
$new_record[$key] = $app->functions->htmlentities($val);
629625
}
630626
}
631627
}

interface/lib/classes/tpl.inc.php

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public function newTemplate($tmplfile)
233233
public function setVar($k, $v = null, $encode = false)
234234
{
235235
global $app;
236-
236+
237237
if (is_array($k)) {
238238
foreach($k as $key => $value){
239239
$key = ($this->OPTIONS['CASELESS']) ? strtolower(trim($key)) : trim($key);
@@ -917,9 +917,17 @@ private function _fileSearch($file)
917917
$filename = basename($file);
918918
$filepath = dirname($file);
919919

920-
if(isset($_SESSION['s']['module']['name']) && isset($_SESSION['s']['theme'])) {
921-
if(is_file(ISPC_THEMES_PATH.'/'.$_SESSION['s']['theme'].'/templates/'.$_SESSION['s']['module']['name'].'/'.$filename)) {
922-
return ISPC_THEMES_PATH.'/'.$_SESSION['s']['theme'].'/templates/'.$_SESSION['s']['module']['name'].'/'.$filename;
920+
$modulename = false;
921+
922+
if(isset($_SESSION['s']['module']['name'])) {
923+
$modulename = $_SESSION['s']['module']['name'];
924+
} elseif(strpos($_SERVER['PHP_SELF'], '/login/') === 0) {
925+
$modulename = 'login';
926+
}
927+
928+
if($modulename && isset($_SESSION['s']['theme'])) {
929+
if(is_file(ISPC_THEMES_PATH.'/'.$_SESSION['s']['theme'].'/templates/'.$modulename.'/'.$filename)) {
930+
return ISPC_THEMES_PATH.'/'.$_SESSION['s']['theme'].'/templates/'.$modulename.'/'.$filename;
923931
}
924932
}
925933

@@ -1079,12 +1087,12 @@ private function _parseIf($varname, $value = null, $op = null, $namespace = null
10791087
private function _parseHook ($name)
10801088
{
10811089
global $app;
1082-
1090+
10831091
if(!$name) return false;
1084-
1092+
10851093
$module = isset($_SESSION['s']['module']['name']) ? $_SESSION['s']['module']['name'] : '';
10861094
$form = isset($app->tform->formDef['name']) ? $app->tform->formDef['name'] : '';
1087-
1095+
10881096
$events = array();
10891097
if($module) {
10901098
$events[] = $module . ':' . ($form ? $form : '') . ':' . $name;
@@ -1093,9 +1101,9 @@ private function _parseHook ($name)
10931101
$events[] = $name;
10941102
$events[] = 'on_template_content';
10951103
}
1096-
1104+
10971105
$events = array_unique($events);
1098-
1106+
10991107
for($e = 0; $e < count($events); $e++) {
11001108
$tmpresult = $app->plugin->raiseEvent($events[$e], array(
11011109
'name' => $name,
@@ -1104,10 +1112,10 @@ private function _parseHook ($name)
11041112
), true);
11051113
if(!$tmpresult) $tmpresult = '';
11061114
else $tmpresult = $this->_getData($tmpresult, false, true);
1107-
1115+
11081116
$result .= $tmpresult;
11091117
}
1110-
1118+
11111119
return $result;
11121120
}
11131121

@@ -1225,7 +1233,7 @@ private function _parseTag ($args)
12251233
$wholetag = $args[0];
12261234
$openclose = $args[1];
12271235
$tag = strtolower($args[2]);
1228-
1236+
12291237
if ($tag == 'else') return '<?php } else { ?>';
12301238
if ($tag == 'tmpl_include') return $wholetag; // ignore tmpl_include tags
12311239

@@ -1303,10 +1311,10 @@ private function _parseTag ($args)
13031311
if ($this->OPTIONS['ENABLE_PHPINCLUDE']) {
13041312
return '<?php include(\''.$file.'\'); ?>';
13051313
}
1306-
1314+
13071315
case 'hook':
13081316
return $this->_parseHook(@$var);
1309-
1317+
13101318
case 'include':
13111319
return '<?php $this->_getData($this->_fileSearch(\''.$file.'\'), 1); ?>';
13121320

interface/lib/lang/ar.lng

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,4 +180,8 @@ $wb['datalog_status_d_client'] = 'Delete client';
180180
$wb['datalog_status_i_domain'] = 'Create new domain';
181181
$wb['datalog_status_u_domain'] = 'Update domain';
182182
$wb['datalog_status_d_domain'] = 'Delete domain';
183+
$wb['datalog_status_d_web_backup'] = 'Delete website backup';
184+
$wb['datalog_status_i_dns_template'] = 'Create DNS template';
185+
$wb['datalog_status_u_dns_template'] = 'Update DNS template';
186+
$wb['datalog_status_d_dns_template'] = 'Delete DNS template';
183187
?>

0 commit comments

Comments
 (0)