@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | $tokenExpiry = date('Y-m-d H:i:s', strtotime($date)); |
103 | 103 | if($tokenExpiry > $this->defaultUserExpiry){ |
104 | 104 | $this->set(self::EXPIRY, $tokenExpiry); |
105 | - }else{ |
|
105 | + } else{ |
|
106 | 106 | $this->clear(); |
107 | 107 | } |
108 | 108 | } |
@@ -124,9 +124,9 @@ discard block |
||
124 | 124 | $days = $this->getAcknowledgeDays(); |
125 | 125 | if($days <= $max * 0.2 && $days > $max * 0.1){ |
126 | 126 | return self::LEVEL_YELLOW; |
127 | - }elseif ($days <= $max * 0.1){ |
|
127 | + } elseif ($days <= $max * 0.1){ |
|
128 | 128 | return self::LEVEL_RED; |
129 | - }else{ |
|
129 | + } else{ |
|
130 | 130 | return self::LEVEL_GREEN; |
131 | 131 | } |
132 | 132 | } |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | foreach ($this->certificates as $certificate) { |
213 | 213 | $certificate->revoke($profile); |
214 | 214 | } |
215 | - }else{ |
|
215 | + } else{ |
|
216 | 216 | $this->set(self::DEACTIVATION_TIME, '0000-00-00 00:00:00'); |
217 | 217 | } |
218 | 218 | } |
@@ -63,7 +63,7 @@ |
||
63 | 63 | public function __toString(){ |
64 | 64 | if($this->hasMessages()){ |
65 | 65 | return $this->box->__toString(); |
66 | - }else{ |
|
66 | + } else{ |
|
67 | 67 | return ''; |
68 | 68 | } |
69 | 69 | } |
@@ -206,8 +206,7 @@ |
||
206 | 206 | $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "accountstatus/"); |
207 | 207 | } elseif (strrpos($_SERVER['PHP_SELF'], "diag/")) { |
208 | 208 | $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "diag/"); |
209 | - } |
|
210 | - else { |
|
209 | + } else { |
|
211 | 210 | $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "/"); |
212 | 211 | } |
213 | 212 |
@@ -33,9 +33,9 @@ |
||
33 | 33 | protected function doCreateCommand($commandToken) { |
34 | 34 | if($commandToken == ValidateEmailAddress::COMMAND){ |
35 | 35 | return new ValidateEmailAddress($commandToken, $this->context); |
36 | - }elseif($commandToken == GetTokenEmailDetails::COMMAND) { |
|
36 | + } elseif($commandToken == GetTokenEmailDetails::COMMAND) { |
|
37 | 37 | return new GetTokenEmailDetails($commandToken, $this->context); |
38 | - }else { |
|
38 | + } else { |
|
39 | 39 | return new DefaultCommand($commandToken); |
40 | 40 | } |
41 | 41 | } |
@@ -45,12 +45,12 @@ |
||
45 | 45 | if($confirmation=='true'){ |
46 | 46 | $user->setDeactivated(true, $this->context->getProfile()); |
47 | 47 | $user->save(); |
48 | - }else{ |
|
48 | + } else{ |
|
49 | 49 | $this->storeInfoMessage("User '".$user->getUsername()."' deactivation has been canceled!"); |
50 | 50 | } |
51 | 51 | |
52 | 52 | $this->context->redirectAfterSubmit(); |
53 | - }else{ |
|
53 | + } else{ |
|
54 | 54 | //Append terms of use popup |
55 | 55 | $builder = $this->context->getBuilder(); |
56 | 56 | $dialogTitle = _('Deactivate User'); |
@@ -49,12 +49,12 @@ discard block |
||
49 | 49 | if(isset($this->groups [$name])){ |
50 | 50 | $group = $this->groups [$name]; |
51 | 51 | $group->addElement($element); |
52 | - }else if(isset($this->blocks[$name])){ |
|
52 | + } else if(isset($this->blocks[$name])){ |
|
53 | 53 | $group = new PageElementGroup(); |
54 | 54 | $group->addElement($this->blocks[$name]); |
55 | 55 | $this->blocks[$name] = $this->groups[$name] = $group; |
56 | 56 | $group->addElement($element); |
57 | - }else{ |
|
57 | + } else{ |
|
58 | 58 | $this->assign($name, $element); |
59 | 59 | } |
60 | 60 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | public function fetch($name){ |
102 | 102 | if(isset($this->blocks[$name])){ |
103 | 103 | return $this->blocks[$name]; |
104 | - }else{ |
|
104 | + } else{ |
|
105 | 105 | return $this->nullElement; |
106 | 106 | } |
107 | 107 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $innerString = $this->composeInnerString(); |
41 | 41 | if(!empty($innerString)){ |
42 | 42 | $tagString = "\n".$this->tab."<" . $this->name . $attributeString . ">" . $innerString . "</" . $this->name . ">"; |
43 | - }else{ |
|
43 | + } else{ |
|
44 | 44 | $tagString = "\n".$this->tab."<" . $this->name . $attributeString . "></" . $this->name . ">"; |
45 | 45 | } |
46 | 46 | return $tagString; |
@@ -19,7 +19,7 @@ |
||
19 | 19 | public function send(){ |
20 | 20 | if($this->Subject && $this->Body && count($this->to)>0){ |
21 | 21 | return true; |
22 | - }else{ |
|
22 | + } else{ |
|
23 | 23 | $this->ErrorInfo = "Missing subject, body or email address!"; |
24 | 24 | return false; |
25 | 25 | } |
@@ -92,14 +92,14 @@ discard block |
||
92 | 92 | $user = new SilverbulletUser($this->profile->identifier, $username); |
93 | 93 | if(empty($username)){ |
94 | 94 | $command->storeErrorMessage(_('User name should not be empty!')); |
95 | - }elseif(empty($expiry)){ |
|
95 | + } elseif(empty($expiry)){ |
|
96 | 96 | $command->storeErrorMessage(_('No expiry date has been provided!')); |
97 | - }else{ |
|
97 | + } else{ |
|
98 | 98 | $user->setExpiry($expiry); |
99 | 99 | $user->save(); |
100 | 100 | if(empty($user->get(SilverbulletUser::EXPIRY))){ |
101 | 101 | $command->storeErrorMessage(sprintf(_("Expiry date was incorect for '%s'!"), $username)); |
102 | - }elseif(empty($user->getIdentifier())){ |
|
102 | + } elseif(empty($user->getIdentifier())){ |
|
103 | 103 | $command->storeErrorMessage(sprintf(_("Username '%s' already exist!"), $username)); |
104 | 104 | } |
105 | 105 | } |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | foreach ($this->users as $user) { |
147 | 147 | if($user->hasActiveCertificates()){ |
148 | 148 | $count[self::STATS_ACTIVE]++; |
149 | - }else{ |
|
149 | + } else{ |
|
150 | 150 | $count[self::STATS_PASSIVE]++; |
151 | 151 | } |
152 | 152 | } |