@@ -246,8 +246,7 @@ |
||
246 | 246 | $writer->write($html); |
247 | 247 | |
248 | 248 | $cs->registerEndScript('ReCaptcha::EventScript', 'jQuery(document).ready(function() { '.$readyscript.'; } );'); |
249 | - } |
|
250 | - else |
|
249 | + } else |
|
251 | 250 | { |
252 | 251 | $options = $this->getClientSideOptions(); |
253 | 252 | $options['callback'] = new TJavaScriptLiteral('function() { '.$readyscript.'; '.$this->getCallbackScript().'; }'); |
@@ -197,8 +197,7 @@ discard block |
||
197 | 197 | $classPath=$this->getItemRenderer(); |
198 | 198 | $template=$this->_itemTemplate; |
199 | 199 | } |
200 | - } |
|
201 | - else |
|
200 | + } else |
|
202 | 201 | { |
203 | 202 | $template=$this->_itemTemplate; |
204 | 203 | $classPath=$this->getItemRenderer(); |
@@ -214,13 +213,11 @@ discard block |
||
214 | 213 | } |
215 | 214 | if($control instanceof IDataRenderer) |
216 | 215 | $control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); |
217 | - } |
|
218 | - else if($template!==null) |
|
216 | + } else if($template!==null) |
|
219 | 217 | $template->instantiateIn($cell); |
220 | 218 | else if($itemType!==TListItemType::EditItem) |
221 | 219 | $cell->setText(' '); |
222 | - } |
|
223 | - else if($itemType===TListItemType::Header) |
|
220 | + } else if($itemType===TListItemType::Header) |
|
224 | 221 | { |
225 | 222 | if(($classPath=$this->getHeaderRenderer())!=='') |
226 | 223 | $this->initializeHeaderCell($cell,$columnIndex); |
@@ -228,8 +225,7 @@ discard block |
||
228 | 225 | $this->_headerTemplate->instantiateIn($cell); |
229 | 226 | else |
230 | 227 | $this->initializeHeaderCell($cell,$columnIndex); |
231 | - } |
|
232 | - else if($itemType===TListItemType::Footer) |
|
228 | + } else if($itemType===TListItemType::Footer) |
|
233 | 229 | { |
234 | 230 | if(($classPath=$this->getFooterRenderer())!=='') |
235 | 231 | $this->initializeFooterCell($cell,$columnIndex); |
@@ -97,8 +97,7 @@ discard block |
||
97 | 97 | $this->_cachedActiveViewIndex=-1; |
98 | 98 | if($index>=0) |
99 | 99 | $this->activateView($views->itemAt($index),true); |
100 | - } |
|
101 | - else |
|
100 | + } else |
|
102 | 101 | throw new TInvalidDataValueException('multiview_activeviewindex_invalid',$index); |
103 | 102 | } |
104 | 103 | |
@@ -153,8 +152,7 @@ discard block |
||
153 | 152 | $view->onActivate(null); |
154 | 153 | $this->onActiveViewChanged(null); |
155 | 154 | } |
156 | - } |
|
157 | - else if($v->getActive()) |
|
155 | + } else if($v->getActive()) |
|
158 | 156 | { |
159 | 157 | $v->setActive(false); |
160 | 158 | if($triggerEvent) |
@@ -232,8 +230,7 @@ discard block |
||
232 | 230 | { |
233 | 231 | $this->setActiveView($view); |
234 | 232 | return true; |
235 | - } |
|
236 | - else |
|
233 | + } else |
|
237 | 234 | throw new TInvalidDataValueException('multiview_viewid_invalid', $viewID); |
238 | 235 | case self::CMD_SWITCHVIEWINDEX: |
239 | 236 | $index=TPropertyValue::ensureInteger($param->getCommandParameter()); |
@@ -306,8 +306,7 @@ discard block |
||
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 |
||
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 |
||
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) |
@@ -73,8 +73,7 @@ discard block |
||
73 | 73 | try |
74 | 74 | { |
75 | 75 | $result=$this->getTemplateControl()->evaluateExpression($this->_condition); |
76 | - } |
|
77 | - catch(Exception $e) |
|
76 | + } catch(Exception $e) |
|
78 | 77 | { |
79 | 78 | throw new TInvalidDataValueException('conditional_condition_invalid',$this->_condition,$e->getMessage()); |
80 | 79 | } |
@@ -82,8 +81,7 @@ discard block |
||
82 | 81 | { |
83 | 82 | if($this->_trueTemplate) |
84 | 83 | $this->_trueTemplate->instantiateIn($this->getTemplateControl(),$this); |
85 | - } |
|
86 | - else if($this->_falseTemplate) |
|
84 | + } else if($this->_falseTemplate) |
|
87 | 85 | $this->_falseTemplate->instantiateIn($this->getTemplateControl(),$this); |
88 | 86 | $this->_creatingChildren=false; |
89 | 87 | } |
@@ -58,8 +58,7 @@ |
||
58 | 58 | if ($this->sourcepath === NULL) |
59 | 59 | { |
60 | 60 | $this->sourcepath = $sourcepath; |
61 | - } |
|
62 | - else |
|
61 | + } else |
|
63 | 62 | { |
64 | 63 | $this->sourcepath->append($sourcepath); |
65 | 64 | } |
@@ -924,23 +924,19 @@ discard block |
||
924 | 924 | $this->setSelectedItemIndex($item->getItemIndex()); |
925 | 925 | $this->onSelectedIndexChanged($param); |
926 | 926 | return true; |
927 | - } |
|
928 | - else if(strcasecmp($command,self::CMD_EDIT)===0) |
|
927 | + } else if(strcasecmp($command,self::CMD_EDIT)===0) |
|
929 | 928 | { |
930 | 929 | $this->onEditCommand($param); |
931 | 930 | return true; |
932 | - } |
|
933 | - else if(strcasecmp($command,self::CMD_DELETE)===0) |
|
931 | + } else if(strcasecmp($command,self::CMD_DELETE)===0) |
|
934 | 932 | { |
935 | 933 | $this->onDeleteCommand($param); |
936 | 934 | return true; |
937 | - } |
|
938 | - else if(strcasecmp($command,self::CMD_UPDATE)===0) |
|
935 | + } else if(strcasecmp($command,self::CMD_UPDATE)===0) |
|
939 | 936 | { |
940 | 937 | $this->onUpdateCommand($param); |
941 | 938 | return true; |
942 | - } |
|
943 | - else if(strcasecmp($command,self::CMD_CANCEL)===0) |
|
939 | + } else if(strcasecmp($command,self::CMD_CANCEL)===0) |
|
944 | 940 | { |
945 | 941 | $this->onCancelCommand($param); |
946 | 942 | return true; |
@@ -1078,8 +1074,7 @@ discard block |
||
1078 | 1074 | $style=$item->getStyle(); |
1079 | 1075 | $item->clearStyle(); |
1080 | 1076 | return $style; |
1081 | - } |
|
1082 | - else |
|
1077 | + } else |
|
1083 | 1078 | return null; |
1084 | 1079 | } |
1085 | 1080 | |
@@ -1141,8 +1136,7 @@ discard block |
||
1141 | 1136 | $this->onItemCreated($param); |
1142 | 1137 | $this->getControls()->add($item); |
1143 | 1138 | return $item; |
1144 | - } |
|
1145 | - else |
|
1139 | + } else |
|
1146 | 1140 | return null; |
1147 | 1141 | } |
1148 | 1142 | |
@@ -1166,8 +1160,7 @@ discard block |
||
1166 | 1160 | $item->dataBind(); |
1167 | 1161 | $this->onItemDataBound($param); |
1168 | 1162 | return $item; |
1169 | - } |
|
1170 | - else |
|
1163 | + } else |
|
1171 | 1164 | return null; |
1172 | 1165 | } |
1173 | 1166 | |
@@ -1187,8 +1180,7 @@ discard block |
||
1187 | 1180 | return array($this->getItemRenderer(),$this->_itemTemplate); |
1188 | 1181 | else |
1189 | 1182 | return $this->getAlternatingItemDisplay(); |
1190 | - } |
|
1191 | - else |
|
1183 | + } else |
|
1192 | 1184 | return array($classPath,$this->_selectedItemTemplate); |
1193 | 1185 | } |
1194 | 1186 | |
@@ -1248,15 +1240,13 @@ discard block |
||
1248 | 1240 | $item->setItemIndex($itemIndex); |
1249 | 1241 | $item->setItemType($itemType); |
1250 | 1242 | } |
1251 | - } |
|
1252 | - else if($template!==null) |
|
1243 | + } else if($template!==null) |
|
1253 | 1244 | { |
1254 | 1245 | $item=new TDataListItem; |
1255 | 1246 | $item->setItemIndex($itemIndex); |
1256 | 1247 | $item->setItemType($itemType); |
1257 | 1248 | $template->instantiateIn($item); |
1258 | - } |
|
1259 | - else |
|
1249 | + } else |
|
1260 | 1250 | $item=null; |
1261 | 1251 | |
1262 | 1252 | return $item; |
@@ -1415,8 +1405,7 @@ discard block |
||
1415 | 1405 | $items->add($this->createItemInternal($i,$itemType)); |
1416 | 1406 | } |
1417 | 1407 | $this->_footer=$this->createItemInternal(-1,TListItemType::Footer); |
1418 | - } |
|
1419 | - else |
|
1408 | + } else |
|
1420 | 1409 | $this->createEmptyContent(); |
1421 | 1410 | $this->clearChildState(); |
1422 | 1411 | } |
@@ -1481,8 +1470,7 @@ discard block |
||
1481 | 1470 | $this->applyItemStyles(); |
1482 | 1471 | $repeatInfo=$this->getRepeatInfo(); |
1483 | 1472 | $repeatInfo->renderRepeater($writer,$this); |
1484 | - } |
|
1485 | - else if($this->_emptyTemplate!==null || $this->getEmptyRenderer()!=='') |
|
1473 | + } else if($this->_emptyTemplate!==null || $this->getEmptyRenderer()!=='') |
|
1486 | 1474 | parent::render($writer); |
1487 | 1475 | } |
1488 | 1476 | } |
@@ -1725,8 +1713,7 @@ discard block |
||
1725 | 1713 | { |
1726 | 1714 | $this->raiseBubbleEvent($this,new TDataListCommandEventParameter($this,$sender,$param)); |
1727 | 1715 | return true; |
1728 | - } |
|
1729 | - else |
|
1716 | + } else |
|
1730 | 1717 | return false; |
1731 | 1718 | } |
1732 | 1719 | } |
@@ -211,8 +211,7 @@ discard block |
||
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 |
||
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 |
@@ -58,8 +58,7 @@ |
||
58 | 58 | if ($this->sourcepath === NULL) |
59 | 59 | { |
60 | 60 | $this->sourcepath = $sourcepath; |
61 | - } |
|
62 | - else |
|
61 | + } else |
|
63 | 62 | { |
64 | 63 | $this->sourcepath->append($sourcepath); |
65 | 64 | } |