Completed
Push — remove_deprecates ( 1de955 )
by Fabio
07:55
created
framework/Web/UI/WebControls/TTable.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -306,8 +306,7 @@  discard block
 block discarded – undo
306 306
 					{
307 307
 						if($index===0 && $currentSection===TTableRowSection::Header)
308 308
 							$writer->renderBeginTag('thead');
309
-					}
310
-					else
309
+					} else
311 310
 					{
312 311
 						if($currentSection===TTableRowSection::Header)
313 312
 						{
@@ -318,8 +317,7 @@  discard block
 block discarded – undo
318 317
 							else
319 318
 								$writer->renderBeginTag('tfoot');
320 319
 							$currentSection=$section;
321
-						}
322
-						else if($currentSection===TTableRowSection::Body)
320
+						} else if($currentSection===TTableRowSection::Body)
323 321
 						{
324 322
 							$writer->renderEndTag();
325 323
 							if($section===TTableRowSection::Footer)
@@ -327,16 +325,14 @@  discard block
 block discarded – undo
327 325
 							else
328 326
 								throw new TConfigurationException('table_tablesection_outoforder');
329 327
 							$currentSection=$section;
330
-						}
331
-						else // Footer
328
+						} else // Footer
332 329
 							throw new TConfigurationException('table_tablesection_outoforder');
333 330
 					}
334 331
 					$row->renderControl($writer);
335 332
 					$writer->writeLine();
336 333
 				}
337 334
 				$writer->renderEndTag();
338
-			}
339
-			else
335
+			} else
340 336
 			{
341 337
 				$writer->writeLine();
342 338
 				foreach($this->getControls() as $row)
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TEditCommandColumn.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -211,8 +211,7 @@  discard block
 block discarded – undo
211 211
 			$button=$this->createButton('Edit',$this->getEditText(),false,'');
212 212
 			$cell->getControls()->add($button);
213 213
 			$cell->registerObject('EditButton',$button);
214
-		}
215
-		else if($itemType===TListItemType::EditItem)
214
+		} else if($itemType===TListItemType::EditItem)
216 215
 		{
217 216
 			$controls=$cell->getControls();
218 217
 			$button=$this->createButton('Update',$this->getUpdateText(),$this->getCausesValidation(),$this->getValidationGroup());
@@ -222,8 +221,7 @@  discard block
 block discarded – undo
222 221
 			$button=$this->createButton('Cancel',$this->getCancelText(),false,'');
223 222
 			$controls->add($button);
224 223
 			$cell->registerObject('CancelButton',$button);
225
-		}
226
-		else
224
+		} else
227 225
 			parent::initializeCell($cell,$columnIndex,$itemType);
228 226
 	}
229 227
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TEmailAddressValidator.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,8 +70,7 @@
 block discarded – undo
70 70
 				{
71 71
 					$domain=substr($value,$pos+1);
72 72
 					return $domain===''?false:checkdnsrr($domain,'MX');
73
-				}
74
-				else
73
+				} else
75 74
 					return false;
76 75
 			}
77 76
 		}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TImageButton.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,8 +106,7 @@  discard block
 block discarded – undo
106 106
 		{
107 107
 			if($this->getEnableClientScript() && $this->needPostBackScript())
108 108
 				$this->renderClientControlScript($writer);
109
-		}
110
-		else if($this->getEnabled()) // in this case, parent will not render 'disabled'
109
+		} else if($this->getEnabled()) // in this case, parent will not render 'disabled'
111 110
 			$writer->addAttribute('disabled','disabled');
112 111
 		parent::addAttributesToRender($writer);
113 112
 	}
@@ -141,8 +140,7 @@  discard block
 block discarded – undo
141 140
 		{
142 141
 			$group=$this->getValidationGroup();
143 142
 			return $this->getPage()->getValidators($group)->getCount()>0;
144
-		}
145
-		else
143
+		} else
146 144
 			return false;
147 145
 	}
148 146
 
Please login to merge, or discard this patch.
framework/Web/UI/JuiControls/TJuiAutoComplete.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -235,14 +235,12 @@
 block discarded – undo
235 235
 			{
236 236
 				$parameter = new TJuiAutoCompleteEventParameter($this->getResponse(), $token[0]);
237 237
 				$this->onSuggest($parameter);
238
-			}
239
-			else if($token[1] === '__TJuiAutoComplete_onSuggestionSelected__')
238
+			} else if($token[1] === '__TJuiAutoComplete_onSuggestionSelected__')
240 239
 			{
241 240
 				$parameter = new TJuiAutoCompleteEventParameter($this->getResponse(), null, $token[0]);
242 241
 				$this->onSuggestionSelected($parameter);
243 242
 			}
244
-		}
245
-		else if($this->getAutoPostBack())
243
+		} else if($this->getAutoPostBack())
246 244
 			parent::raiseCallbackEvent($param);
247 245
 	}
248 246
 
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveDataList.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,8 +79,7 @@
 block discarded – undo
79 79
     if($this->getHasPreRendered()) {
80 80
       $this->renderDataList($writer);
81 81
       if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(),$writer);
82
-    }
83
-    else {
82
+    } else {
84 83
       $this->getPage()->getAdapter()->registerControlToRender($this,$writer);
85 84
     }
86 85
   }
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveFileUpload.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -223,14 +223,12 @@  discard block
 block discarded – undo
223 223
 				// this is the most secure method, file info can't be forged from client side, no matter what
224 224
 				$token = md5('TActiveFileUpload::Params::'.$this->ClientID.'::'+rand(1000*1000,9999*1000));
225 225
 				$cache->set($token, serialize($params), 5*60); // expire in 5 minutes - the callback should arrive back in seconds, actually
226
-			}
227
-		else
226
+			} else
228 227
 		if ($mgr = Prado::getApplication()->getSecurityManager())
229 228
 			{
230 229
 				// this is a less secure method, file info can be still forged from client side, but only if attacker knows the secret application key
231 230
 				$token = urlencode(base64_encode($mgr->encrypt(serialize($params))));
232
-			}
233
-		else
231
+			} else
234 232
 			throw new Exception('TActiveFileUpload needs either an application level cache or a security manager to work securely');
235 233
 
236 234
 		return $token;
@@ -244,14 +242,12 @@  discard block
 block discarded – undo
244 242
 				assert($v!='');
245 243
 				$cache->delete($token); // remove it from cache so it can't be used again and won't take up space either
246 244
 				$params = unserialize($v);
247
-			}
248
-		else
245
+			} else
249 246
 		if ($mgr = Prado::getApplication()->getSecurityManager())
250 247
 			{
251 248
 				$v = $mgr->decrypt(base64_decode(urldecode($token)));
252 249
 				$params = unserialize($v);
253
-			}
254
-		else
250
+			} else
255 251
 			throw new Exception('TActiveFileUpload needs either an application level cache or a security manager to work securely');
256 252
 
257 253
 		assert($params instanceof TActiveFileUploadCallbackParams);
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActivePager.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -127,8 +127,7 @@  discard block
 block discarded – undo
127 127
 				$button->setCssClass($this->getButtonCssClass());
128 128
 				return $button;
129 129
 			}
130
-		}
131
-		else if($buttonType===TPagerButtonType::ImageButton)
130
+		} else if($buttonType===TPagerButtonType::ImageButton)
132 131
 		{
133 132
 			$button = new TActiveImageButton;
134 133
 			$button->setImageUrl($this->getPageImageUrl($text,$commandName));
@@ -136,8 +135,7 @@  discard block
 block discarded – undo
136 135
 				$button->Visible = true;
137 136
 			else
138 137
 				$button->Visible = false;
139
-		}
140
-		else
138
+		} else
141 139
 		{
142 140
 			$button=new TActiveButton;
143 141
 			if(!$enabled)
@@ -197,8 +195,7 @@  discard block
 block discarded – undo
197 195
 			TWebControl::render($writer);
198 196
 			if($this->getActiveControl()->canUpdateClientSide())
199 197
 				$this->getPage()->getCallbackClient()->replaceContent($this,$writer);
200
-		}
201
-		else
198
+		} else
202 199
 		{
203 200
 			$this->getPage()->getAdapter()->registerControlToRender($this,$writer);
204 201
 		}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TAutoComplete.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -174,14 +174,12 @@
 block discarded – undo
174 174
 			{
175 175
 				$parameter = new TAutoCompleteEventParameter($this->getResponse(), $token[0]);
176 176
 				$this->onSuggest($parameter);
177
-			}
178
-			else if($token[1] === '__TAutoComplete_onSuggestionSelected__')
177
+			} else if($token[1] === '__TAutoComplete_onSuggestionSelected__')
179 178
 			{
180 179
 				$parameter = new TAutoCompleteEventParameter($this->getResponse(), null, $token[0]);
181 180
 				$this->onSuggestionSelected($parameter);
182 181
 			}
183
-		}
184
-		else if($this->getAutoPostBack())
182
+		} else if($this->getAutoPostBack())
185 183
 			parent::raiseCallbackEvent($param);
186 184
 	}
187 185
 
Please login to merge, or discard this patch.