@@ -136,15 +136,13 @@ discard block |
||
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 |
||
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 | } |
@@ -158,8 +158,7 @@ |
||
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) |
@@ -233,8 +233,7 @@ discard block |
||
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 |
||
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 |
@@ -58,8 +58,7 @@ |
||
58 | 58 | if ($this->sourcepath === NULL) |
59 | 59 | { |
60 | 60 | $this->sourcepath = $sourcepath; |
61 | - } |
|
62 | - else |
|
61 | + } else |
|
63 | 62 | { |
64 | 63 | $this->sourcepath->append($sourcepath); |
65 | 64 | } |
@@ -69,8 +69,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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; |
@@ -58,8 +58,7 @@ |
||
58 | 58 | if ($this->sourcepath === NULL) |
59 | 59 | { |
60 | 60 | $this->sourcepath = $sourcepath; |
61 | - } |
|
62 | - else |
|
61 | + } else |
|
63 | 62 | { |
64 | 63 | $this->sourcepath->append($sourcepath); |
65 | 64 | } |
@@ -58,8 +58,7 @@ |
||
58 | 58 | if ($this->sourcepath === NULL) |
59 | 59 | { |
60 | 60 | $this->sourcepath = $sourcepath; |
61 | - } |
|
62 | - else |
|
61 | + } else |
|
63 | 62 | { |
64 | 63 | $this->sourcepath->append($sourcepath); |
65 | 64 | } |
@@ -226,8 +226,7 @@ discard block |
||
226 | 226 | $base = $dir; |
227 | 227 | } |
228 | 228 | return array($assets->getPublishedPath($base), $assets->publishFilePath($base)); |
229 | - } |
|
230 | - else |
|
229 | + } else |
|
231 | 230 | { |
232 | 231 | return array($assets->getBasePath().str_replace($assets->getBaseUrl(),'',$base), $base); |
233 | 232 | } |
@@ -748,8 +747,7 @@ discard block |
||
748 | 747 | { |
749 | 748 | foreach($value as $v) |
750 | 749 | $str.='<input type="hidden" name="'.$name.'[]" id="'.$id.'" value="'.THttpUtility::htmlEncode($value)."\" />\n"; |
751 | - } |
|
752 | - else |
|
750 | + } else |
|
753 | 751 | { |
754 | 752 | $str.='<input type="hidden" name="'.$name.'" id="'.$id.'" value="'.THttpUtility::htmlEncode($value)."\" />\n"; |
755 | 753 | } |
@@ -61,8 +61,7 @@ discard block |
||
61 | 61 | foreach (explode(".", $field) as $f) |
62 | 62 | $tmp = $tmp[$f]; |
63 | 63 | return $tmp; |
64 | - } |
|
65 | - else if(is_object($data)) |
|
64 | + } else if(is_object($data)) |
|
66 | 65 | { |
67 | 66 | if(strpos($field,'.')===false) // simple field |
68 | 67 | { |
@@ -70,8 +69,7 @@ discard block |
||
70 | 69 | return call_user_func(array($data,'get'.$field)); |
71 | 70 | else |
72 | 71 | return $data->{$field}; |
73 | - } |
|
74 | - else // field in the format of xxx.yyy.zzz |
|
72 | + } else // field in the format of xxx.yyy.zzz |
|
75 | 73 | { |
76 | 74 | $object=$data; |
77 | 75 | foreach(explode('.',$field) as $f) |
@@ -79,8 +77,7 @@ discard block |
||
79 | 77 | return $object; |
80 | 78 | } |
81 | 79 | } |
82 | - } |
|
83 | - catch(Exception $e) |
|
80 | + } catch(Exception $e) |
|
84 | 81 | { |
85 | 82 | throw new TInvalidDataValueException('datafieldaccessor_datafield_invalid',$field,$e->getMessage()); |
86 | 83 | } |