@@ -190,23 +190,6 @@ function onShowEnd() {
190190 $ app ->tpl ->setVar ("domain_module " , 0 );
191191 }
192192
193- // Check wether per domain relaying is enabled or not
194- $ global_config = $ app ->getconf ->get_global_config ('mail ' );
195- if ($ global_config ['show_per_domain_relay_options ' ] == 'y ' ) {
196- $ app ->tpl ->setVar ("show_per_domain_relay_options " , 1 );
197- } else {
198- $ app ->tpl ->setVar ("show_per_domain_relay_options " , 0 );
199- }
200-
201- // Get the limits of the client
202- $ client_group_id = $ app ->functions ->intval ($ _SESSION ["s " ]["user " ]["default_group " ]);
203- $ client = $ app ->db ->queryOneRecord ("SELECT limit_relayhost FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ? " , $ client_group_id );
204- if ($ client ["limit_relayhost " ] == 'y ' || $ _SESSION ["s " ]["user " ]["typ " ] == 'admin ' ) {
205- $ app ->tpl ->setVar ("limit_relayhost " , 1 );
206- } else {
207- $ app ->tpl ->setVar ("limit_relayhost " , 0 );
208- }
209-
210193 // Get the spamfilter policys for the user
211194 $ tmp_user = $ app ->db ->queryOneRecord ("SELECT policy_id FROM spamfilter_users WHERE email = ? " , '@ ' . $ this ->dataRecord ["domain " ]);
212195 $ sql = "SELECT id, policy_name FROM spamfilter_policy WHERE " .$ app ->tform ->getAuthSQL ('r ' )." ORDER BY policy_name " ;
@@ -231,6 +214,23 @@ function onShowEnd() {
231214 $ app ->tpl ->setVar ("edit_disabled " , 0 );
232215 }
233216
217+ // Check wether per domain relaying is enabled or not
218+ $ global_config = $ app ->getconf ->get_global_config ('mail ' );
219+ if ($ global_config ['show_per_domain_relay_options ' ] == 'y ' ) {
220+ $ app ->tpl ->setVar ("show_per_domain_relay_options " , 1 );
221+ } else {
222+ $ app ->tpl ->setVar ("show_per_domain_relay_options " , 0 );
223+ }
224+
225+ // Get the limits of the client
226+ $ client_group_id = $ app ->functions ->intval ($ _SESSION ["s " ]["user " ]["default_group " ]);
227+ $ client = $ app ->db ->queryOneRecord ("SELECT limit_relayhost FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ? " , $ client_group_id );
228+ if ($ client ["limit_relayhost " ] == 'y ' || $ _SESSION ["s " ]["user " ]["typ " ] == 'admin ' ) {
229+ $ app ->tpl ->setVar ("limit_relayhost " , 1 );
230+ } else {
231+ $ app ->tpl ->setVar ("limit_relayhost " , 0 );
232+ }
233+
234234 // load relayhost-values
235235 if ($ client ["limit_relayhost " ] == 'y ' ) {
236236 $ sql = "SELECT relay_host, relay_user, relay_pass FROM mail_domain WHERE domain_id = ? " ;
0 commit comments