From aec1333faab59d5de487ecee0da059449e9c21fd Mon Sep 17 00:00:00 2001
From: horfic <horfic@ispconfig3>
Date: Mon, 10 Jan 2011 08:29:51 -0500
Subject: [PATCH] *) 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
---
interface/lib/classes/remoting.inc.php | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php
index 875eaff..5167716 100644
--- a/interface/lib/classes/remoting.inc.php
+++ b/interface/lib/classes/remoting.inc.php
@@ -1238,13 +1238,16 @@
}
//* 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;
}
--
Gitblit v1.9.1