Skip to content

Commit

Permalink
Dev: Small changes for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Feb 13, 2018
1 parent 5c5fc8f commit 9793352
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions application/controllers/admin/tokens.php
Expand Up @@ -2507,7 +2507,8 @@ protected function _renderWrappedTemplate($sAction = 'token', $aViewUrls = array
*/
protected function getSQLemailstatuscondition()
{
if (Yii::app()->request->getPost('bypassbademails') == '1') {
$request = Yii::app()->request;
if ($request->getPost('bypassbademails') == '1') {
return "emailstatus = 'OK'";
} else {
return "emailstatus <> 'OptOut'";
Expand All @@ -2521,9 +2522,9 @@ protected function getSQLremindercountcondition()
{
$condition = "";
$request = Yii::app()->request;
if ($request->getPost('maxremindercount') &&
$request->getPost('maxremindercount') != '' &&
intval($request->getPost('maxremindercount')) != 0) {
if ($request->getPost('maxremindercount')
&& $request->getPost('maxremindercount') != ''
&& intval($request->getPost('maxremindercount')) != 0) {
$condition = "remindercount < ".intval($request->getPost('maxremindercount'));
}
return $condition;
Expand All @@ -2538,9 +2539,9 @@ protected function getSQLreminderdelaycondition($bEmail)
$condition = "";
$request = Yii::app()->request;
if (!$bEmail) {
if ($request->getPost('minreminderdelay') &&
$request->getPost('minreminderdelay') != '' &&
intval($request->getPost('minreminderdelay')) != 0) {
if ($request->getPost('minreminderdelay')
&& $request->getPost('minreminderdelay') != ''
&& intval($request->getPost('minreminderdelay')) != 0) {
// Yii::app()->request->getPost('minreminderdelay') in days (86400 seconds per day)
$timeadjust = Yii::app()->getConfig("timeadjust");
$compareddate = dateShift(
Expand Down

0 comments on commit 9793352

Please sign in to comment.