@@ -67,7 +67,7 @@ function onShowNew() {
6767
6868 function onShowEnd () {
6969 global $ app , $ conf , $ wb ;
70-
70+
7171 if ($ _SESSION ["s " ]["user " ]["typ " ] != 'admin ' && $ this ->id == 0 ) {
7272 if (!$ app ->tform ->checkClientLimit ('limit_domainmodule ' )) {
7373 $ app ->uses ('ini_parser,getconf ' );
@@ -100,7 +100,7 @@ function onShowEnd() {
100100 $ client_group_id = $ app ->functions ->intval ($ _SESSION ["s " ]["user " ]["default_group " ]);
101101 $ client = $ app ->db ->queryOneRecord ("SELECT client.client_id, client.contact_name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname, sys_group.name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ? " , $ client_group_id );
102102 $ client = $ app ->functions ->htmlentities ($ client );
103-
103+
104104 // Fill the client select field
105105 $ sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ? ORDER BY client.company_name, client.contact_name, sys_group.name " ;
106106 //die($sql);
@@ -197,7 +197,7 @@ function onAfterInsert() {
197197 global $ app , $ conf ;
198198
199199 // make sure that the record belongs to the client group and not the admin group when admin inserts it
200- // also make sure that the user can not delete domain created by a admin if client protection is enabled
200+ // also make sure that the user can not delete domain created by a admin
201201 if (($ _SESSION ["s " ]["user " ]["typ " ] == 'admin ' && isset ($ this ->dataRecord ["client_group_id " ])) || ($ _SESSION ["s " ]["user " ]["typ " ] != 'admin ' && $ app ->auth ->has_clients ($ _SESSION ['s ' ]['user ' ]['userid ' ]))) {
202202 $ client_group_id = $ app ->functions ->intval ($ this ->dataRecord ["client_group_id " ]);
203203 $ app ->db ->query ("UPDATE domain SET sys_groupid = ?, sys_perm_group = 'ru' WHERE domain_id = ? " , $ client_group_id , $ this ->id );
@@ -215,7 +215,7 @@ function onAfterUpdate() {
215215 }
216216
217217 // make sure that the record belongs to the client group and not the admin group when admin inserts it
218- // also make sure that the user can not delete domain created by a admin if client protection is enabled
218+ // also make sure that the user can not delete domain created by a admin
219219 if (isset ($ this ->dataRecord ["client_group_id " ])) {
220220 $ client_group_id = $ app ->functions ->intval ($ this ->dataRecord ["client_group_id " ]);
221221 $ app ->db ->query ("UPDATE domain SET sys_groupid = ?, sys_perm_group = 'ru' WHERE domain_id = ? " , $ client_group_id , $ this ->id );
0 commit comments