@@ -155,8 +155,9 @@ discard block |
||
155 | 155 | $this->_temp_tarname = ''; |
156 | 156 | return false; |
157 | 157 | } |
158 | - while ($v_data = @fread($v_file_from, 1024)) |
|
159 | - @fwrite($v_file_to, $v_data); |
|
158 | + while ($v_data = @fread($v_file_from, 1024)) { |
|
159 | + @fwrite($v_file_to, $v_data); |
|
160 | + } |
|
160 | 161 | @fclose($v_file_from); |
161 | 162 | @fclose($v_file_to); |
162 | 163 | } |
@@ -410,8 +411,9 @@ discard block |
||
410 | 411 | $v_header['filename'] = substr($v_header['filename'], |
411 | 412 | $p_remove_path_size); |
412 | 413 | if (($p_path != './') && ($p_path != '/')) { |
413 | - while (substr($p_path, -1) == '/') |
|
414 | - $p_path = substr($p_path, 0, strlen($p_path)-1); |
|
414 | + while (substr($p_path, -1) == '/') { |
|
415 | + $p_path = substr($p_path, 0, strlen($p_path)-1); |
|
416 | + } |
|
415 | 417 | |
416 | 418 | if (substr($v_header['filename'], 0, 1) == '/') |
417 | 419 | $v_header['filename'] = $p_path.$v_header['filename']; |
@@ -203,11 +203,9 @@ discard block |
||
203 | 203 | $info['NumericPrecision'] = intval($matches[1]); |
204 | 204 | if(count($matches) > 2) |
205 | 205 | $info['NumericScale'] = intval($matches[2]); |
206 | - } |
|
207 | - else |
|
206 | + } else |
|
208 | 207 | $info['ColumnSize'] = intval($matches[1]); |
209 | - } |
|
210 | - else |
|
208 | + } else |
|
211 | 209 | $info['DbType'] = $col['type']; |
212 | 210 | $tableInfo->Columns[$columnId] = new TOracleTableColumn($info); |
213 | 211 | } |
@@ -349,8 +347,7 @@ discard block |
||
349 | 347 | SELECT table_name, '{$schema}' as table_schema FROM user_tables |
350 | 348 | EOD; |
351 | 349 | $command=$this->getDbConnection()->createCommand($sql); |
352 | - } |
|
353 | - else |
|
350 | + } else |
|
354 | 351 | { |
355 | 352 | $sql=<<<EOD |
356 | 353 | SELECT object_name as table_name, owner as table_schema FROM all_objects |
@@ -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 | } |
@@ -70,8 +70,7 @@ |
||
70 | 70 | { |
71 | 71 | $domain=substr($value,$pos+1); |
72 | 72 | return $domain===''?false:checkdnsrr($domain,'MX'); |
73 | - } |
|
74 | - else |
|
73 | + } else |
|
75 | 74 | return false; |
76 | 75 | } |
77 | 76 | } |
@@ -154,8 +154,7 @@ discard block |
||
154 | 154 | $info['NumericPrecision'] = intval($pscale[1]); |
155 | 155 | if(count($pscale) > 2) |
156 | 156 | $info['NumericScale'] = intval($pscale[2]); |
157 | - } |
|
158 | - else |
|
157 | + } else |
|
159 | 158 | $info['ColumnSize'] = intval($pscale[1]); |
160 | 159 | } |
161 | 160 | } |
@@ -254,8 +253,7 @@ discard block |
||
254 | 253 | try |
255 | 254 | { |
256 | 255 | return count($result = $command->queryRow()) > 0 && $result['Table_type']==='VIEW'; |
257 | - } |
|
258 | - catch(TDbException $e) |
|
256 | + } catch(TDbException $e) |
|
259 | 257 | { |
260 | 258 | $table = $schemaName===null?$tableName:$schemaName.'.'.$tableName; |
261 | 259 | throw new TDbException('dbcommon_invalid_table_name',$table,$e->getMessage()); |
@@ -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) |
@@ -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 | } |
@@ -425,14 +425,12 @@ discard block |
||
425 | 425 | $this->_recordState = self::STATE_LOADED; |
426 | 426 | return true; |
427 | 427 | } |
428 | - } |
|
429 | - else if($this->_recordState===self::STATE_LOADED) |
|
428 | + } else if($this->_recordState===self::STATE_LOADED) |
|
430 | 429 | { |
431 | 430 | $this->onUpdate($param); |
432 | 431 | if($param->getIsValid() && $gateway->update($this)) |
433 | 432 | return true; |
434 | - } |
|
435 | - else |
|
433 | + } else |
|
436 | 434 | throw new TActiveRecordException('ar_save_invalid', get_class($this)); |
437 | 435 | |
438 | 436 | return false; |
@@ -455,8 +453,7 @@ discard block |
||
455 | 453 | $this->_recordState=self::STATE_DELETED; |
456 | 454 | return true; |
457 | 455 | } |
458 | - } |
|
459 | - else |
|
456 | + } else |
|
460 | 457 | throw new TActiveRecordException('ar_delete_invalid', get_class($this)); |
461 | 458 | |
462 | 459 | return false; |
@@ -723,8 +720,7 @@ discard block |
||
723 | 720 | { |
724 | 721 | $criteria = $this->getRecordCriteria(count($args)>0 ? $args[0] : null, array_slice($args,1)); |
725 | 722 | return $context->getRelationHandler($criteria); |
726 | - } |
|
727 | - else |
|
723 | + } else |
|
728 | 724 | return null; |
729 | 725 | } |
730 | 726 | |
@@ -743,8 +739,7 @@ discard block |
||
743 | 739 | { |
744 | 740 | list($property, $relation) = $definition; |
745 | 741 | return new TActiveRecordRelationContext($this,$property,$relation); |
746 | - } |
|
747 | - else |
|
742 | + } else |
|
748 | 743 | return null; |
749 | 744 | } |
750 | 745 | |
@@ -827,8 +822,7 @@ discard block |
||
827 | 822 | { |
828 | 823 | $property= $method[4]==='_' ? substr($method,5) : substr($method,4); |
829 | 824 | return $this->getRelationHandler($property, $args); |
830 | - } |
|
831 | - else if($findOne=strncasecmp($method,'findby',6)===0) |
|
825 | + } else if($findOne=strncasecmp($method,'findby',6)===0) |
|
832 | 826 | $condition = $method[6]==='_' ? substr($method,7) : substr($method,6); |
833 | 827 | else if(strncasecmp($method,'findallby',9)===0) |
834 | 828 | $condition = $method[9]==='_' ? substr($method,10) : substr($method,9); |
@@ -894,8 +888,7 @@ discard block |
||
894 | 888 | { |
895 | 889 | $useArgs = !is_array($parameters) && is_array($args); |
896 | 890 | return new TActiveRecordCriteria($criteria,$useArgs ? $args : $parameters); |
897 | - } |
|
898 | - else if($criteria instanceof TSqlCriteria) |
|
891 | + } else if($criteria instanceof TSqlCriteria) |
|
899 | 892 | return $criteria; |
900 | 893 | else |
901 | 894 | return new TActiveRecordCriteria(); |