@@ -156,8 +156,7 @@ |
||
156 | 156 | { |
157 | 157 | $this->raiseBubbleEvent($this,new TDataListCommandEventParameter($this,$sender,$param)); |
158 | 158 | return true; |
159 | - } |
|
160 | - else |
|
159 | + } else |
|
161 | 160 | return false; |
162 | 161 | } |
163 | 162 | } |
164 | 163 | \ No newline at end of file |
@@ -140,8 +140,7 @@ discard block |
||
140 | 140 | { |
141 | 141 | $this->renderClientControlScript($writer); |
142 | 142 | } |
143 | - } |
|
144 | - else if($this->getEnabled()) |
|
143 | + } else if($this->getEnabled()) |
|
145 | 144 | $writer->addAttribute('disabled','disabled'); |
146 | 145 | parent::addAttributesToRender($writer); |
147 | 146 | } |
@@ -227,8 +226,7 @@ discard block |
||
227 | 226 | $item->setValue($value); |
228 | 227 | if($groupField!=='') |
229 | 228 | $item->setAttribute('Group',TDataFieldAccessor::getDataFieldValue($object,$groupField)); |
230 | - } |
|
231 | - else |
|
229 | + } else |
|
232 | 230 | { |
233 | 231 | $text=$object; |
234 | 232 | $item->setValue("$key"); |
@@ -241,18 +239,15 @@ discard block |
||
241 | 239 | { |
242 | 240 | $this->setSelectedValue($this->_cachedSelectedValue); |
243 | 241 | $this->resetCachedSelections(); |
244 | - } |
|
245 | - else if($this->_cachedSelectedIndex!==-1) |
|
242 | + } else if($this->_cachedSelectedIndex!==-1) |
|
246 | 243 | { |
247 | 244 | $this->setSelectedIndex($this->_cachedSelectedIndex); |
248 | 245 | $this->resetCachedSelections(); |
249 | - } |
|
250 | - else if($this->_cachedSelectedValues!==null) |
|
246 | + } else if($this->_cachedSelectedValues!==null) |
|
251 | 247 | { |
252 | 248 | $this->setSelectedValues($this->_cachedSelectedValues); |
253 | 249 | $this->resetCachedSelections(); |
254 | - } |
|
255 | - else if($this->_cachedSelectedIndices!==null) |
|
250 | + } else if($this->_cachedSelectedIndices!==null) |
|
256 | 251 | { |
257 | 252 | $this->setSelectedIndices($this->_cachedSelectedIndices); |
258 | 253 | $this->resetCachedSelections(); |
@@ -528,8 +523,7 @@ discard block |
||
528 | 523 | } |
529 | 524 | } |
530 | 525 | $this->_cachedSelectedIndices=$indices; |
531 | - } |
|
532 | - else |
|
526 | + } else |
|
533 | 527 | throw new TNotSupportedException('listcontrol_multiselect_unsupported',get_class($this)); |
534 | 528 | |
535 | 529 | if($this->getAdapter() instanceof IListControlAdapter) |
@@ -598,8 +592,7 @@ discard block |
||
598 | 592 | { |
599 | 593 | $this->clearSelection(); |
600 | 594 | $item->setSelected(true); |
601 | - } |
|
602 | - else |
|
595 | + } else |
|
603 | 596 | $this->clearSelection(); |
604 | 597 | } |
605 | 598 | $this->_cachedSelectedValue=$value; |
@@ -645,8 +638,7 @@ discard block |
||
645 | 638 | } |
646 | 639 | } |
647 | 640 | $this->_cachedSelectedValues=$values; |
648 | - } |
|
649 | - else |
|
641 | + } else |
|
650 | 642 | throw new TNotSupportedException('listcontrol_multiselect_unsupported',get_class($this)); |
651 | 643 | |
652 | 644 | if($this->getAdapter() instanceof IListControlAdapter) |
@@ -820,8 +812,7 @@ discard block |
||
820 | 812 | } |
821 | 813 | foreach($item->getAttributes() as $name=>$value) |
822 | 814 | $writer->addAttribute($name,$value); |
823 | - } |
|
824 | - else if($previousGroup!==null) |
|
815 | + } else if($previousGroup!==null) |
|
825 | 816 | { |
826 | 817 | $writer->renderEndTag(); |
827 | 818 | $writer->writeLine(); |
@@ -868,13 +859,11 @@ discard block |
||
868 | 859 | if(eval("\$result=$expression;")===false) |
869 | 860 | throw new Exception(''); |
870 | 861 | return $result; |
871 | - } |
|
872 | - catch(Exception $e) |
|
862 | + } catch(Exception $e) |
|
873 | 863 | { |
874 | 864 | throw new TInvalidDataValueException('listcontrol_expression_invalid',get_class($this),$expression,$e->getMessage()); |
875 | 865 | } |
876 | - } |
|
877 | - else |
|
866 | + } else |
|
878 | 867 | return sprintf($formatString,$value); |
879 | 868 | } |
880 | 869 | } |
881 | 870 | \ No newline at end of file |
@@ -151,8 +151,7 @@ |
||
151 | 151 | { |
152 | 152 | $this->raiseBubbleEvent($this,new TDataGridCommandEventParameter($this,$sender,$param)); |
153 | 153 | return true; |
154 | - } |
|
155 | - else |
|
154 | + } else |
|
156 | 155 | return false; |
157 | 156 | } |
158 | 157 | } |
159 | 158 | \ No newline at end of file |
@@ -572,8 +572,7 @@ |
||
572 | 572 | $writer->addAttribute('href',$this->getNavigateUrl()); |
573 | 573 | if(($target=$this->getTarget())!=='') |
574 | 574 | $writer->addAttribute('target',$target); |
575 | - } |
|
576 | - else if($mode===THotSpotMode::Inactive) |
|
575 | + } else if($mode===THotSpotMode::Inactive) |
|
577 | 576 | $writer->addAttribute('nohref','true'); |
578 | 577 | $text=$this->getAlternateText(); |
579 | 578 | $writer->addAttribute('title',$text); |
@@ -65,8 +65,7 @@ |
||
65 | 65 | { |
66 | 66 | $item->setOwner($this->_o); |
67 | 67 | parent::insertAt($index,$item); |
68 | - } |
|
69 | - else |
|
68 | + } else |
|
70 | 69 | throw new TInvalidDataTypeException('datagridcolumncollection_datagridcolumn_required'); |
71 | 70 | } |
72 | 71 | } |
73 | 72 | \ No newline at end of file |
@@ -923,23 +923,19 @@ discard block |
||
923 | 923 | $this->setSelectedItemIndex($item->getItemIndex()); |
924 | 924 | $this->onSelectedIndexChanged($param); |
925 | 925 | return true; |
926 | - } |
|
927 | - else if(strcasecmp($command,self::CMD_EDIT)===0) |
|
926 | + } else if(strcasecmp($command,self::CMD_EDIT)===0) |
|
928 | 927 | { |
929 | 928 | $this->onEditCommand($param); |
930 | 929 | return true; |
931 | - } |
|
932 | - else if(strcasecmp($command,self::CMD_DELETE)===0) |
|
930 | + } else if(strcasecmp($command,self::CMD_DELETE)===0) |
|
933 | 931 | { |
934 | 932 | $this->onDeleteCommand($param); |
935 | 933 | return true; |
936 | - } |
|
937 | - else if(strcasecmp($command,self::CMD_UPDATE)===0) |
|
934 | + } else if(strcasecmp($command,self::CMD_UPDATE)===0) |
|
938 | 935 | { |
939 | 936 | $this->onUpdateCommand($param); |
940 | 937 | return true; |
941 | - } |
|
942 | - else if(strcasecmp($command,self::CMD_CANCEL)===0) |
|
938 | + } else if(strcasecmp($command,self::CMD_CANCEL)===0) |
|
943 | 939 | { |
944 | 940 | $this->onCancelCommand($param); |
945 | 941 | return true; |
@@ -1077,8 +1073,7 @@ discard block |
||
1077 | 1073 | $style=$item->getStyle(); |
1078 | 1074 | $item->clearStyle(); |
1079 | 1075 | return $style; |
1080 | - } |
|
1081 | - else |
|
1076 | + } else |
|
1082 | 1077 | return null; |
1083 | 1078 | } |
1084 | 1079 | |
@@ -1140,8 +1135,7 @@ discard block |
||
1140 | 1135 | $this->onItemCreated($param); |
1141 | 1136 | $this->getControls()->add($item); |
1142 | 1137 | return $item; |
1143 | - } |
|
1144 | - else |
|
1138 | + } else |
|
1145 | 1139 | return null; |
1146 | 1140 | } |
1147 | 1141 | |
@@ -1165,8 +1159,7 @@ discard block |
||
1165 | 1159 | $item->dataBind(); |
1166 | 1160 | $this->onItemDataBound($param); |
1167 | 1161 | return $item; |
1168 | - } |
|
1169 | - else |
|
1162 | + } else |
|
1170 | 1163 | return null; |
1171 | 1164 | } |
1172 | 1165 | |
@@ -1186,8 +1179,7 @@ discard block |
||
1186 | 1179 | return array($this->getItemRenderer(),$this->_itemTemplate); |
1187 | 1180 | else |
1188 | 1181 | return $this->getAlternatingItemDisplay(); |
1189 | - } |
|
1190 | - else |
|
1182 | + } else |
|
1191 | 1183 | return array($classPath,$this->_selectedItemTemplate); |
1192 | 1184 | } |
1193 | 1185 | |
@@ -1247,15 +1239,13 @@ discard block |
||
1247 | 1239 | $item->setItemIndex($itemIndex); |
1248 | 1240 | $item->setItemType($itemType); |
1249 | 1241 | } |
1250 | - } |
|
1251 | - else if($template!==null) |
|
1242 | + } else if($template!==null) |
|
1252 | 1243 | { |
1253 | 1244 | $item=new TDataListItem; |
1254 | 1245 | $item->setItemIndex($itemIndex); |
1255 | 1246 | $item->setItemType($itemType); |
1256 | 1247 | $template->instantiateIn($item); |
1257 | - } |
|
1258 | - else |
|
1248 | + } else |
|
1259 | 1249 | $item=null; |
1260 | 1250 | |
1261 | 1251 | return $item; |
@@ -1414,8 +1404,7 @@ discard block |
||
1414 | 1404 | $items->add($this->createItemInternal($i,$itemType)); |
1415 | 1405 | } |
1416 | 1406 | $this->_footer=$this->createItemInternal(-1,TListItemType::Footer); |
1417 | - } |
|
1418 | - else |
|
1407 | + } else |
|
1419 | 1408 | $this->createEmptyContent(); |
1420 | 1409 | $this->clearChildState(); |
1421 | 1410 | } |
@@ -1480,8 +1469,7 @@ discard block |
||
1480 | 1469 | $this->applyItemStyles(); |
1481 | 1470 | $repeatInfo=$this->getRepeatInfo(); |
1482 | 1471 | $repeatInfo->renderRepeater($writer,$this); |
1483 | - } |
|
1484 | - else if($this->_emptyTemplate!==null || $this->getEmptyRenderer()!=='') |
|
1472 | + } else if($this->_emptyTemplate!==null || $this->getEmptyRenderer()!=='') |
|
1485 | 1473 | parent::render($writer); |
1486 | 1474 | } |
1487 | 1475 | } |
@@ -476,8 +476,7 @@ discard block |
||
476 | 476 | $this->onItemCreated($param); |
477 | 477 | $this->getControls()->add($item); |
478 | 478 | return $item; |
479 | - } |
|
480 | - else |
|
479 | + } else |
|
481 | 480 | return null; |
482 | 481 | } |
483 | 482 | |
@@ -501,8 +500,7 @@ discard block |
||
501 | 500 | $item->dataBind(); |
502 | 501 | $this->onItemDataBound($param); |
503 | 502 | return $item; |
504 | - } |
|
505 | - else |
|
503 | + } else |
|
506 | 504 | return null; |
507 | 505 | } |
508 | 506 | |
@@ -552,15 +550,13 @@ discard block |
||
552 | 550 | $item->setItemIndex($itemIndex); |
553 | 551 | $item->setItemType($itemType); |
554 | 552 | } |
555 | - } |
|
556 | - else if($template!==null) |
|
553 | + } else if($template!==null) |
|
557 | 554 | { |
558 | 555 | $item=new TRepeaterItem; |
559 | 556 | $item->setItemIndex($itemIndex); |
560 | 557 | $item->setItemType($itemType); |
561 | 558 | $template->instantiateIn($item); |
562 | - } |
|
563 | - else |
|
559 | + } else |
|
564 | 560 | $item=null; |
565 | 561 | |
566 | 562 | return $item; |
@@ -644,8 +640,7 @@ discard block |
||
644 | 640 | $items->add($this->createItemInternal($i,$itemType,false,null)); |
645 | 641 | } |
646 | 642 | $this->_footer=$this->createItemInternal(-1,TListItemType::Footer); |
647 | - } |
|
648 | - else |
|
643 | + } else |
|
649 | 644 | $this->createEmptyContent(); |
650 | 645 | $this->clearChildState(); |
651 | 646 | } |
@@ -706,8 +701,7 @@ discard block |
||
706 | 701 | { |
707 | 702 | $this->onItemCommand($param); |
708 | 703 | return true; |
709 | - } |
|
710 | - else |
|
704 | + } else |
|
711 | 705 | return false; |
712 | 706 | } |
713 | 707 |
@@ -283,8 +283,7 @@ discard block |
||
283 | 283 | closedir($dir); |
284 | 284 | if($cacheValid) |
285 | 285 | $this->_skins=$skins; |
286 | - } |
|
287 | - else |
|
286 | + } else |
|
288 | 287 | { |
289 | 288 | $cacheValid=true; |
290 | 289 | $this->_cssFiles=$cssFiles; |
@@ -461,20 +460,16 @@ discard block |
||
461 | 460 | { |
462 | 461 | $setter='set'.$name; |
463 | 462 | $control->$setter($value); |
464 | - } |
|
465 | - else |
|
463 | + } else |
|
466 | 464 | throw new TConfigurationException('theme_property_readonly',$type,$name); |
467 | - } |
|
468 | - else |
|
465 | + } else |
|
469 | 466 | throw new TConfigurationException('theme_property_undefined',$type,$name); |
470 | - } |
|
471 | - else // complex property |
|
467 | + } else // complex property |
|
472 | 468 | $control->setSubProperty($name,$value); |
473 | 469 | } |
474 | 470 | } |
475 | 471 | return true; |
476 | - } |
|
477 | - else |
|
472 | + } else |
|
478 | 473 | return false; |
479 | 474 | } |
480 | 475 |
@@ -69,8 +69,7 @@ discard block |
||
69 | 69 | { |
70 | 70 | $fcontent = include $fname; |
71 | 71 | $this->loadFromPhp($fcontent,dirname($fname)); |
72 | - } |
|
73 | - else |
|
72 | + } else |
|
74 | 73 | { |
75 | 74 | $dom=new TXmlDocument; |
76 | 75 | $dom->loadFromFile($fname); |
@@ -217,8 +216,7 @@ discard block |
||
217 | 216 | if(isset($this->_aliases[$id])) |
218 | 217 | throw new TConfigurationException('appconfig_alias_redefined',$id); |
219 | 218 | $this->_aliases[$id]=$p; |
220 | - } |
|
221 | - else |
|
219 | + } else |
|
222 | 220 | throw new TConfigurationException('appconfig_alias_invalid'); |
223 | 221 | $this->_empty=false; |
224 | 222 | break; |
@@ -285,8 +283,7 @@ discard block |
||
285 | 283 | else |
286 | 284 | $this->_modules[$id]=array($type,$properties->toArray(),$element); |
287 | 285 | $this->_empty=false; |
288 | - } |
|
289 | - else |
|
286 | + } else |
|
290 | 287 | throw new TConfigurationException('appconfig_modules_invalid',$element->getTagName()); |
291 | 288 | } |
292 | 289 | } |
@@ -330,8 +327,7 @@ discard block |
||
330 | 327 | $element->setParent(null); |
331 | 328 | $this->_services[$id]=array($type,$properties->toArray(),$element); |
332 | 329 | $this->_empty=false; |
333 | - } |
|
334 | - else |
|
330 | + } else |
|
335 | 331 | throw new TConfigurationException('appconfig_services_invalid',$element->getTagName()); |
336 | 332 | } |
337 | 333 | } |
@@ -355,8 +351,7 @@ discard block |
||
355 | 351 | $properties['id'] = $id; |
356 | 352 | $this->_parameters[$id] = array($type,$properties); |
357 | 353 | } |
358 | - } |
|
359 | - else |
|
354 | + } else |
|
360 | 355 | { |
361 | 356 | $this->_parameters[$id] = $parameter; |
362 | 357 | } |
@@ -383,12 +378,10 @@ discard block |
||
383 | 378 | $this->_parameters[$id]=$element; |
384 | 379 | else |
385 | 380 | $this->_parameters[$id]=$value; |
386 | - } |
|
387 | - else |
|
381 | + } else |
|
388 | 382 | $this->_parameters[$id]=array($type,$properties->toArray()); |
389 | 383 | $this->_empty=false; |
390 | - } |
|
391 | - else |
|
384 | + } else |
|
392 | 385 | throw new TConfigurationException('appconfig_parameters_invalid',$element->getTagName()); |
393 | 386 | } |
394 | 387 | } |