Commit aec1333f authored by horfic's avatar horfic

*) Changed remote function sites_web_domain_add to allow readonly website to be created

*) Forgot to add the entries for mailman in the main.cf of postfix
parent 07405653
......@@ -558,8 +558,10 @@ class installer_base {
'myhostname = '.$conf['hostname'],
'mydestination = '.$conf['hostname'].', localhost, localhost.localdomain',
'mynetworks = 127.0.0.0/8 [::1]/128',
'alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases',
'alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases',
'virtual_alias_domains =',
'virtual_alias_maps = proxy:mysql:'.$config_dir.'/mysql-virtual_forwardings.cf, mysql:'.$config_dir.'/mysql-virtual_email2email.cf',
'virtual_alias_maps = proxy:mysql:'.$config_dir.'/mysql-virtual_forwardings.cf, mysql:'.$config_dir.'/mysql-virtual_email2email.cf, hash:/var/lib/mailman/data/virtual-mailman',
'virtual_mailbox_domains = proxy:mysql:'.$config_dir.'/mysql-virtual_domains.cf',
'virtual_mailbox_maps = proxy:mysql:'.$config_dir.'/mysql-virtual_mailboxes.cf',
'virtual_mailbox_base = '.$cf['vmail_mailbox_base'],
......@@ -591,7 +593,8 @@ class installer_base {
'header_checks = regexp:'.$config_dir.'/header_checks',
'mime_header_checks = regexp:'.$config_dir.'/mime_header_checks',
'nested_header_checks = regexp:'.$config_dir.'/nested_header_checks',
'body_checks = regexp:'.$config_dir.'/body_checks'
'body_checks = regexp:'.$config_dir.'/body_checks',
'owner_request_special = no'
);
//* Create the header and body check files
......
......@@ -1238,13 +1238,16 @@ class remoting {
}
//* Add a record
public function sites_web_domain_add($session_id, $client_id, $params)
public function sites_web_domain_add($session_id, $client_id, $params, $readonly = false)
{
global $app;
if(!$this->checkPerm($session_id, 'sites_web_domain_add')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$affected_rows = $this->insertQuery('../sites/form/web_domain.tform.php',$client_id,$params, 'sites:web_domain:on_after_insert');
if ($readonly === true)
$app->db->query("UPDATE web_domain SET `sys_userid` = '1' WHERE domain_id = ".$affected_rows);
return $affected_rows;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment