@@ -107,7 +107,9 @@ public function run($args)
107107 if ($ didUse ->idUser ->email_did == 1 ) {
108108 $ mail ->send ();
109109 }
110- $ sendAdmin = $ this ->config ['global ' ]['admin_received_email ' ] == 1 ? $ mail ->send ($ this ->config ['global ' ]['admin_email ' ]) : null ;
110+ if ($ this ->config ['global ' ]['admin_received_email ' ] == 1 ) {
111+ $ mail ->send ($ this ->config ['global ' ]['admin_email ' ]);
112+ }
111113 } else {
112114 $ description = Yii::t ('zii ' , 'Monthly payment DID ' ) . ' ' . $ didUse ->idDid ->did ;
113115
@@ -131,7 +133,9 @@ public function run($args)
131133 if ($ didUse ->idUser ->email_did == 1 ) {
132134 $ mail ->send ();
133135 }
134- $ sendAdmin = $ this ->config ['global ' ]['admin_received_email ' ] == 1 ? $ mail ->send ($ this ->config ['global ' ]['admin_email ' ]) : null ;
136+ if ($ this ->config ['global ' ]['admin_received_email ' ] == 1 ) {
137+ $ mail ->send ($ this ->config ['global ' ]['admin_email ' ]);
138+ }
135139 }
136140 } else {
137141 //just notify the client about the due date
@@ -168,7 +172,9 @@ public function run($args)
168172 $ mail ->send ();
169173 }
170174
171- $ sendAdmin = $ this ->config ['global ' ]['admin_received_email ' ] == 1 ? $ mail ->send ($ this ->config ['global ' ]['admin_email ' ]) : null ;
175+ if ($ this ->config ['global ' ]['admin_received_email ' ] == 1 ) {
176+ $ mail ->send ($ this ->config ['global ' ]['admin_email ' ]);
177+ }
172178 }
173179 } else {
174180 if ($ user_credit >= $ didUse ->idDid ->fixrate ) {
@@ -190,7 +196,9 @@ public function run($args)
190196 if ($ didUse ->idUser ->email_did == 1 ) {
191197 $ mail ->send ();
192198 }
193- $ sendAdmin = $ this ->config ['global ' ]['admin_received_email ' ] == 1 ? $ mail ->send ($ this ->config ['global ' ]['admin_email ' ]) : null ;
199+ if ($ this ->config ['global ' ]['admin_received_email ' ] == 1 ) {
200+ $ mail ->send ($ this ->config ['global ' ]['admin_email ' ]);
201+ }
194202 } else {
195203 $ description = Yii::t ('zii ' , 'Monthly payment DID ' ) . ' ' . $ didUse ->idDid ->did ;
196204
@@ -214,7 +222,9 @@ public function run($args)
214222 if ($ didUse ->idUser ->email_did == 1 ) {
215223 $ mail ->send ();
216224 }
217- $ sendAdmin = $ this ->config ['global ' ]['admin_received_email ' ] == 1 ? $ mail ->send ($ this ->config ['global ' ]['admin_email ' ]) : null ;
225+ if ($ this ->config ['global ' ]['admin_received_email ' ] == 1 ) {
226+ $ mail ->send ($ this ->config ['global ' ]['admin_email ' ]);
227+ }
218228 }
219229 } else {
220230 $ log = $ this ->debug >= 1 ? MagnusLog::writeLog (LOGFILE , ' line: ' . __LINE__ . " RELEASE THE DID " . $ didUse ->idDid ->did . " ON THE USER " . $ didUse ->idUser ->username . " " ) : null ;
@@ -253,8 +263,9 @@ public function run($args)
253263 if ($ didUse ->idUser ->email_did == 1 ) {
254264 $ mail ->send ();
255265 }
256- $ mail ->send ($ this ->config ['global ' ]['admin_email ' ]);
257- $ sendAdmin = $ this ->config ['global ' ]['admin_received_email ' ] == 1 ? $ mail ->send ($ this ->config ['global ' ]['admin_email ' ]) : null ;
266+ if ($ this ->config ['global ' ]['admin_received_email ' ] == 1 ) {
267+ $ mail ->send ($ this ->config ['global ' ]['admin_email ' ]);
268+ }
258269 }
259270 }
260271 } else {
0 commit comments