Completed
Push — prado-3.3 ( f4da81...5dd4b5 )
by Fabio
09:03
created
framework/Web/UI/WebControls/TCompareValidator.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -163,8 +163,7 @@  discard block
 block discarded – undo
163 163
 			if(!is_file($dst.DIRECTORY_SEPARATOR.$fileName) || $checkTimestamp || $this->getApplication()->getMode()!==TApplicationMode::Performance)
164 164
 				$this->copyFile($fullpath,$dst);
165 165
 			return $this->_published[$path]=$this->_baseUrl.'/'.$dir.'/'.$fileName;
166
-		}
167
-		else
166
+		} else
168 167
 		{
169 168
 			$dir=$this->hash($fullpath);
170 169
 			if(!is_dir($this->_basePath.DIRECTORY_SEPARATOR.$dir) || $checkTimestamp || $this->getApplication()->getMode()!==TApplicationMode::Performance)
@@ -287,8 +286,7 @@  discard block
 block discarded – undo
287 286
 						@copy($src.DIRECTORY_SEPARATOR.$file,$dst.DIRECTORY_SEPARATOR.$file);
288 287
 						@chmod($dst.DIRECTORY_SEPARATOR.$file, PRADO_CHMOD);
289 288
 					}
290
-				}
291
-				else
289
+				} else
292 290
 					$this->copyDirectory($src.DIRECTORY_SEPARATOR.$file,$dst.DIRECTORY_SEPARATOR.$file);
293 291
 			}
294 292
 			closedir($folder);
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TBaseValidator.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -518,16 +518,14 @@
 block discarded – undo
518 518
 				{
519 519
 					$this->setIsValid(true);
520 520
 					$this->onValidationSuccess();
521
-				}
522
-				else
521
+				} else
523 522
 				{
524 523
 					if($target)
525 524
 						$target->setIsValid(false);
526 525
 					$this->setIsValid(false);
527 526
 					$this->onValidationError();
528 527
 				}
529
-			}
530
-			else
528
+			} else
531 529
 			{
532 530
 				$this->evaluateIsValid();
533 531
 				$this->setIsValid(true);
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TAccordion.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -136,15 +136,13 @@  discard block
 block discarded – undo
136 136
 				$activeView=$views->itemAt($index);
137 137
 			else
138 138
 				throw new TInvalidDataValueException('tabpanel_activeviewid_invalid',$id);
139
-		}
140
-		else if(($index=$this->getActiveViewIndex())>=0)
139
+		} else if(($index=$this->getActiveViewIndex())>=0)
141 140
 		{
142 141
 			if($index<$views->getCount())
143 142
 				$activeView=$views->itemAt($index);
144 143
 			else
145 144
 				throw new TInvalidDataValueException('tabpanel_activeviewindex_invalid',$index);
146
-		}
147
-		else
145
+		} else
148 146
 		{
149 147
 			foreach($views as $index=>$view)
150 148
 			{
@@ -320,8 +318,7 @@  discard block
 block discarded – undo
320 318
 				$this->setActiveViewIndex($index);
321 319
 				$this->setActiveViewID($view->getID(false));
322 320
 				$view->setActive(true);
323
-			}
324
-			else
321
+			} else
325 322
 				$v->setActive(false);
326 323
 		}
327 324
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TOutputCache.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -108,8 +108,7 @@  discard block
 block discarded – undo
108 108
 					$this->_cache=$this->getApplication()->getModule($this->_cacheModuleID);
109 109
 					if(!($this->_cache instanceof ICache))
110 110
 						throw new TConfigurationException('outputcache_cachemoduleid_invalid',$this->_cacheModuleID);
111
-				}
112
-				else
111
+				} else
113 112
 					$this->_cache=$this->getApplication()->getCache();
114 113
 				if($this->_cache!==null)
115 114
 				{
@@ -121,8 +120,7 @@  discard block
 block discarded – undo
121 120
 						$param->setCacheTime(isset($data[3])?$data[3]:0);
122 121
 						$this->onCheckDependency($param);
123 122
 						$this->_dataCached=$param->getIsValid();
124
-					}
125
-					else
123
+					} else
126 124
 						$this->_dataCached=false;
127 125
 					if($this->_dataCached)
128 126
 						list($this->_contents,$this->_state,$this->_actions,$this->_cacheTime)=$data;
@@ -146,8 +144,7 @@  discard block
 block discarded – undo
146 144
 			$stack->push($this);
147 145
 			parent::initRecursive($namingContainer);
148 146
 			$stack->pop();
149
-		}
150
-		else
147
+		} else
151 148
 			parent::initRecursive($namingContainer);
152 149
 	}
153 150
 
@@ -167,8 +164,7 @@  discard block
 block discarded – undo
167 164
 			$stack->push($this);
168 165
 			parent::loadRecursive();
169 166
 			$stack->pop();
170
-		}
171
-		else
167
+		} else
172 168
 		{
173 169
 			if($this->_dataCached)
174 170
 				$this->performActions();
@@ -206,8 +202,7 @@  discard block
 block discarded – undo
206 202
 			$stack->push($this);
207 203
 			parent::preRenderRecursive();
208 204
 			$stack->pop();
209
-		}
210
-		else
205
+		} else
211 206
 			parent::preRenderRecursive();
212 207
 	}
213 208
 
@@ -488,8 +483,7 @@  discard block
 block discarded – undo
488 483
 			$content=$textwriter->flush();
489 484
 			$data=array($content,$this->_state,$this->_actions,time());
490 485
 			$this->_cache->set($this->getCacheKey(),$data,$this->getDuration(),$this->getCacheDependency());
491
-		}
492
-		else
486
+		} else
493 487
 			parent::render($writer);
494 488
 	}
495 489
 }
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TRatingList.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -158,8 +158,7 @@
 block discarded – undo
158 158
 				$e->setAttribute('maxOccurs','unbounded');
159 159
 				$sequence->appendChild($e);
160 160
 				$complexType->appendChild($sequence);
161
-			}
162
-			else
161
+			} else
163 162
 			{
164 163
 				$all = $dom->createElementNS('http://www.w3.org/2001/XMLSchema', 'xsd:all');
165 164
 				foreach($elements as $elem)
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TImageMap.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -572,8 +572,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TLabel.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -233,8 +233,7 @@  discard block
 block discarded – undo
233 233
 				$newid=substr($id,$pos+1);
234 234
 				if ($control!==null)
235 235
 					$control=$control->$newid;
236
-			}
237
-			else
236
+			} else
238 237
 			{
239 238
 				// TCheckBoxList overrides findControl() with a fake implementation
240 239
 				// but accepts a second parameter to use the standard one
@@ -296,8 +295,7 @@  discard block
 block discarded – undo
296 295
 		{
297 296
 			$group=$this->getValidationGroup();
298 297
 			return $this->getPage()->getValidators($group)->getCount()>0;
299
-		}
300
-		else
298
+		} else
301 299
 			return false;
302 300
 	}
303 301
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TCaptchaValidator.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
framework/Web/UI/TTemplateControl.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -69,8 +69,7 @@  discard block
 block discarded – undo
69 69
 			if(!isset(self::$_template[$class]))
70 70
 				self::$_template[$class]=$this->loadTemplate();
71 71
 			return self::$_template[$class];
72
-		}
73
-		else
72
+		} else
74 73
 			return $this->_localTemplate;
75 74
 	}
76 75
 
@@ -205,8 +204,7 @@  discard block
 block discarded – undo
205 204
 			$controls=$placeholder->getParent()->getControls();
206 205
 			$loc=$controls->remove($placeholder);
207 206
 			$controls->insertAt($loc,$content);
208
-		}
209
-		else
207
+		} else
210 208
 			throw new TConfigurationException('templatecontrol_placeholder_inexistent',$id);
211 209
 	}
212 210
 
@@ -232,8 +230,7 @@  discard block
 block discarded – undo
232 230
 			$master->ensureChildControls();
233 231
 			foreach($this->_contents as $id=>$content)
234 232
 				$master->injectContent($id,$content);
235
-		}
236
-		else if(!empty($this->_contents))
233
+		} else if(!empty($this->_contents))
237 234
 			throw new TConfigurationException('templatecontrol_mastercontrol_required',get_class($this));
238 235
 		parent::initRecursive($namingContainer);
239 236
 	}
@@ -261,8 +258,7 @@  discard block
 block discarded – undo
261 258
                                                 $control->Checked = (boolean) $arObj->{$key};
262 259
                                         elseif ($control instanceof TDatePicker)
263 260
                                                 $control->Date = $arObj->{$key};
264
-                                }
265
-                                else
261
+                                } else
266 262
                                 {
267 263
                                         foreach ($objAttrs["RELATIONS"] as $relKey => $relValues)
268 264
                                         {
@@ -284,8 +280,7 @@  discard block
 block discarded – undo
284 280
                                         }
285 281
                                         break;
286 282
                                 }
287
-                        } 
288
-                        catch (Exception $ex)
283
+                        } catch (Exception $ex)
289 284
                         {
290 285
                                 if ($throwExceptions)
291 286
                                         throw $ex;
@@ -315,8 +310,7 @@  discard block
 block discarded – undo
315 310
                                         $arObj->{$key} = $control->Checked;
316 311
                                 elseif ($control instanceof TDatePicker)
317 312
                                         $arObj->{$key} = $control->Date;
318
-                        } 
319
-                        catch (Exception $ex)
313
+                        } catch (Exception $ex)
320 314
                         {
321 315
                                 if ($throwExceptions)
322 316
                                         throw $ex;
Please login to merge, or discard this patch.