Completed
Push — master ( 2c4901...f8799b )
by Fabio
10:54
created
framework/I18N/TGlobalization.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -225,10 +225,10 @@
 block discarded – undo
225 225
 				chmod($config['cache'], PRADO_CHMOD); //make it deletable
226 226
 			}
227 227
 		}
228
-        else
229
-        {
230
-            unset($config['cache']);
231
-        }
228
+		else
229
+		{
230
+			unset($config['cache']);
231
+		}
232 232
 		$this->_translation = $config;
233 233
 	}
234 234
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -208,8 +208,7 @@  discard block
 block discarded – undo
208 208
 						$config['source']);
209 209
 					chmod($config['source'], PRADO_CHMOD); //make it deletable
210 210
 				}
211
-			}
212
-			else
211
+			} else
213 212
 			{
214 213
 				throw new TConfigurationException("invalid source dir '{$config['source']}'");
215 214
 			}
@@ -224,8 +223,7 @@  discard block
 block discarded – undo
224 223
 						$config['cache']);
225 224
 				chmod($config['cache'], PRADO_CHMOD); //make it deletable
226 225
 			}
227
-		}
228
-        else
226
+		} else
229 227
         {
230 228
             unset($config['cache']);
231 229
         }
Please login to merge, or discard this patch.
framework/pradolite.php 2 patches
Indentation   +92 added lines, -92 removed lines patch added patch discarded remove patch
@@ -4169,10 +4169,10 @@  discard block
 block discarded – undo
4169 4169
 		{
4170 4170
 			$value=TPropertyValue::ensureEnum($value,'THttpSessionCookieMode');
4171 4171
 			if($value===THttpSessionCookieMode::None) 
4172
-      {
4172
+	  {
4173 4173
 				ini_set('session.use_cookies','0');
4174 4174
 			  ini_set('session.use_only_cookies','0');
4175
-      }
4175
+	  }
4176 4176
 			else if($value===THttpSessionCookieMode::Allow)
4177 4177
 			{
4178 4178
 				ini_set('session.use_cookies','1');
@@ -5854,7 +5854,7 @@  discard block
 block discarded – undo
5854 5854
 	}
5855 5855
 	public function __construct($style=null)
5856 5856
 	{
5857
-    parent::__construct();
5857
+	parent::__construct();
5858 5858
 		if($style!==null)
5859 5859
 			$this->copyFrom($style);
5860 5860
 	}
@@ -6844,77 +6844,77 @@  discard block
 block discarded – undo
6844 6844
 			throw new TConfigurationException('templatecontrol_mastercontrol_required',get_class($this));
6845 6845
 		parent::initRecursive($namingContainer);
6846 6846
 	}
6847
-        public function tryToUpdateView($arObj, $throwExceptions = false)
6848
-        {
6849
-                $objAttrs = get_class_vars(get_class($arObj));
6850
-                foreach (array_keys($objAttrs) as $key)
6851
-                {
6852
-                        try
6853
-                        {
6854
-                                if ($key != "RELATIONS")
6855
-                                {
6856
-                                        $control = $this->{$key};
6857
-                                        if ($control instanceof TTextBox)
6858
-                                                $control->Text = $arObj->{$key};
6859
-                                        elseif ($control instanceof TCheckBox)
6860
-                                                $control->Checked = (boolean) $arObj->{$key};
6861
-                                        elseif ($control instanceof TDatePicker)
6862
-                                                $control->Date = $arObj->{$key};
6863
-                                }
6864
-                                else
6865
-                                {
6866
-                                        foreach ($objAttrs["RELATIONS"] as $relKey => $relValues)
6867
-                                        {
6868
-                                                $relControl = $this->{$relKey};
6869
-                                                switch ($relValues[0])
6870
-                                                {
6871
-                                                        case TActiveRecord::BELONGS_TO:
6872
-                                                        case TActiveRecord::HAS_ONE:
6873
-                                                                $relControl->Text = $arObj->{$relKey};
6874
-                                                                break;
6875
-                                                        case TActiveRecord::HAS_MANY:
6876
-                                                                if ($relControl instanceof TListControl)
6877
-                                                                {
6878
-                                                                        $relControl->DataSource = $arObj->{$relKey};
6879
-                                                                        $relControl->dataBind();
6880
-                                                                }
6881
-                                                                break;
6882
-                                                }
6883
-                                        }
6884
-                                        break;
6885
-                                }
6886
-                        } 
6887
-                        catch (Exception $ex)
6888
-                        {
6889
-                                if ($throwExceptions)
6890
-                                        throw $ex;
6891
-                        }
6892
-                }
6893
-        }
6894
-        public function tryToUpdateAR($arObj, $throwExceptions = false)
6895
-        {
6896
-                $objAttrs = get_class_vars(get_class($arObj));
6897
-                foreach (array_keys($objAttrs) as $key)
6898
-                {
6899
-                        try
6900
-                        {
6901
-                                if ($key == "RELATIONS")
6902
-                                        break;
6903
-                                $control = $this->{$key};
6904
-                                if ($control instanceof TTextBox)
6905
-                                        $arObj->{$key} = $control->Text;
6906
-                                elseif ($control instanceof TCheckBox)
6907
-                                        $arObj->{$key} = $control->Checked;
6908
-                                elseif ($control instanceof TDatePicker)
6909
-                                        $arObj->{$key} = $control->Date;
6910
-                        } 
6911
-                        catch (Exception $ex)
6912
-                        {
6913
-                                if ($throwExceptions)
6914
-                                        throw $ex;
6915
-                        }
6916
-                }
6917
-        }
6847
+		public function tryToUpdateView($arObj, $throwExceptions = false)
6848
+		{
6849
+				$objAttrs = get_class_vars(get_class($arObj));
6850
+				foreach (array_keys($objAttrs) as $key)
6851
+				{
6852
+						try
6853
+						{
6854
+								if ($key != "RELATIONS")
6855
+								{
6856
+										$control = $this->{$key};
6857
+										if ($control instanceof TTextBox)
6858
+												$control->Text = $arObj->{$key};
6859
+										elseif ($control instanceof TCheckBox)
6860
+												$control->Checked = (boolean) $arObj->{$key};
6861
+										elseif ($control instanceof TDatePicker)
6862
+												$control->Date = $arObj->{$key};
6863
+								}
6864
+								else
6865
+								{
6866
+										foreach ($objAttrs["RELATIONS"] as $relKey => $relValues)
6867
+										{
6868
+												$relControl = $this->{$relKey};
6869
+												switch ($relValues[0])
6870
+												{
6871
+														case TActiveRecord::BELONGS_TO:
6872
+														case TActiveRecord::HAS_ONE:
6873
+																$relControl->Text = $arObj->{$relKey};
6874
+																break;
6875
+														case TActiveRecord::HAS_MANY:
6876
+																if ($relControl instanceof TListControl)
6877
+																{
6878
+																		$relControl->DataSource = $arObj->{$relKey};
6879
+																		$relControl->dataBind();
6880
+																}
6881
+																break;
6882
+												}
6883
+										}
6884
+										break;
6885
+								}
6886
+						} 
6887
+						catch (Exception $ex)
6888
+						{
6889
+								if ($throwExceptions)
6890
+										throw $ex;
6891
+						}
6892
+				}
6893
+		}
6894
+		public function tryToUpdateAR($arObj, $throwExceptions = false)
6895
+		{
6896
+				$objAttrs = get_class_vars(get_class($arObj));
6897
+				foreach (array_keys($objAttrs) as $key)
6898
+				{
6899
+						try
6900
+						{
6901
+								if ($key == "RELATIONS")
6902
+										break;
6903
+								$control = $this->{$key};
6904
+								if ($control instanceof TTextBox)
6905
+										$arObj->{$key} = $control->Text;
6906
+								elseif ($control instanceof TCheckBox)
6907
+										$arObj->{$key} = $control->Checked;
6908
+								elseif ($control instanceof TDatePicker)
6909
+										$arObj->{$key} = $control->Date;
6910
+						} 
6911
+						catch (Exception $ex)
6912
+						{
6913
+								if ($throwExceptions)
6914
+										throw $ex;
6915
+						}
6916
+				}
6917
+		}
6918 6918
 }
6919 6919
 class TForm extends TControl
6920 6920
 {
@@ -7627,13 +7627,13 @@  discard block
 block discarded – undo
7627 7627
 		Prado::using('System.Web.UI.ActiveControls.TActivePageAdapter');
7628 7628
 		Prado::using('System.Web.UI.JuiControls.TJuiControlOptions');
7629 7629
 		$this->setAdapter(new TActivePageAdapter($this));
7630
-        $callbackEventParameter = $this->getRequest()->itemAt(TPage::FIELD_CALLBACK_PARAMETER);
7631
-        if(strlen($callbackEventParameter) > 0)
7632
-            $this->_postData[TPage::FIELD_CALLBACK_PARAMETER]=TJavaScript::jsonDecode((string)$callbackEventParameter);
7633
-                if (($g=$this->getApplication()->getGlobalization(false))!==null &&
7634
-            strtoupper($enc=$g->getCharset())!='UTF-8')
7635
-                foreach ($this->_postData as $k=>$v)
7636
-                	$this->_postData[$k]=self::decodeUTF8($v, $enc);
7630
+		$callbackEventParameter = $this->getRequest()->itemAt(TPage::FIELD_CALLBACK_PARAMETER);
7631
+		if(strlen($callbackEventParameter) > 0)
7632
+			$this->_postData[TPage::FIELD_CALLBACK_PARAMETER]=TJavaScript::jsonDecode((string)$callbackEventParameter);
7633
+				if (($g=$this->getApplication()->getGlobalization(false))!==null &&
7634
+			strtoupper($enc=$g->getCharset())!='UTF-8')
7635
+				foreach ($this->_postData as $k=>$v)
7636
+					$this->_postData[$k]=self::decodeUTF8($v, $enc);
7637 7637
 		$this->onPreInit(null);
7638 7638
 		$this->initRecursive();
7639 7639
 		$this->onInitComplete(null);
@@ -9218,15 +9218,15 @@  discard block
 block discarded – undo
9218 9218
 	  $component=new ReflectionClass('TComponent');
9219 9219
 	  $behaviors=$component->getStaticProperties();
9220 9220
 	  if(!isset($behaviors['_um']))
9221
-	    return false;
9221
+		return false;
9222 9222
 	  foreach($behaviors['_um'] as $name=>$list)
9223 9223
 	  {
9224
-	    if(strtolower($class->getShortName())!==$name && !$class->isSubclassOf($name)) continue;
9225
-	    foreach($list as $param)
9226
-	    {
9227
-	      if(method_exists($param->getBehavior(),$method))
9228
-	        return true;
9229
-	    }
9224
+		if(strtolower($class->getShortName())!==$name && !$class->isSubclassOf($name)) continue;
9225
+		foreach($list as $param)
9226
+		{
9227
+		  if(method_exists($param->getBehavior(),$method))
9228
+			return true;
9229
+		}
9230 9230
 	  }
9231 9231
 	  return false;
9232 9232
 	}
@@ -10304,10 +10304,10 @@  discard block
 block discarded – undo
10304 10304
 						$config['cache']);
10305 10305
 				chmod($config['cache'], PRADO_CHMOD); 			}
10306 10306
 		}
10307
-        else
10308
-        {
10309
-            unset($config['cache']);
10310
-        }
10307
+		else
10308
+		{
10309
+			unset($config['cache']);
10310
+		}
10311 10311
 		$this->_translation = $config;
10312 10312
 	}
10313 10313
 	public function getTranslationCatalogue()
Please login to merge, or discard this patch.
Braces   +170 added lines, -335 removed lines patch added patch discarded remove patch
@@ -45,8 +45,7 @@  discard block
 block discarded – undo
45 45
 		{
46 46
 			$am=self::$_application->getAssetManager();
47 47
 			$url=$am->publishFilePath(self::getPathOfNamespace('System.'.$logoName,'.gif'));
48
-		}
49
-		else
48
+		} else
50 49
 			$url='http://pradosoft.github.io/docs/'.$logoName.'.gif';
51 50
 		return '<a title="Powered by PRADO" href="https://github.com/pradosoft/prado" target="_blank"><img src="'.$url.'" style="border-width:0px;" alt="Powered by PRADO" /></a>';
52 51
 	}
@@ -70,8 +69,7 @@  discard block
 block discarded – undo
70 69
 		if(self::$_application!==null && ($errorHandler=self::$_application->getErrorHandler())!==null)
71 70
 		{
72 71
 			$errorHandler->handleError(null,$exception);
73
-		}
74
-		else
72
+		} else
75 73
 		{
76 74
 			echo $exception;
77 75
 		}
@@ -125,8 +123,7 @@  discard block
 block discarded – undo
125 123
 					return $component;
126 124
 				break;
127 125
 			}
128
-		}
129
-		else
126
+		} else
130 127
 			return new $type;
131 128
 	}
132 129
 	public static function using($namespace,$checkClassExistence=true)
@@ -137,31 +134,27 @@  discard block
 block discarded – undo
137 134
 			try
138 135
 			{
139 136
 				include_once($namespace.self::CLASS_FILE_EXT);
140
-			}
141
-			catch(Exception $e)
137
+			} catch(Exception $e)
142 138
 			{
143 139
 				if($checkClassExistence && !class_exists($namespace,false))
144 140
 					throw new TInvalidOperationException('prado_component_unknown',$namespace,$e->getMessage());
145 141
 				else
146 142
 					throw $e;
147 143
 			}
148
-		}
149
-		else if(($path=self::getPathOfNamespace($namespace,self::CLASS_FILE_EXT))!==null)
144
+		} else if(($path=self::getPathOfNamespace($namespace,self::CLASS_FILE_EXT))!==null)
150 145
 		{
151 146
 			$className=substr($namespace,$pos+1);
152 147
 			if($className==='*')  			{
153 148
 				self::$_usings[$namespace]=$path;
154 149
 				set_include_path(get_include_path().PATH_SEPARATOR.$path);
155
-			}
156
-			else  			{
150
+			} else  			{
157 151
 				self::$_usings[$namespace]=$path;
158 152
 				if(!$checkClassExistence || !class_exists($className,false))
159 153
 				{
160 154
 					try
161 155
 					{
162 156
 						include_once($path);
163
-					}
164
-					catch(Exception $e)
157
+					} catch(Exception $e)
165 158
 					{
166 159
 						if($checkClassExistence && !class_exists($className,false))
167 160
 							throw new TInvalidOperationException('prado_component_unknown',$className,$e->getMessage());
@@ -170,8 +163,7 @@  discard block
 block discarded – undo
170 163
 					}
171 164
 				}
172 165
 			}
173
-		}
174
-		else
166
+		} else
175 167
 			throw new TInvalidDataValueException('prado_using_invalid',$namespace);
176 168
 	}
177 169
 	public static function getPathOfNamespace($namespace, $ext='')
@@ -207,8 +199,7 @@  discard block
 block discarded – undo
207 199
 				self::$_aliases[$alias]=$rp;
208 200
 			else
209 201
 				throw new TInvalidDataValueException('prado_aliasname_invalid',$alias);
210
-		}
211
-		else
202
+		} else
212 203
 			throw new TInvalidDataValueException('prado_alias_invalid',$alias,$path);
213 204
 	}
214 205
 	public static function fatalError($msg)
@@ -245,8 +236,7 @@  discard block
 block discarded – undo
245 236
 							echo "'". substr($str, 0, 70) . "...'";
246 237
 						else
247 238
 							echo "'" . $str . "'";
248
-					}
249
-					else if (is_int($item) || is_float($item))
239
+					} else if (is_int($item) || is_float($item))
250 240
 						echo $item;
251 241
 					else if (is_object($item))
252 242
 						echo get_class($item);
@@ -315,8 +305,7 @@  discard block
 block discarded – undo
315 305
 			if(isset($trace[0]['file']) && isset($trace[0]['line']))
316 306
 				$msg.=" (line {$trace[0]['line']}, {$trace[0]['file']})";
317 307
 			$level=TLogger::DEBUG;
318
-		}
319
-		else
308
+		} else
320 309
 			$level=TLogger::INFO;
321 310
 		self::log($msg,$level,$category,$ctl);
322 311
 	}
@@ -621,8 +610,7 @@  discard block
 block discarded – undo
621 610
 			echo "<body><h1>Recursive Error</h1>\n";
622 611
 			echo "<pre>".$exception->__toString()."</pre>\n";
623 612
 			echo "</body></html>";
624
-		}
625
-		else
613
+		} else
626 614
 		{
627 615
 			error_log("Error happened while processing an existing error:\n".$exception->__toString());
628 616
 			header('HTTP/1.0 500 Internal Error');
@@ -644,15 +632,13 @@  discard block
 block discarded – undo
644 632
 			if($fileName==='')
645 633
 				$fileName='---embedded template---';
646 634
 			$errorLine=$exception->getLineNumber();
647
-		}
648
-		else
635
+		} else
649 636
 		{
650 637
 			if(($trace=$this->getExactTrace($exception))!==null)
651 638
 			{
652 639
 				$fileName=$trace['file'];
653 640
 				$errorLine=$trace['line'];
654
-			}
655
-			else
641
+			} else
656 642
 			{
657 643
 				$fileName=$exception->getFile();
658 644
 				$errorLine=$exception->getLine();
@@ -711,8 +697,7 @@  discard block
 block discarded – undo
711 697
 				$result=$trace[0];
712 698
 			elseif(isset($trace[1]))
713 699
 				$result=$trace[1];
714
-		}
715
-		else if($exception instanceof TInvalidOperationException)
700
+		} else if($exception instanceof TInvalidOperationException)
716 701
 		{
717 702
 						if(($result=$this->getPropertyAccessTrace($trace,'__get'))===null)
718 703
 				$result=$this->getPropertyAccessTrace($trace,'__set');
@@ -744,8 +729,7 @@  discard block
 block discarded – undo
744 729
 			{
745 730
 				$line=htmlspecialchars(sprintf("%04d: %s",$i+1,str_replace("\t",'    ',$lines[$i])));
746 731
 				$source.="<div class=\"error\">".$line."</div>";
747
-			}
748
-			else
732
+			} else
749 733
 				$source.=htmlspecialchars(sprintf("%04d: %s",$i+1,str_replace("\t",'    ',$lines[$i])));
750 734
 		}
751 735
 		return $source;
@@ -809,11 +793,9 @@  discard block
 block discarded – undo
809 793
 			{
810 794
 				array_splice($this->_d,$index,0,array($item));
811 795
 				$this->_c++;
812
-			}
813
-			else
796
+			} else
814 797
 				throw new TInvalidDataValueException('list_index_invalid',$index);
815
-		}
816
-		else
798
+		} else
817 799
 			throw new TInvalidOperationException('list_readonly',get_class($this));
818 800
 	}
819 801
 	public function remove($item)
@@ -824,11 +806,9 @@  discard block
 block discarded – undo
824 806
 			{
825 807
 				$this->removeAt($index);
826 808
 				return $index;
827
-			}
828
-			else
809
+			} else
829 810
 				throw new TInvalidDataValueException('list_item_inexistent');
830
-		}
831
-		else
811
+		} else
832 812
 			throw new TInvalidOperationException('list_readonly',get_class($this));
833 813
 	}
834 814
 	public function removeAt($index)
@@ -846,11 +826,9 @@  discard block
 block discarded – undo
846 826
 					array_splice($this->_d,$index,1);
847 827
 					return $item;
848 828
 				}
849
-			}
850
-			else
829
+			} else
851 830
 				throw new TInvalidDataValueException('list_index_invalid',$index);
852
-		}
853
-		else
831
+		} else
854 832
 			throw new TInvalidOperationException('list_readonly',get_class($this));
855 833
 	}
856 834
 	public function clear()
@@ -877,8 +855,7 @@  discard block
 block discarded – undo
877 855
 				throw new TInvalidDataValueException('list_item_inexistent');
878 856
 			$this->insertAt($index, $item);
879 857
 			return $index;
880
-		}
881
-		else
858
+		} else
882 859
 			throw new TInvalidOperationException('list_readonly',get_class($this));
883 860
 	}
884 861
 	public function insertAfter($baseitem, $item)
@@ -889,8 +866,7 @@  discard block
 block discarded – undo
889 866
 				throw new TInvalidDataValueException('list_item_inexistent');
890 867
 			$this->insertAt($index + 1, $item);
891 868
 			return $index + 1;
892
-		}
893
-		else
869
+		} else
894 870
 			throw new TInvalidOperationException('list_readonly',get_class($this));
895 871
 	}
896 872
 	public function toArray()
@@ -905,8 +881,7 @@  discard block
 block discarded – undo
905 881
 				$this->clear();
906 882
 			foreach($data as $item)
907 883
 				$this->add($item);
908
-		}
909
-		else if($data!==null)
884
+		} else if($data!==null)
910 885
 			throw new TInvalidDataTypeException('list_data_not_iterable');
911 886
 	}
912 887
 	public function mergeWith($data)
@@ -915,8 +890,7 @@  discard block
 block discarded – undo
915 890
 		{
916 891
 			foreach($data as $item)
917 892
 				$this->add($item);
918
-		}
919
-		else if($data!==null)
893
+		} else if($data!==null)
920 894
 			throw new TInvalidDataTypeException('list_data_not_iterable');
921 895
 	}
922 896
 	public function offsetExists($offset)
@@ -1130,8 +1104,7 @@  discard block
 block discarded – undo
1130 1104
 			{
1131 1105
 				if(($this->_recursiveLevel<0 || $level<$this->_recursiveLevel) && $this->validateDirectory($path))
1132 1106
 					$timestamps=array_merge($this->generateTimestamps($path,$level+1));
1133
-			}
1134
-			else if($this->validateFile($path))
1107
+			} else if($this->validateFile($path))
1135 1108
 				$timestamps[$path]=filemtime($path);
1136 1109
 		}
1137 1110
 		closedir($dir);
@@ -1392,8 +1365,7 @@  discard block
 block discarded – undo
1392 1365
 			}
1393 1366
 			$this->removeAtIndexInPriority($p[1],$p[0]);
1394 1367
 			return $p[2];
1395
-		}
1396
-		else
1368
+		} else
1397 1369
 			throw new TInvalidDataValueException('list_item_inexistent');
1398 1370
 	}
1399 1371
 	public function removeAt($index)
@@ -1551,13 +1523,11 @@  discard block
 block discarded – undo
1551 1523
 				foreach($data->itemsAtPriority($priority) as $index=>$item)
1552 1524
 					$this->insertAtIndexInPriority($item,false,$priority);
1553 1525
 			}
1554
-		}
1555
-		else if(is_array($data)||$data instanceof Traversable)
1526
+		} else if(is_array($data)||$data instanceof Traversable)
1556 1527
 		{
1557 1528
 			foreach($data as $priority=>$item)
1558 1529
 				$this->add($item);
1559
-		}
1560
-		else if($data!==null)
1530
+		} else if($data!==null)
1561 1531
 			throw new TInvalidDataTypeException('map_data_not_iterable');
1562 1532
 	}
1563 1533
 	public function offsetExists($offset)
@@ -1648,11 +1618,9 @@  discard block
 block discarded – undo
1648 1618
 				$value=$this->_d[$key];
1649 1619
 				unset($this->_d[$key]);
1650 1620
 				return $value;
1651
-			}
1652
-			else
1621
+			} else
1653 1622
 				return null;
1654
-		}
1655
-		else
1623
+		} else
1656 1624
 			throw new TInvalidOperationException('map_readonly',get_class($this));
1657 1625
 	}
1658 1626
 	public function clear()
@@ -1676,8 +1644,7 @@  discard block
 block discarded – undo
1676 1644
 				$this->clear();
1677 1645
 			foreach($data as $key=>$value)
1678 1646
 				$this->add($key,$value);
1679
-		}
1680
-		else if($data!==null)
1647
+		} else if($data!==null)
1681 1648
 			throw new TInvalidDataTypeException('map_data_not_iterable');
1682 1649
 	}
1683 1650
 	public function mergeWith($data)
@@ -1686,8 +1653,7 @@  discard block
 block discarded – undo
1686 1653
 		{
1687 1654
 			foreach($data as $key=>$value)
1688 1655
 				$this->add($key,$value);
1689
-		}
1690
-		else if($data!==null)
1656
+		} else if($data!==null)
1691 1657
 			throw new TInvalidDataTypeException('map_data_not_iterable');
1692 1658
 	}
1693 1659
 	public function offsetExists($offset)
@@ -1861,13 +1827,11 @@  discard block
 block discarded – undo
1861 1827
 			if(!isset($this->_d[$priority])) {
1862 1828
 				$this->_d[$priority]=array($key=>$value);
1863 1829
 				$this->_o=false;
1864
-			}
1865
-			else
1830
+			} else
1866 1831
 				$this->_d[$priority][$key]=$value;
1867 1832
 			$this->_c++;
1868 1833
 			$this->_fd=null;
1869
-		}
1870
-		else
1834
+		} else
1871 1835
 			throw new TInvalidOperationException('map_readonly',get_class($this));
1872 1836
 		return $priority;
1873 1837
 	}
@@ -1895,8 +1859,7 @@  discard block
 block discarded – undo
1895 1859
 						return $value;
1896 1860
 					}
1897 1861
 				return null;
1898
-			}
1899
-			else
1862
+			} else
1900 1863
 			{
1901 1864
 				$priority=(string)round(TPropertyValue::ensureFloat($priority),$this->_p);
1902 1865
 				if(isset($this->_d[$priority])&&(isset($this->_d[$priority][$key])||array_key_exists($key,$this->_d[$priority])))
@@ -1910,12 +1873,10 @@  discard block
 block discarded – undo
1910 1873
 					}
1911 1874
 					$this->_fd=null;
1912 1875
 					return $value;
1913
-				}
1914
-				else
1876
+				} else
1915 1877
 					return null;
1916 1878
 			}
1917
-		}
1918
-		else
1879
+		} else
1919 1880
 			throw new TInvalidOperationException('map_readonly',get_class($this));
1920 1881
 	}
1921 1882
 	public function clear()
@@ -1968,15 +1929,13 @@  discard block
 block discarded – undo
1968 1929
 					$this->add($key,$value,$priority);
1969 1930
 				}
1970 1931
 			}
1971
-		}
1972
-		else if(is_array($data)||$data instanceof Traversable)
1932
+		} else if(is_array($data)||$data instanceof Traversable)
1973 1933
 		{
1974 1934
 			if($this->getCount()>0)
1975 1935
 				$this->clear();
1976 1936
 			foreach($data as $key=>$value)
1977 1937
 				$this->add($key,$value);
1978
-		}
1979
-		else if($data!==null)
1938
+		} else if($data!==null)
1980 1939
 			throw new TInvalidDataTypeException('map_data_not_iterable');
1981 1940
 	}
1982 1941
 	public function mergeWith($data)
@@ -1988,13 +1947,11 @@  discard block
 block discarded – undo
1988 1947
 				foreach($data->itemsAtPriority($priority) as $key => $value)
1989 1948
 					$this->add($key,$value,$priority);
1990 1949
 			}
1991
-		}
1992
-		else if(is_array($data)||$data instanceof Traversable)
1950
+		} else if(is_array($data)||$data instanceof Traversable)
1993 1951
 		{
1994 1952
 			foreach($data as $key=>$value)
1995 1953
 				$this->add($key,$value);
1996
-		}
1997
-		else if($data!==null)
1954
+		} else if($data!==null)
1998 1955
 			throw new TInvalidDataTypeException('map_data_not_iterable');
1999 1956
 	}
2000 1957
 	public function offsetExists($offset)
@@ -2037,8 +1994,7 @@  discard block
 block discarded – undo
2037 1994
 				$this->_d[]=$item;
2038 1995
 				++$this->_c;
2039 1996
 			}
2040
-		}
2041
-		else if($data!==null)
1997
+		} else if($data!==null)
2042 1998
 			throw new TInvalidDataTypeException('stack_data_not_iterable');
2043 1999
 	}
2044 2000
 	public function clear()
@@ -2223,13 +2179,11 @@  discard block
 block discarded – undo
2223 2179
 				$str.=$element->toString($indent+1)."\n";
2224 2180
 			$str.=$prefix."</{$this->_tagName}>";
2225 2181
 			return $str;
2226
-		}
2227
-		else if(($value=$this->getValue())!=='')
2182
+		} else if(($value=$this->getValue())!=='')
2228 2183
 		{
2229 2184
 			$value=$this->xmlEncode($value);
2230 2185
 			return $prefix."<{$this->_tagName}$attr>$value</{$this->_tagName}>";
2231
-		}
2232
-		else
2186
+		} else
2233 2187
 			return $prefix."<{$this->_tagName}$attr />";
2234 2188
 	}
2235 2189
 	public function __toString()
@@ -2326,8 +2280,7 @@  discard block
 block discarded – undo
2326 2280
 		{
2327 2281
 			fwrite($fw,$this->saveToString());
2328 2282
 			fclose($fw);
2329
-		}
2330
-		else
2283
+		} else
2331 2284
 			throw new TIOException('xmldocument_file_write_failed',$file);
2332 2285
 	}
2333 2286
 	public function saveToString()
@@ -2373,8 +2326,7 @@  discard block
 block discarded – undo
2373 2326
 			if($item->getParent()!==null)
2374 2327
 				$item->getParent()->getElements()->remove($item);
2375 2328
 			$item->setParent($this->_o);
2376
-		}
2377
-		else
2329
+		} else
2378 2330
 			throw new TInvalidDataTypeException('xmlelementlist_xmlelement_required');
2379 2331
 	}
2380 2332
 	public function removeAt($index)
@@ -2418,8 +2370,7 @@  discard block
 block discarded – undo
2418 2370
 				{
2419 2371
 					$this->_everyone=true;
2420 2372
 					break;
2421
-				}
2422
-				else if($user==='?')
2373
+				} else if($user==='?')
2423 2374
 					$this->_guest=true;
2424 2375
 				else if($user==='@')
2425 2376
 					$this->_authenticated=true;
@@ -2529,8 +2480,7 @@  discard block
 block discarded – undo
2529 2480
 					return ($decision>0);
2530 2481
 			}
2531 2482
 			return true;
2532
-		}
2533
-		else
2483
+		} else
2534 2484
 			return false;
2535 2485
 	}
2536 2486
 	public function insertAt($index,$item)
@@ -2660,8 +2610,7 @@  discard block
 block discarded – undo
2660 2610
 			if($module===false)
2661 2611
 				throw new TNotSupportedException('securitymanager_mcryptextension_initfailed');
2662 2612
 			return $module;
2663
-		}
2664
-		else
2613
+		} else
2665 2614
 			throw new TNotSupportedException('securitymanager_mcryptextension_required');
2666 2615
 	}
2667 2616
 	public function hashData($data)
@@ -2801,8 +2750,7 @@  discard block
 block discarded – undo
2801 2750
 					}
2802 2751
 				}
2803 2752
 				return '{'.$results.'}';
2804
-			}
2805
-			else
2753
+			} else
2806 2754
 			{
2807 2755
 				foreach($value as $v)
2808 2756
 				{
@@ -2815,8 +2763,7 @@  discard block
 block discarded – undo
2815 2763
 				}
2816 2764
 				return '['.$results.']';
2817 2765
 			}
2818
-		}
2819
-		else if(is_integer($value))
2766
+		} else if(is_integer($value))
2820 2767
 			return "$value";
2821 2768
 		else if(is_float($value))
2822 2769
 		{
@@ -2836,8 +2783,7 @@  discard block
 block discarded – undo
2836 2783
 						return str_replace($locale['decimal_point'], '.', "$value");
2837 2784
 					break;
2838 2785
 			}
2839
-		}
2840
-		else if(is_object($value))
2786
+		} else if(is_object($value))
2841 2787
 			if ($value instanceof TJavaScriptLiteral)
2842 2788
 				return $value->toJavaScriptLiteral();
2843 2789
 			else
@@ -2924,12 +2870,10 @@  discard block
 block discarded – undo
2924 2870
 						$name=urlencode($name.'[]');
2925 2871
 						foreach($value as $v)
2926 2872
 							$url.=$amp.$name.'='.urlencode($v);
2927
-					}
2928
-					else
2873
+					} else
2929 2874
 						$url.=$amp.urlencode($name).'='.urlencode($value);
2930 2875
 				}
2931
-			}
2932
-			else
2876
+			} else
2933 2877
 			{
2934 2878
 				foreach($getItems as $name=>$value)
2935 2879
 				{
@@ -2937,8 +2881,7 @@  discard block
 block discarded – undo
2937 2881
 					{
2938 2882
 						foreach($value as $v)
2939 2883
 							$url.=$amp.$name.'[]='.$v;
2940
-					}
2941
-					else
2884
+					} else
2942 2885
 						$url.=$amp.$name.'='.$value;
2943 2886
 				}
2944 2887
 			}
@@ -2976,14 +2919,12 @@  discard block
 block discarded – undo
2976 2919
 							$getVariables[substr($name,0,$pos)][]=$value;
2977 2920
 						else
2978 2921
 							$getVariables[$name]=$value;
2979
-					}
2980
-					else
2922
+					} else
2981 2923
 						$getVariables[$path]='';
2982 2924
 				}
2983 2925
 			}
2984 2926
 			return $getVariables;
2985
-		}
2986
-		else
2927
+		} else
2987 2928
 			return array();
2988 2929
 	}
2989 2930
 }
@@ -3067,8 +3008,7 @@  discard block
 block discarded – undo
3067 3008
 				$port=$_SERVER['SERVER_PORT'];
3068 3009
 				if(($port!=80 && !$secure) || ($port!=443 && $secure))
3069 3010
 					$url.=':'.$port;
3070
-			}
3071
-			else
3011
+			} else
3072 3012
 				$url.=$_SERVER['HTTP_HOST'];
3073 3013
 			$url.=$this->getRequestUri();
3074 3014
 			$this->_url=new TUri($url);
@@ -3138,8 +3078,7 @@  discard block
 block discarded – undo
3138 3078
 				{
3139 3079
 					$this->_urlManager=new TUrlManager;
3140 3080
 					$this->_urlManager->init(null);
3141
-				}
3142
-				else
3081
+				} else
3143 3082
 				{
3144 3083
 					$this->_urlManager=$this->getApplication()->getModule($this->_urlManagerID);
3145 3084
 					if($this->_urlManager===null)
@@ -3204,8 +3143,7 @@  discard block
 block discarded – undo
3204 3143
 		static $result;
3205 3144
 		if($result === null && function_exists('apache_request_headers')) {
3206 3145
 			$result = apache_request_headers();
3207
-		}
3208
-		elseif($result === null) {
3146
+		} elseif($result === null) {
3209 3147
 			$result = array();
3210 3148
 			foreach($_SERVER as $key=>$value) {
3211 3149
 				if(strncasecmp($key, 'HTTP_', 5) !== 0) continue;
@@ -3260,8 +3198,7 @@  discard block
 block discarded – undo
3260 3198
 		try
3261 3199
 		{
3262 3200
 			return get_browser();
3263
-		}
3264
-		catch(TPhpErrorException $e)
3201
+		} catch(TPhpErrorException $e)
3265 3202
 		{
3266 3203
 			throw new TConfigurationException('httprequest_browscap_required');
3267 3204
 		}
@@ -3315,8 +3252,7 @@  discard block
 block discarded – undo
3315 3252
 					if(($value=$sm->validateData($value))!==false)
3316 3253
 						$this->_cookies->add(new THttpCookie($key,$value));
3317 3254
 				}
3318
-			}
3319
-			else
3255
+			} else
3320 3256
 			{
3321 3257
 				foreach($_COOKIE as $key=>$value)
3322 3258
 					$this->_cookies->add(new THttpCookie($key,$value));
@@ -3419,8 +3355,7 @@  discard block
 block discarded – undo
3419 3355
 			$value=$this->_items[$key];
3420 3356
 			unset($this->_items[$key]);
3421 3357
 			return $value;
3422
-		}
3423
-		else
3358
+		} else
3424 3359
 			return null;
3425 3360
 	}
3426 3361
 	public function clear()
@@ -3467,8 +3402,7 @@  discard block
 block discarded – undo
3467 3402
 			parent::insertAt($index,$item);
3468 3403
 			if($this->_o instanceof THttpResponse)
3469 3404
 				$this->_o->addCookie($item);
3470
-		}
3471
-		else
3405
+		} else
3472 3406
 			throw new TInvalidDataTypeException('httpcookiecollection_httpcookie_required');
3473 3407
 	}
3474 3408
 	public function removeAt($index)
@@ -3598,8 +3532,7 @@  discard block
 block discarded – undo
3598 3532
 			$this->_query=isset($ret['query'])?$ret['query']:'';
3599 3533
 			$this->_fragment=isset($ret['fragment'])?$ret['fragment']:'';
3600 3534
 			$this->_uri=$uri;
3601
-		}
3602
-		else
3535
+		} else
3603 3536
 		{
3604 3537
 			throw new TInvalidDataValueException('uri_format_invalid',$uri);
3605 3538
 		}
@@ -3771,7 +3704,7 @@  discard block
 block discarded – undo
3771 3704
 		$status=TPropertyValue::ensureInteger($status);
3772 3705
 		if(isset(self::$HTTP_STATUS_CODES[$status])) {
3773 3706
 			$this->_reason=self::$HTTP_STATUS_CODES[$status];
3774
-		}else{
3707
+		} else{
3775 3708
 			if($reason===null || $reason==='') {
3776 3709
 				throw new TInvalidDataValueException("response_status_reason_missing");
3777 3710
 			}
@@ -3835,8 +3768,7 @@  discard block
 block discarded – undo
3835 3768
 		{
3836 3769
 			foreach($headers as $h)
3837 3770
 				header($h);
3838
-		}
3839
-		else
3771
+		} else
3840 3772
 		{
3841 3773
 			header('Pragma: public');
3842 3774
 			header('Expires: 0');
@@ -3899,13 +3831,11 @@  discard block
 block discarded – undo
3899 3831
 				{
3900 3832
 					$this->_bufferOutput = false;
3901 3833
 					ob_end_flush();
3902
-				}
3903
-				else
3834
+				} else
3904 3835
 					ob_flush();
3905 3836
 				flush();
3906 3837
 			}
3907
-		}
3908
-		else
3838
+		} else
3909 3839
 			flush();
3910 3840
 	}
3911 3841
 	protected function ensureHttpHeaderSent()
@@ -3991,8 +3921,7 @@  discard block
 block discarded – undo
3991 3921
 				$cookie->getSecure(),
3992 3922
 				$cookie->getHttpOnly()
3993 3923
 			);
3994
-		}
3995
-		else {
3924
+		} else {
3996 3925
 			setcookie(
3997 3926
 				$cookie->getName(),
3998 3927
 				$cookie->getValue(),
@@ -4172,13 +4101,11 @@  discard block
 block discarded – undo
4172 4101
       {
4173 4102
 				ini_set('session.use_cookies','0');
4174 4103
 			  ini_set('session.use_only_cookies','0');
4175
-      }
4176
-			else if($value===THttpSessionCookieMode::Allow)
4104
+      } else if($value===THttpSessionCookieMode::Allow)
4177 4105
 			{
4178 4106
 				ini_set('session.use_cookies','1');
4179 4107
 				ini_set('session.use_only_cookies','0');
4180
-			}
4181
-			else
4108
+			} else
4182 4109
 			{
4183 4110
 				ini_set('session.use_cookies','1');
4184 4111
 				ini_set('session.use_only_cookies','1');
@@ -4212,8 +4139,7 @@  discard block
 block discarded – undo
4212 4139
 			{
4213 4140
 				ini_set('session.gc_probability',$value);
4214 4141
 				ini_set('session.gc_divisor','100');
4215
-			}
4216
-			else
4142
+			} else
4217 4143
 				throw new TInvalidDataValueException('httpsession_gcprobability_invalid',$value);
4218 4144
 		}
4219 4145
 	}
@@ -4299,8 +4225,7 @@  discard block
 block discarded – undo
4299 4225
 			$value=$_SESSION[$key];
4300 4226
 			unset($_SESSION[$key]);
4301 4227
 			return $value;
4302
-		}
4303
-		else
4228
+		} else
4304 4229
 			return null;
4305 4230
 	}
4306 4231
 	public function clear()
@@ -4623,10 +4548,8 @@  discard block
 block discarded – undo
4623 4548
 					return $this->_id;
4624 4549
 				else
4625 4550
 					return ($this->_uid=$prefix.self::ID_SEPARATOR.$this->_id);
4626
-			}
4627
-			else					return $this->_id;
4628
-		}
4629
-		else
4551
+			} else					return $this->_id;
4552
+		} else
4630 4553
 			return $this->_uid;
4631 4554
 	}
4632 4555
 	public function focus()
@@ -4702,8 +4625,7 @@  discard block
 block discarded – undo
4702 4625
 				if(!$control->getVisible(false))
4703 4626
 					return false;
4704 4627
 			return true;
4705
-		}
4706
-		else
4628
+		} else
4707 4629
 			return $this->getViewState('Visible',true);
4708 4630
 	}
4709 4631
 	public function setVisible($value)
@@ -4718,8 +4640,7 @@  discard block
 block discarded – undo
4718 4640
 				if(!$control->getViewState('Enabled',true))
4719 4641
 					return false;
4720 4642
 			return true;
4721
-		}
4722
-		else
4643
+		} else
4723 4644
 			return $this->getViewState('Enabled',true);
4724 4645
 	}
4725 4646
 	public function setEnabled($value)
@@ -4777,8 +4698,7 @@  discard block
 block discarded – undo
4777 4698
 				if($control->_flags & self::IS_DISABLE_VIEWSTATE)
4778 4699
 					return false;
4779 4700
 			return true;
4780
-		}
4781
-		else
4701
+		} else
4782 4702
 			return !($this->_flags & self::IS_DISABLE_VIEWSTATE);
4783 4703
 	}
4784 4704
 	public function setEnableViewState($value)
@@ -4816,8 +4736,7 @@  discard block
 block discarded – undo
4816 4736
 			if(is_object($this->_tempState[$key]) && $this->_trackViewState)
4817 4737
 				$this->_viewState[$key]=$this->_tempState[$key];
4818 4738
 			return $this->_tempState[$key];
4819
-		}
4820
-		else
4739
+		} else
4821 4740
 			return $defaultValue;
4822 4741
 	}
4823 4742
 	public function setViewState($key,$value,$defaultValue=null)
@@ -4829,8 +4748,7 @@  discard block
 block discarded – undo
4829 4748
 				unset($this->_viewState[$key]);
4830 4749
 			else
4831 4750
 				$this->_viewState[$key]=$value;
4832
-		}
4833
-		else
4751
+		} else
4834 4752
 		{
4835 4753
 			unset($this->_viewState[$key]);
4836 4754
 			if($value===$defaultValue)
@@ -4919,8 +4837,7 @@  discard block
 block discarded – undo
4919 4837
 					$this->createChildControls();
4920 4838
 				$this->_flags &= ~self::IS_CREATING_CHILD;
4921 4839
 				$this->_flags |= self::IS_CHILD_CREATED;
4922
-			}
4923
-			catch(Exception $e)
4840
+			} catch(Exception $e)
4924 4841
 			{
4925 4842
 				$this->_flags &= ~self::IS_CREATING_CHILD;
4926 4843
 				$this->_flags |= self::IS_CHILD_CREATED;
@@ -5044,8 +4961,9 @@  discard block
 block discarded – undo
5044 4961
 	final protected function isDescendentOf($ancestor)
5045 4962
 	{
5046 4963
 		$control=$this;
5047
-		while($control!==$ancestor && $control->_parent)
5048
-			$control=$control->_parent;
4964
+		while($control!==$ancestor && $control->_parent) {
4965
+					$control=$control->_parent;
4966
+		}
5049 4967
 		return $control===$ancestor;
5050 4968
 	}
5051 4969
 	public function addedControl($control)
@@ -5073,8 +4991,7 @@  discard block
 block discarded – undo
5073 4991
 				{
5074 4992
 					$state=$this->_rf[self::RF_CHILD_STATE][$control->_id];
5075 4993
 					unset($this->_rf[self::RF_CHILD_STATE][$control->_id]);
5076
-				}
5077
-				else
4994
+				} else
5078 4995
 					$state=null;
5079 4996
 				$control->loadStateRecursive($state,!($this->_flags & self::IS_DISABLE_VIEWSTATE));
5080 4997
 				if($this->_stage>=self::CS_LOADED)
@@ -5307,8 +5224,7 @@  discard block
 block discarded – undo
5307 5224
 			{
5308 5225
 				$this->_rf[self::RF_CONTROLSTATE]=&$state[1];
5309 5226
 				unset($state[1]);
5310
-			}
5311
-			else
5227
+			} else
5312 5228
 				unset($this->_rf[self::RF_CONTROLSTATE]);
5313 5229
 			if($needViewState)
5314 5230
 			{
@@ -5372,8 +5288,7 @@  discard block
 block discarded – undo
5372 5288
 		{
5373 5289
 			$page->applyControlStyleSheet($this);
5374 5290
 			$this->_flags |= self::IS_STYLESHEET_APPLIED;
5375
-		}
5376
-		else if($this->_flags & self::IS_STYLESHEET_APPLIED)
5291
+		} else if($this->_flags & self::IS_STYLESHEET_APPLIED)
5377 5292
 			throw new TInvalidOperationException('control_stylesheet_applied',get_class($this));
5378 5293
 	}
5379 5294
 	private function clearCachedUniqueID($recursive)
@@ -5436,8 +5351,7 @@  discard block
 block discarded – undo
5436 5351
 		{
5437 5352
 			parent::insertAt($index,$item);
5438 5353
 			$this->_o->addedControl($item);
5439
-		}
5440
-		else if(is_string($item) || ($item instanceof IRenderable))
5354
+		} else if(is_string($item) || ($item instanceof IRenderable))
5441 5355
 			parent::insertAt($index,$item);
5442 5356
 		else
5443 5357
 			throw new TInvalidDataTypeException('controlcollection_control_required');
@@ -5597,8 +5511,7 @@  discard block
 block discarded – undo
5597 5511
 				else if($item[0]===self::TYPE_DATABINDING)
5598 5512
 					$this->_bindings[$id]=$item[1];
5599 5513
 				$this->_items[$id]='';
5600
-			}
5601
-			else
5514
+			} else
5602 5515
 				$this->_items[$id]=$item;
5603 5516
 		}
5604 5517
 	}
@@ -6746,8 +6659,7 @@  discard block
 block discarded – undo
6746 6659
 			if(!isset(self::$_template[$class]))
6747 6660
 				self::$_template[$class]=$this->loadTemplate();
6748 6661
 			return self::$_template[$class];
6749
-		}
6750
-		else
6662
+		} else
6751 6663
 			return $this->_localTemplate;
6752 6664
 	}
6753 6665
 	public function setTemplate($value)
@@ -6821,8 +6733,7 @@  discard block
 block discarded – undo
6821 6733
 			$controls=$placeholder->getParent()->getControls();
6822 6734
 			$loc=$controls->remove($placeholder);
6823 6735
 			$controls->insertAt($loc,$content);
6824
-		}
6825
-		else
6736
+		} else
6826 6737
 			throw new TConfigurationException('templatecontrol_placeholder_inexistent',$id);
6827 6738
 	}
6828 6739
 	protected function initRecursive($namingContainer=null)
@@ -6839,8 +6750,7 @@  discard block
 block discarded – undo
6839 6750
 			$master->ensureChildControls();
6840 6751
 			foreach($this->_contents as $id=>$content)
6841 6752
 				$master->injectContent($id,$content);
6842
-		}
6843
-		else if(!empty($this->_contents))
6753
+		} else if(!empty($this->_contents))
6844 6754
 			throw new TConfigurationException('templatecontrol_mastercontrol_required',get_class($this));
6845 6755
 		parent::initRecursive($namingContainer);
6846 6756
 	}
@@ -6860,8 +6770,7 @@  discard block
 block discarded – undo
6860 6770
                                                 $control->Checked = (boolean) $arObj->{$key};
6861 6771
                                         elseif ($control instanceof TDatePicker)
6862 6772
                                                 $control->Date = $arObj->{$key};
6863
-                                }
6864
-                                else
6773
+                                } else
6865 6774
                                 {
6866 6775
                                         foreach ($objAttrs["RELATIONS"] as $relKey => $relValues)
6867 6776
                                         {
@@ -6883,8 +6792,7 @@  discard block
 block discarded – undo
6883 6792
                                         }
6884 6793
                                         break;
6885 6794
                                 }
6886
-                        } 
6887
-                        catch (Exception $ex)
6795
+                        } catch (Exception $ex)
6888 6796
                         {
6889 6797
                                 if ($throwExceptions)
6890 6798
                                         throw $ex;
@@ -6907,8 +6815,7 @@  discard block
 block discarded – undo
6907 6815
                                         $arObj->{$key} = $control->Checked;
6908 6816
                                 elseif ($control instanceof TDatePicker)
6909 6817
                                         $arObj->{$key} = $control->Date;
6910
-                        } 
6911
-                        catch (Exception $ex)
6818
+                        } catch (Exception $ex)
6912 6819
                         {
6913 6820
                                 if ($throwExceptions)
6914 6821
                                         throw $ex;
@@ -6959,8 +6866,7 @@  discard block
 block discarded – undo
6959 6866
  			$page->endFormRender($writer);
6960 6867
 			$cs->renderScriptFilesEnd($writer);
6961 6868
 			$cs->renderEndScripts($writer);
6962
-		}
6963
-		else
6869
+		} else
6964 6870
 		{
6965 6871
 			$cs->renderHiddenFieldsBegin($writer);
6966 6872
 			$page->beginFormRender($writer);
@@ -7123,8 +7029,7 @@  discard block
 block discarded – undo
7123 7029
 				$base = $dir;
7124 7030
 			}
7125 7031
 			return array($assets->getPublishedPath($base), $assets->publishFilePath($base));
7126
-		}
7127
-		else
7032
+		} else
7128 7033
 		{
7129 7034
 			return array($assets->getBasePath().str_replace($assets->getBaseUrl(),'',$base), $base);
7130 7035
 		}
@@ -7458,8 +7363,7 @@  discard block
 block discarded – undo
7458 7363
 			{
7459 7364
 				foreach($value as $v)
7460 7365
 					$str.='<input type="hidden" name="'.$name.'[]" id="'.$id.'" value="'.THttpUtility::htmlEncode($value)."\" />\n";
7461
-			}
7462
-			else
7366
+			} else
7463 7367
 			{
7464 7368
 				$str.='<input type="hidden" name="'.$name.'" id="'.$id.'" value="'.THttpUtility::htmlEncode($value)."\" />\n";
7465 7369
 			}
@@ -7568,8 +7472,7 @@  discard block
 block discarded – undo
7568 7472
 				$this->processCallbackRequest($writer);
7569 7473
 			else
7570 7474
 				$this->processPostBackRequest($writer);
7571
-		}
7572
-		else
7475
+		} else
7573 7476
 			$this->processNormalRequest($writer);
7574 7477
 		$this->_writer = null;
7575 7478
 	}
@@ -7715,8 +7618,7 @@  discard block
 block discarded – undo
7715 7618
 			{
7716 7619
 				foreach($this->_validators as $validator)
7717 7620
 					$validator->validate();
7718
-			}
7719
-			else
7621
+			} else
7720 7622
 			{
7721 7623
 				foreach($this->_validators as $validator)
7722 7624
 				{
@@ -7737,8 +7639,7 @@  discard block
 block discarded – undo
7737 7639
 						return false;
7738 7640
 			}
7739 7641
 			return true;
7740
-		}
7741
-		else
7642
+		} else
7742 7643
 			throw new TInvalidOperationException('page_isvalid_unknown');
7743 7644
 	}
7744 7645
 	public function getTheme()
@@ -7923,14 +7824,12 @@  discard block
 block discarded – undo
7923 7824
 				{
7924 7825
 					if($control->loadPostData($key,$postData))
7925 7826
 						$this->_controlsPostDataChanged[]=$control;
7926
-				}
7927
-				else if($control instanceof IPostBackEventHandler &&
7827
+				} else if($control instanceof IPostBackEventHandler &&
7928 7828
 					empty($this->_postData[self::FIELD_POSTBACK_TARGET]))
7929 7829
 				{
7930 7830
 					$this->_postData->add(self::FIELD_POSTBACK_TARGET,$key);  				}
7931 7831
 				unset($this->_controlsRequiringPostData[$key]);
7932
-			}
7933
-			else if($beforeLoad)
7832
+			} else if($beforeLoad)
7934 7833
 				$this->_restPostData->add($key,$value);
7935 7834
 		}
7936 7835
 		foreach($this->_controlsRequiringPostData as $key=>$value)
@@ -7941,8 +7840,7 @@  discard block
 block discarded – undo
7941 7840
 				{
7942 7841
 					if($control->loadPostData($key,$this->_postData))
7943 7842
 						$this->_controlsPostDataChanged[]=$control;
7944
-				}
7945
-				else
7843
+				} else
7946 7844
 					throw new TInvalidDataValueException('page_postbackcontrol_invalid',$key);
7947 7845
 				unset($this->_controlsRequiringPostData[$key]);
7948 7846
 			}
@@ -7991,8 +7889,7 @@  discard block
 block discarded – undo
7991 7889
 			else
7992 7890
 				$focus=$this->_focus;
7993 7891
 			$this->getClientScript()->registerFocusControl($focus);
7994
-		}
7995
-		else if($this->_postData && ($lastFocus=$this->_postData->itemAt(self::FIELD_LASTFOCUS))!==null)
7892
+		} else if($this->_postData && ($lastFocus=$this->_postData->itemAt(self::FIELD_LASTFOCUS))!==null)
7996 7893
 			$this->getClientScript()->registerFocusControl($lastFocus);
7997 7894
 		$this->_inFormRender=false;
7998 7895
 	}
@@ -8158,8 +8055,7 @@  discard block
 block discarded – undo
8158 8055
 			{
8159 8056
 				if(($str=$sm->validateData($str))!==false)
8160 8057
 					return unserialize($str);
8161
-			}
8162
-			else
8058
+			} else
8163 8059
 				return unserialize($str);
8164 8060
 		}
8165 8061
 		return null;
@@ -8200,8 +8096,7 @@  discard block
 block discarded – undo
8200 8096
 					$this->_cache=$this->getApplication()->getModule($this->_cacheModuleID);
8201 8097
 					if(!($this->_cache instanceof ICache))
8202 8098
 						throw new TConfigurationException('outputcache_cachemoduleid_invalid',$this->_cacheModuleID);
8203
-				}
8204
-				else
8099
+				} else
8205 8100
 					$this->_cache=$this->getApplication()->getCache();
8206 8101
 				if($this->_cache!==null)
8207 8102
 				{
@@ -8213,8 +8108,7 @@  discard block
 block discarded – undo
8213 8108
 						$param->setCacheTime(isset($data[3])?$data[3]:0);
8214 8109
 						$this->onCheckDependency($param);
8215 8110
 						$this->_dataCached=$param->getIsValid();
8216
-					}
8217
-					else
8111
+					} else
8218 8112
 						$this->_dataCached=false;
8219 8113
 					if($this->_dataCached)
8220 8114
 						list($this->_contents,$this->_state,$this->_actions,$this->_cacheTime)=$data;
@@ -8230,8 +8124,7 @@  discard block
 block discarded – undo
8230 8124
 			$stack->push($this);
8231 8125
 			parent::initRecursive($namingContainer);
8232 8126
 			$stack->pop();
8233
-		}
8234
-		else
8127
+		} else
8235 8128
 			parent::initRecursive($namingContainer);
8236 8129
 	}
8237 8130
 	protected function loadRecursive()
@@ -8242,8 +8135,7 @@  discard block
 block discarded – undo
8242 8135
 			$stack->push($this);
8243 8136
 			parent::loadRecursive();
8244 8137
 			$stack->pop();
8245
-		}
8246
-		else
8138
+		} else
8247 8139
 		{
8248 8140
 			if($this->_dataCached)
8249 8141
 				$this->performActions();
@@ -8272,8 +8164,7 @@  discard block
 block discarded – undo
8272 8164
 			$stack->push($this);
8273 8165
 			parent::preRenderRecursive();
8274 8166
 			$stack->pop();
8275
-		}
8276
-		else
8167
+		} else
8277 8168
 			parent::preRenderRecursive();
8278 8169
 	}
8279 8170
 	protected function loadStateRecursive(&$state,$needViewState=true)
@@ -8409,8 +8300,7 @@  discard block
 block discarded – undo
8409 8300
 			$content=$textwriter->flush();
8410 8301
 			$data=array($content,$this->_state,$this->_actions,time());
8411 8302
 			$this->_cache->set($this->getCacheKey(),$data,$this->getDuration(),$this->getCacheDependency());
8412
-		}
8413
-		else
8303
+		} else
8414 8304
 			parent::render($writer);
8415 8305
 	}
8416 8306
 }
@@ -8515,8 +8405,7 @@  discard block
 block discarded – undo
8515 8405
 				$cache->set(self::TEMPLATE_CACHE_PREFIX.$fileName,array($template,$timestamps));
8516 8406
 				return $template;
8517 8407
 			}
8518
-		}
8519
-		else
8408
+		} else
8520 8409
 			return null;
8521 8410
 	}
8522 8411
 	protected function getLocalizedTemplate($filename)
@@ -8636,8 +8525,7 @@  discard block
 block discarded – undo
8636 8525
 						$component->createdOnTemplate($parent);
8637 8526
 					if($component->getAllowChildControls())
8638 8527
 						$controls[$key]=$component;
8639
-				}
8640
-				else if($component instanceof TComponent)
8528
+				} else if($component instanceof TComponent)
8641 8529
 				{
8642 8530
 					$controls[$key]=$component;
8643 8531
 					if(isset($properties['id']))
@@ -8655,8 +8543,7 @@  discard block
 block discarded – undo
8655 8543
 					else
8656 8544
 						$component->createdOnTemplate($parent);
8657 8545
 				}
8658
-			}
8659
-			else
8546
+			} else
8660 8547
 			{
8661 8548
 				if($object[1] instanceof TCompositeLiteral)
8662 8549
 				{
@@ -8666,8 +8553,7 @@  discard block
 block discarded – undo
8666 8553
 						$directChildren[]=$o;
8667 8554
 					else
8668 8555
 						$parent->addParsedObject($o);
8669
-				}
8670
-				else
8556
+				} else
8671 8557
 				{
8672 8558
 					if($parent===$parentControl)
8673 8559
 						$directChildren[]=$object[1];
@@ -8738,8 +8624,7 @@  discard block
 block discarded – undo
8738 8624
 				default:						throw new TConfigurationException('template_tag_unexpected',$name,$value[1]);
8739 8625
 					break;
8740 8626
 			}
8741
-		}
8742
-		else
8627
+		} else
8743 8628
 		{
8744 8629
 			if (substr($name,0,2)=='js')
8745 8630
 				if ($value and !($value instanceof TJavaScriptLiteral))
@@ -8775,8 +8660,7 @@  discard block
 block discarded – undo
8775 8660
 				default:						throw new TConfigurationException('template_tag_unexpected',$name,$value[1]);
8776 8661
 					break;
8777 8662
 			}
8778
-		}
8779
-		else
8663
+		} else
8780 8664
 			$component->setSubProperty($name,$value);
8781 8665
 	}
8782 8666
 	protected function parse($input)
@@ -8813,8 +8697,7 @@  discard block
 block discarded – undo
8813 8697
 						$stack[] = $type;
8814 8698
 						$container=$c-1;
8815 8699
 					}
8816
-				}
8817
-				else if(strpos($str,'</com:')===0)					{
8700
+				} else if(strpos($str,'</com:')===0)					{
8818 8701
 					if($expectPropEnd)
8819 8702
 						continue;
8820 8703
 					if($matchStart>$textStart)
@@ -8830,8 +8713,7 @@  discard block
 block discarded – undo
8830 8713
 						throw new TConfigurationException('template_closingtag_expected',$tag);
8831 8714
 					}
8832 8715
 					$container=$tpl[$container][0];
8833
-				}
8834
-				else if(strpos($str,'<%@')===0)					{
8716
+				} else if(strpos($str,'<%@')===0)					{
8835 8717
 					if($expectPropEnd)
8836 8718
 						continue;
8837 8719
 					if($matchStart>$textStart)
@@ -8840,8 +8722,7 @@  discard block
 block discarded – undo
8840 8722
 					if(isset($tpl[0]) || $this->_directive!==null)
8841 8723
 						throw new TConfigurationException('template_directive_nonunique');
8842 8724
 					$this->_directive=$this->parseAttributes($match[4][0],$match[4][1]);
8843
-				}
8844
-				else if(strpos($str,'<%')===0)					{
8725
+				} else if(strpos($str,'<%')===0)					{
8845 8726
 					if($expectPropEnd)
8846 8727
 						continue;
8847 8728
 					if($matchStart>$textStart)
@@ -8863,8 +8744,7 @@  discard block
 block discarded – undo
8863 8744
 						$literal=strtr(trim(substr($literal,0,strlen($literal)-1)),array("'"=>"\'","\\"=>"\\\\"));
8864 8745
 						$tpl[$c++]=array($container,array(TCompositeLiteral::TYPE_EXPRESSION,"Prado::localize('$literal')"));
8865 8746
 					}
8866
-				}
8867
-				else if(strpos($str,'<prop:')===0)					{
8747
+				} else if(strpos($str,'<prop:')===0)					{
8868 8748
 					if(strrpos($str,'/>')===strlen($str)-2)  					{
8869 8749
 						if($expectPropEnd)
8870 8750
 							continue;
@@ -8884,8 +8764,7 @@  discard block
 block discarded – undo
8884 8764
 								throw new TConfigurationException('template_property_duplicated',$name);
8885 8765
 							$tpl[$container][2][$name]=$value;
8886 8766
 						}
8887
-					}
8888
-					else  					{
8767
+					} else  					{
8889 8768
 						$prop=strtolower($match[3][0]);
8890 8769
 						$stack[] = '@'.$prop;
8891 8770
 						if(!$expectPropEnd)
@@ -8896,8 +8775,7 @@  discard block
 block discarded – undo
8896 8775
 							$expectPropEnd=true;
8897 8776
 						}
8898 8777
 					}
8899
-				}
8900
-				else if(strpos($str,'</prop:')===0)					{
8778
+				} else if(strpos($str,'</prop:')===0)					{
8901 8779
 					$prop=strtolower($match[3][0]);
8902 8780
 					if(empty($stack))
8903 8781
 						throw new TConfigurationException('template_closingtag_unexpected',"</prop:$prop>");
@@ -8923,21 +8801,18 @@  discard block
 block discarded – undo
8923 8801
 								if(isset($tpl[$container][2][$prop]))
8924 8802
 									throw new TConfigurationException('template_property_duplicated',$prop);
8925 8803
 								$tpl[$container][2][$prop]=$value;
8926
-							}
8927
-							else									$this->_directive[$prop]=$value;
8804
+							} else									$this->_directive[$prop]=$value;
8928 8805
 							$textStart=$matchEnd+1;
8929 8806
 						}
8930 8807
 						$expectPropEnd=false;
8931 8808
 					}
8932
-				}
8933
-				else if(strpos($str,'<!--')===0)					{
8809
+				} else if(strpos($str,'<!--')===0)					{
8934 8810
 					if($expectPropEnd)
8935 8811
 						throw new TConfigurationException('template_comments_forbidden');
8936 8812
 					if($matchStart>$textStart)
8937 8813
 						$tpl[$c++]=array($container,substr($input,$textStart,$matchStart-$textStart));
8938 8814
 					$textStart=$matchEnd+1;
8939
-				}
8940
-				else
8815
+				} else
8941 8816
 					throw new TConfigurationException('template_matching_unexpected',$match);
8942 8817
 			}
8943 8818
 			if(!empty($stack))
@@ -8948,8 +8823,7 @@  discard block
 block discarded – undo
8948 8823
 			}
8949 8824
 			if($textStart<strlen($input))
8950 8825
 				$tpl[$c++]=array($container,substr($input,$textStart));
8951
-		}
8952
-		catch(Exception $e)
8826
+		} catch(Exception $e)
8953 8827
 		{
8954 8828
 			if(($e instanceof TException) && ($e instanceof TTemplateException))
8955 8829
 				throw $e;
@@ -8979,14 +8853,12 @@  discard block
 block discarded – undo
8979 8853
 				{
8980 8854
 					$parent=null;
8981 8855
 					$objects[$id]=$object;
8982
-				}
8983
-				else
8856
+				} else
8984 8857
 				{
8985 8858
 					$parent=$object[0];
8986 8859
 					$merged=array($parent,array($object[1]));
8987 8860
 				}
8988
-			}
8989
-			else
8861
+			} else
8990 8862
 				$merged[1][]=$object[1];
8991 8863
 		}
8992 8864
 		if($parent!==null)
@@ -9019,8 +8891,7 @@  discard block
 block discarded – undo
9019 8891
 					$attributes[$name]=$this->parseTemplateProperty(substr($value,1,strlen($value)-2),$match[2][1]+1);
9020 8892
 				else
9021 8893
 					$attributes[$name]=$this->parseTemplateProperty($value,$match[2][1]);
9022
-			}
9023
-			else
8894
+			} else
9024 8895
 			{
9025 8896
 				if($value[0]==='\'' || $value[0]==='"')
9026 8897
 					$attributes[$name]=$this->parseAttribute(substr($value,1,strlen($value)-2));
@@ -9062,8 +8933,7 @@  discard block
 block discarded – undo
9062 8933
 				return array(self::CONFIG_DATABIND,ltrim($expr,'.'));
9063 8934
 			else
9064 8935
 				return array(self::CONFIG_EXPRESSION,ltrim($expr,'.'));
9065
-		}
9066
-		else if(preg_match('/\\s*(<%~.*?%>|<%\\$.*?%>|<%\\[.*?\\]%>|<%\/.*?%>)\\s*/msS',$value,$matches) && $matches[0]===$value)
8936
+		} else if(preg_match('/\\s*(<%~.*?%>|<%\\$.*?%>|<%\\[.*?\\]%>|<%\/.*?%>)\\s*/msS',$value,$matches) && $matches[0]===$value)
9067 8937
 		{
9068 8938
 			$value=$matches[1];
9069 8939
 			if($value[2]==='~')
@@ -9076,8 +8946,7 @@  discard block
 block discarded – undo
9076 8946
 				$literal = trim(substr($value,3,strlen($value)-5));
9077 8947
 				return array(self::CONFIG_EXPRESSION,"rtrim(dirname(\$this->getApplication()->getRequest()->getApplicationUrl()), '/').'/$literal'");
9078 8948
 			}
9079
-		}
9080
-		else
8949
+		} else
9081 8950
 			return $value;
9082 8951
 	}
9083 8952
 	protected function validateAttributes($type,$attributes)
@@ -9097,15 +8966,13 @@  discard block
 block discarded – undo
9097 8966
 										$subname=substr($name,0,$pos);
9098 8967
 					if(!$class->hasMethod('get'.$subname))
9099 8968
 						throw new TConfigurationException('template_property_unknown',$type,$subname);
9100
-				}
9101
-				else if(strncasecmp($name,'on',2)===0)
8969
+				} else if(strncasecmp($name,'on',2)===0)
9102 8970
 				{
9103 8971
 										if(!$class->hasMethod($name))
9104 8972
 						throw new TConfigurationException('template_event_unknown',$type,$name);
9105 8973
 					else if(!is_string($att))
9106 8974
 						throw new TConfigurationException('template_eventhandler_invalid',$type,$name);
9107
-				}
9108
-				else
8975
+				} else
9109 8976
 				{
9110 8977
 										if (! ($class->hasMethod('set'.$name) || $class->hasMethod('setjs'.$name) || $this->isClassBehaviorMethod($class,'set'.$name)) )
9111 8978
 					{
@@ -9113,8 +8980,7 @@  discard block
 block discarded – undo
9113 8980
 							throw new TConfigurationException('template_property_readonly',$type,$name);
9114 8981
 						else
9115 8982
 							throw new TConfigurationException('template_property_unknown',$type,$name);
9116
-					}
9117
-					else if(is_array($att) && $att[0]!==self::CONFIG_EXPRESSION)
8983
+					} else if(is_array($att) && $att[0]!==self::CONFIG_EXPRESSION)
9118 8984
 					{
9119 8985
 						if(strcasecmp($name,'id')===0)
9120 8986
 							throw new TConfigurationException('template_controlid_invalid',$type);
@@ -9123,8 +8989,7 @@  discard block
 block discarded – undo
9123 8989
 					}
9124 8990
 				}
9125 8991
 			}
9126
-		}
9127
-		else if(is_subclass_of($className,'TComponent') || $className==='TComponent')
8992
+		} else if(is_subclass_of($className,'TComponent') || $className==='TComponent')
9128 8993
 		{
9129 8994
 			foreach($attributes as $name=>$att)
9130 8995
 			{
@@ -9135,8 +9000,7 @@  discard block
 block discarded – undo
9135 9000
 										$subname=substr($name,0,$pos);
9136 9001
 					if(!$class->hasMethod('get'.$subname))
9137 9002
 						throw new TConfigurationException('template_property_unknown',$type,$subname);
9138
-				}
9139
-				else if(strncasecmp($name,'on',2)===0)
9003
+				} else if(strncasecmp($name,'on',2)===0)
9140 9004
 					throw new TConfigurationException('template_event_forbidden',$type,$name);
9141 9005
 				else
9142 9006
 				{
@@ -9149,8 +9013,7 @@  discard block
 block discarded – undo
9149 9013
 					}
9150 9014
 				}
9151 9015
 			}
9152
-		}
9153
-		else
9016
+		} else
9154 9017
 			throw new TConfigurationException('template_component_required',$type);
9155 9018
 	}
9156 9019
 	public function getIncludedFiles()
@@ -9170,8 +9033,7 @@  discard block
 block discarded – undo
9170 9033
 						$line=$line-$this->_includeAtLine[$i]+1;
9171 9034
 						$srcFile=$this->_includedFiles[$i];
9172 9035
 						break;
9173
-					}
9174
-					else
9036
+					} else
9175 9037
 						$line=$line-$this->_includeLines[$i]+1;
9176 9038
 				}
9177 9039
 			}
@@ -9357,8 +9219,7 @@  discard block
 block discarded – undo
9357 9219
 					closedir($dir);
9358 9220
 					if($cacheValid)
9359 9221
 						$this->_skins=$skins;
9360
-				}
9361
-				else
9222
+				} else
9362 9223
 				{
9363 9224
 					$cacheValid=true;
9364 9225
 					$this->_cssFiles=$cssFiles;
@@ -9483,19 +9344,15 @@  discard block
 block discarded – undo
9483 9344
 							{
9484 9345
 								$setter='set'.$name;
9485 9346
 								$control->$setter($value);
9486
-							}
9487
-							else
9347
+							} else
9488 9348
 								throw new TConfigurationException('theme_property_readonly',$type,$name);
9489
-						}
9490
-						else
9349
+						} else
9491 9350
 							throw new TConfigurationException('theme_property_undefined',$type,$name);
9492
-					}
9493
-					else							$control->setSubProperty($name,$value);
9351
+					} else							$control->setSubProperty($name,$value);
9494 9352
 				}
9495 9353
 			}
9496 9354
 			return true;
9497
-		}
9498
-		else
9355
+		} else
9499 9356
 			return false;
9500 9357
 	}
9501 9358
 	public function getStyleSheetFiles()
@@ -9588,8 +9445,7 @@  discard block
 block discarded – undo
9588 9445
 					$pageConfig->loadPageConfigurationFromXml($config,$application->getBasePath(),'');
9589 9446
 			}
9590 9447
 			$pageConfig->loadFromFiles($this->getBasePath());
9591
-		}
9592
-		else
9448
+		} else
9593 9449
 		{
9594 9450
 			$configCached=true;
9595 9451
 			$currentTimestamp=array();
@@ -9606,8 +9462,7 @@  discard block
 block discarded – undo
9606 9462
 							$currentTimestamp[0]=$appConfigFile===null?0:@filemtime($appConfigFile);
9607 9463
 							if($currentTimestamp[0]>$timestamp || ($timestamp>0 && !$currentTimestamp[0]))
9608 9464
 								$configCached=false;
9609
-						}
9610
-						else
9465
+						} else
9611 9466
 						{
9612 9467
 							$currentTimestamp[$fileName]=@filemtime($fileName);
9613 9468
 							if($currentTimestamp[$fileName]>$timestamp || ($timestamp>0 && !$currentTimestamp[$fileName]))
@@ -9615,8 +9470,7 @@  discard block
 block discarded – undo
9615 9470
 						}
9616 9471
 					}
9617 9472
 				}
9618
-			}
9619
-			else
9473
+			} else
9620 9474
 			{
9621 9475
 				$configCached=false;
9622 9476
 				$paths=explode('.',$pagePath);
@@ -9759,8 +9613,7 @@  discard block
 block discarded – undo
9759 9613
 			$className=basename($path);
9760 9614
 			if(!class_exists($className,false))
9761 9615
 				include_once($path.Prado::CLASS_FILE_EXT);
9762
-		}
9763
-		else
9616
+		} else
9764 9617
 		{
9765 9618
 			$className=$this->getBasePageClass();
9766 9619
 			Prado::using($className);
@@ -9842,8 +9695,7 @@  discard block
 block discarded – undo
9842 9695
 		{
9843 9696
 			$fcontent = include $fname;
9844 9697
 			$this->loadFromPhp($fcontent,dirname($fname),$configPagePath);
9845
-		}
9846
-		else
9698
+		} else
9847 9699
 		{
9848 9700
 			$dom=new TXmlDocument;
9849 9701
 			if($dom->loadFromFile($fname))
@@ -10086,8 +9938,7 @@  discard block
 block discarded – undo
10086 9938
 			if(!is_file($dst.DIRECTORY_SEPARATOR.$fileName) || $checkTimestamp || $this->getApplication()->getMode()!==TApplicationMode::Performance)
10087 9939
 				$this->copyFile($fullpath,$dst);
10088 9940
 			return $this->_published[$path]=$this->_baseUrl.'/'.$dir.'/'.$fileName;
10089
-		}
10090
-		else
9941
+		} else
10091 9942
 		{
10092 9943
 			$dir=$this->hash($fullpath);
10093 9944
 			if(!is_dir($this->_basePath.DIRECTORY_SEPARATOR.$dir) || $checkTimestamp || $this->getApplication()->getMode()!==TApplicationMode::Performance)
@@ -10158,8 +10009,7 @@  discard block
 block discarded – undo
10158 10009
 						@copy($src.DIRECTORY_SEPARATOR.$file,$dst.DIRECTORY_SEPARATOR.$file);
10159 10010
 						@chmod($dst.DIRECTORY_SEPARATOR.$file, PRADO_CHMOD);
10160 10011
 					}
10161
-				}
10162
-				else
10012
+				} else
10163 10013
 					$this->copyDirectory($src.DIRECTORY_SEPARATOR.$file,$dst.DIRECTORY_SEPARATOR.$file);
10164 10014
 			}
10165 10015
 			closedir($folder);
@@ -10288,8 +10138,7 @@  discard block
 block discarded – undo
10288 10138
 					throw new TConfigurationException('globalization_source_path_failed',
10289 10139
 						$config['source']);
10290 10140
 					chmod($config['source'], PRADO_CHMOD); 				}
10291
-			}
10292
-			else
10141
+			} else
10293 10142
 			{
10294 10143
 				throw new TConfigurationException("invalid source dir '{$config['source']}'");
10295 10144
 			}
@@ -10303,8 +10152,7 @@  discard block
 block discarded – undo
10303 10152
 					throw new TConfigurationException('globalization_cache_path_failed',
10304 10153
 						$config['cache']);
10305 10154
 				chmod($config['cache'], PRADO_CHMOD); 			}
10306
-		}
10307
-        else
10155
+		} else
10308 10156
         {
10309 10157
             unset($config['cache']);
10310 10158
         }
@@ -10424,8 +10272,7 @@  discard block
 block discarded – undo
10424 10272
 		{
10425 10273
 			$configFile=$basePath;
10426 10274
 			$basePath=dirname($configFile);
10427
-		}
10428
-		else
10275
+		} else
10429 10276
 			$configFile=null;
10430 10277
 				$runtimePath=$basePath.DIRECTORY_SEPARATOR.self::RUNTIME_PATH;
10431 10278
 		if(is_writable($runtimePath))
@@ -10442,8 +10289,7 @@  discard block
 block discarded – undo
10442 10289
 			}
10443 10290
 			$this->setBasePath($basePath);
10444 10291
 			$this->setRuntimePath($runtimePath);
10445
-		}
10446
-		else
10292
+		} else
10447 10293
 			throw new TConfigurationException('application_runtimepath_invalid',$runtimePath);
10448 10294
 	}
10449 10295
 	public function run()
@@ -10464,8 +10310,7 @@  discard block
 block discarded – undo
10464 10310
 				$this->$method();
10465 10311
 				$this->_step++;
10466 10312
 			}
10467
-		}
10468
-		catch(Exception $e)
10313
+		} catch(Exception $e)
10469 10314
 		{
10470 10315
 			$this->onError($e);
10471 10316
 		}
@@ -10809,8 +10654,7 @@  discard block
 block discarded – undo
10809 10654
 				foreach($parameter[1] as $name=>$value)
10810 10655
 					$component->setSubProperty($name,$value);
10811 10656
 				$this->_parameters->add($id,$component);
10812
-			}
10813
-			else
10657
+			} else
10814 10658
 				$this->_parameters->add($id,$parameter);
10815 10659
 		}
10816 10660
 				$modules=array();
@@ -10851,8 +10695,7 @@  discard block
 block discarded – undo
10851 10695
 				$config->loadFromFile($this->_configFile);
10852 10696
 				if($this->_cacheFile!==null)
10853 10697
 					file_put_contents($this->_cacheFile,serialize($config),LOCK_EX);
10854
-			}
10855
-			else
10698
+			} else
10856 10699
 				$config=unserialize(file_get_contents($this->_cacheFile));
10857 10700
 			$this->applyConfiguration($config,false);
10858 10701
 		}
@@ -10884,8 +10727,7 @@  discard block
 block discarded – undo
10884 10727
 				$this->applyConfiguration($config,true);
10885 10728
 			}
10886 10729
 			$service->init($configElement);
10887
-		}
10888
-		else
10730
+		} else
10889 10731
 			throw new THttpException(500,'application_service_unknown',$serviceID);
10890 10732
 	}
10891 10733
 	public function onError($param)
@@ -10977,8 +10819,7 @@  discard block
 block discarded – undo
10977 10819
 		{
10978 10820
 			$fcontent = include $fname;
10979 10821
 			$this->loadFromPhp($fcontent,dirname($fname));
10980
-		}
10981
-		else
10822
+		} else
10982 10823
 		{
10983 10824
 			$dom=new TXmlDocument;
10984 10825
 			$dom->loadFromFile($fname);
@@ -11085,8 +10926,7 @@  discard block
 block discarded – undo
11085 10926
 						if(isset($this->_aliases[$id]))
11086 10927
 							throw new TConfigurationException('appconfig_alias_redefined',$id);
11087 10928
 						$this->_aliases[$id]=$p;
11088
-					}
11089
-					else
10929
+					} else
11090 10930
 						throw new TConfigurationException('appconfig_alias_invalid');
11091 10931
 					$this->_empty=false;
11092 10932
 					break;
@@ -11141,8 +10981,7 @@  discard block
 block discarded – undo
11141 10981
 				else
11142 10982
 					$this->_modules[$id]=array($type,$properties->toArray(),$element);
11143 10983
 				$this->_empty=false;
11144
-			}
11145
-			else
10984
+			} else
11146 10985
 				throw new TConfigurationException('appconfig_modules_invalid',$element->getTagName());
11147 10986
 		}
11148 10987
 	}
@@ -11174,8 +11013,7 @@  discard block
 block discarded – undo
11174 11013
 				$element->setParent(null);
11175 11014
 				$this->_services[$id]=array($type,$properties->toArray(),$element);
11176 11015
 				$this->_empty=false;
11177
-			}
11178
-			else
11016
+			} else
11179 11017
 				throw new TConfigurationException('appconfig_services_invalid',$element->getTagName());
11180 11018
 		}
11181 11019
 	}
@@ -11193,8 +11031,7 @@  discard block
 block discarded – undo
11193 11031
 					$properties['id'] = $id;
11194 11032
 					$this->_parameters[$id] = array($type,$properties);
11195 11033
 				}
11196
-			}
11197
-			else
11034
+			} else
11198 11035
 			{
11199 11036
 				$this->_parameters[$id] = $parameter;
11200 11037
 			}
@@ -11215,12 +11052,10 @@  discard block
 block discarded – undo
11215 11052
 						$this->_parameters[$id]=$element;
11216 11053
 					else
11217 11054
 						$this->_parameters[$id]=$value;
11218
-				}
11219
-				else
11055
+				} else
11220 11056
 					$this->_parameters[$id]=array($type,$properties->toArray());
11221 11057
 				$this->_empty=false;
11222
-			}
11223
-			else
11058
+			} else
11224 11059
 				throw new TConfigurationException('appconfig_parameters_invalid',$element->getTagName());
11225 11060
 		}
11226 11061
 	}
Please login to merge, or discard this patch.