File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -65,13 +65,15 @@ function getClientName($dataRecord) {
6565 } elseif (isset ($ dataRecord ['parent_domain_id ' ])) {
6666 $ tmp = $ app ->db ->queryOneRecord ("SELECT sys_groupid FROM web_domain WHERE domain_id = " . $ dataRecord ['parent_domain_id ' ]);
6767 $ client_group_id = $ tmp ['sys_groupid ' ];
68- } else {
68+ } elseif ( isset ( $ dataRecord [ ' sys_groupid ' ])) {
6969 $ client_group_id = $ dataRecord ['sys_groupid ' ];
70- }
70+ } else {
71+ $ client_group_id = 0 ;
72+ }
7173 }
7274
7375 /* get the name of the client */
74- $ tmp = $ app ->db ->queryOneRecord ("SELECT name FROM sys_group WHERE groupid = " . $ client_group_id );
76+ $ tmp = $ app ->db ->queryOneRecord ("SELECT name FROM sys_group WHERE groupid = " . intval ( $ client_group_id) );
7577 $ clientName = $ tmp ['name ' ];
7678 if ($ clientName == "" ) $ clientName = 'default ' ;
7779 $ clientName = convertClientName ($ clientName );
@@ -91,9 +93,11 @@ function getClientID($dataRecord) {
9193 } elseif (isset ($ dataRecord ['parent_domain_id ' ])) {
9294 $ tmp = $ app ->db ->queryOneRecord ("SELECT sys_groupid FROM web_domain WHERE domain_id = " . $ dataRecord ['parent_domain_id ' ]);
9395 $ client_group_id = $ tmp ['sys_groupid ' ];
94- } else {
96+ } elseif ( isset ( $ dataRecord [ ' sys_groupid ' ])) {
9597 $ client_group_id = $ dataRecord ['sys_groupid ' ];
96- }
98+ } else {
99+ $ client_group_id = 0 ;
100+ }
97101 }
98102 /* get the name of the client */
99103 $ tmp = $ app ->db ->queryOneRecord ("SELECT client_id FROM sys_group WHERE groupid = " . intval ($ client_group_id ));
You can’t perform that action at this time.
0 commit comments