@@ -424,13 +424,11 @@ discard block |
||
| 424 | 424 | { |
| 425 | 425 | $boundary = $this->getRenderedContentBoundary($content); |
| 426 | 426 | $content = null; |
| 427 | - } |
|
| 428 | - else if($content instanceof THtmlWriter) |
|
| 427 | + } else if($content instanceof THtmlWriter) |
|
| 429 | 428 | { |
| 430 | 429 | $boundary = $this->getResponseContentBoundary($content); |
| 431 | 430 | $content = null; |
| 432 | - } |
|
| 433 | - else |
|
| 431 | + } else |
|
| 434 | 432 | $boundary = null; |
| 435 | 433 | |
| 436 | 434 | $this->callClientFunction('Prado.Element.replace', array($element, $content, $boundary, $self)); |
@@ -477,8 +475,7 @@ discard block |
||
| 477 | 475 | if($content instanceof TControl) |
| 478 | 476 | { |
| 479 | 477 | $boundary = $this->getRenderedContentBoundary($content); |
| 480 | - } |
|
| 481 | - elseif($content instanceof THtmlWriter) |
|
| 478 | + } elseif($content instanceof THtmlWriter) |
|
| 482 | 479 | { |
| 483 | 480 | $boundary = $this->getResponseContentBoundary($content); |
| 484 | 481 | } |
@@ -163,8 +163,7 @@ discard block |
||
| 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 |
||
| 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); |
@@ -78,8 +78,7 @@ |
||
| 78 | 78 | $this->_d[]=$item; |
| 79 | 79 | ++$this->_c; |
| 80 | 80 | } |
| 81 | - } |
|
| 82 | - else if($data!==null) |
|
| 81 | + } else if($data!==null) |
|
| 83 | 82 | throw new TInvalidDataTypeException('stack_data_not_iterable'); |
| 84 | 83 | } |
| 85 | 84 | |
@@ -81,8 +81,7 @@ |
||
| 81 | 81 | $this->_d[]=$item; |
| 82 | 82 | ++$this->_c; |
| 83 | 83 | } |
| 84 | - } |
|
| 85 | - else if($data!==null) |
|
| 84 | + } else if($data!==null) |
|
| 86 | 85 | throw new TInvalidDataTypeException('queue_data_not_iterable'); |
| 87 | 86 | } |
| 88 | 87 | |
@@ -309,13 +309,11 @@ discard block |
||
| 309 | 309 | { |
| 310 | 310 | ini_set('session.use_cookies','0'); |
| 311 | 311 | ini_set('session.use_only_cookies','0'); |
| 312 | - } |
|
| 313 | - else if($value===THttpSessionCookieMode::Allow) |
|
| 312 | + } else if($value===THttpSessionCookieMode::Allow) |
|
| 314 | 313 | { |
| 315 | 314 | ini_set('session.use_cookies','1'); |
| 316 | 315 | ini_set('session.use_only_cookies','0'); |
| 317 | - } |
|
| 318 | - else |
|
| 316 | + } else |
|
| 319 | 317 | { |
| 320 | 318 | ini_set('session.use_cookies','1'); |
| 321 | 319 | ini_set('session.use_only_cookies','1'); |
@@ -368,8 +366,7 @@ discard block |
||
| 368 | 366 | { |
| 369 | 367 | ini_set('session.gc_probability',$value); |
| 370 | 368 | ini_set('session.gc_divisor','100'); |
| 371 | - } |
|
| 372 | - else |
|
| 369 | + } else |
|
| 373 | 370 | throw new TInvalidDataValueException('httpsession_gcprobability_invalid',$value); |
| 374 | 371 | } |
| 375 | 372 | } |
@@ -557,8 +554,7 @@ discard block |
||
| 557 | 554 | $value=$_SESSION[$key]; |
| 558 | 555 | unset($_SESSION[$key]); |
| 559 | 556 | return $value; |
| 560 | - } |
|
| 561 | - else |
|
| 557 | + } else |
|
| 562 | 558 | return null; |
| 563 | 559 | } |
| 564 | 560 | |
@@ -171,8 +171,7 @@ discard block |
||
| 171 | 171 | } |
| 172 | 172 | } |
| 173 | 173 | return '{'.$results.'}'; |
| 174 | - } |
|
| 175 | - else |
|
| 174 | + } else |
|
| 176 | 175 | { |
| 177 | 176 | foreach($value as $v) |
| 178 | 177 | { |
@@ -185,8 +184,7 @@ discard block |
||
| 185 | 184 | } |
| 186 | 185 | return '['.$results.']'; |
| 187 | 186 | } |
| 188 | - } |
|
| 189 | - else if(is_integer($value)) |
|
| 187 | + } else if(is_integer($value)) |
|
| 190 | 188 | return "$value"; |
| 191 | 189 | else if(is_float($value)) |
| 192 | 190 | { |
@@ -206,8 +204,7 @@ discard block |
||
| 206 | 204 | return str_replace($locale['decimal_point'], '.', "$value"); |
| 207 | 205 | break; |
| 208 | 206 | } |
| 209 | - } |
|
| 210 | - else if(is_object($value)) |
|
| 207 | + } else if(is_object($value)) |
|
| 211 | 208 | if ($value instanceof TJavaScriptLiteral) |
| 212 | 209 | return $value->toJavaScriptLiteral(); |
| 213 | 210 | else |
@@ -80,12 +80,10 @@ discard block |
||
| 80 | 80 | $name=urlencode($name.'[]'); |
| 81 | 81 | foreach($value as $v) |
| 82 | 82 | $url.=$amp.$name.'='.urlencode($v); |
| 83 | - } |
|
| 84 | - else |
|
| 83 | + } else |
|
| 85 | 84 | $url.=$amp.urlencode($name).'='.urlencode($value); |
| 86 | 85 | } |
| 87 | - } |
|
| 88 | - else |
|
| 86 | + } else |
|
| 89 | 87 | { |
| 90 | 88 | foreach($getItems as $name=>$value) |
| 91 | 89 | { |
@@ -93,8 +91,7 @@ discard block |
||
| 93 | 91 | { |
| 94 | 92 | foreach($value as $v) |
| 95 | 93 | $url.=$amp.$name.'[]='.$v; |
| 96 | - } |
|
| 97 | - else |
|
| 94 | + } else |
|
| 98 | 95 | $url.=$amp.$name.'='.$value; |
| 99 | 96 | } |
| 100 | 97 | } |
@@ -147,14 +144,12 @@ discard block |
||
| 147 | 144 | $getVariables[substr($name,0,$pos)][]=$value; |
| 148 | 145 | else |
| 149 | 146 | $getVariables[$name]=$value; |
| 150 | - } |
|
| 151 | - else |
|
| 147 | + } else |
|
| 152 | 148 | $getVariables[$path]=''; |
| 153 | 149 | } |
| 154 | 150 | } |
| 155 | 151 | return $getVariables; |
| 156 | - } |
|
| 157 | - else |
|
| 152 | + } else |
|
| 158 | 153 | return array(); |
| 159 | 154 | } |
| 160 | 155 | } |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | $status=TPropertyValue::ensureInteger($status); |
| 282 | 282 | if(isset(self::$HTTP_STATUS_CODES[$status])) { |
| 283 | 283 | $this->_reason=self::$HTTP_STATUS_CODES[$status]; |
| 284 | - }else{ |
|
| 284 | + } else{ |
|
| 285 | 285 | if($reason===null || $reason==='') { |
| 286 | 286 | throw new TInvalidDataValueException("response_status_reason_missing"); |
| 287 | 287 | } |
@@ -377,8 +377,7 @@ discard block |
||
| 377 | 377 | { |
| 378 | 378 | foreach($headers as $h) |
| 379 | 379 | header($h); |
| 380 | - } |
|
| 381 | - else |
|
| 380 | + } else |
|
| 382 | 381 | { |
| 383 | 382 | header('Pragma: public'); |
| 384 | 383 | header('Expires: 0'); |
@@ -488,13 +487,11 @@ discard block |
||
| 488 | 487 | { |
| 489 | 488 | $this->_bufferOutput = false; |
| 490 | 489 | ob_end_flush(); |
| 491 | - } |
|
| 492 | - else |
|
| 490 | + } else |
|
| 493 | 491 | ob_flush(); |
| 494 | 492 | flush(); |
| 495 | 493 | } |
| 496 | - } |
|
| 497 | - else |
|
| 494 | + } else |
|
| 498 | 495 | flush(); |
| 499 | 496 | } |
| 500 | 497 | |
@@ -645,8 +642,7 @@ discard block |
||
| 645 | 642 | $cookie->getSecure(), |
| 646 | 643 | $cookie->getHttpOnly() |
| 647 | 644 | ); |
| 648 | - } |
|
| 649 | - else { |
|
| 645 | + } else { |
|
| 650 | 646 | setcookie( |
| 651 | 647 | $cookie->getName(), |
| 652 | 648 | $cookie->getValue(), |
@@ -79,8 +79,7 @@ discard block |
||
| 79 | 79 | foreach($config['json'] as $id => $json) |
| 80 | 80 | $this->_services[$id] = $json; |
| 81 | 81 | } |
| 82 | - } |
|
| 83 | - else |
|
| 82 | + } else |
|
| 84 | 83 | { |
| 85 | 84 | foreach($config->getElementsByTagName('json') as $json) |
| 86 | 85 | { |
@@ -111,14 +110,11 @@ discard block |
||
| 111 | 110 | { |
| 112 | 111 | $properties = isset($serviceConfig['properties'])?$serviceConfig['properties']:array(); |
| 113 | 112 | $this->createJsonResponse($service,$properties,$serviceConfig); |
| 114 | - } |
|
| 115 | - else |
|
| 113 | + } else |
|
| 116 | 114 | throw new TConfigurationException('jsonservice_response_type_invalid',$id); |
| 117 | - } |
|
| 118 | - else |
|
| 115 | + } else |
|
| 119 | 116 | throw new TConfigurationException('jsonservice_class_required',$id); |
| 120 | - } |
|
| 121 | - else |
|
| 117 | + } else |
|
| 122 | 118 | { |
| 123 | 119 | $properties=$serviceConfig->getAttributes(); |
| 124 | 120 | if(($class=$properties->remove('class'))!==null) |
@@ -128,12 +124,10 @@ discard block |
||
| 128 | 124 | $this->createJsonResponse($service,$properties,$serviceConfig); |
| 129 | 125 | else |
| 130 | 126 | throw new TConfigurationException('jsonservice_response_type_invalid',$id); |
| 131 | - } |
|
| 132 | - else |
|
| 127 | + } else |
|
| 133 | 128 | throw new TConfigurationException('jsonservice_class_required',$id); |
| 134 | 129 | } |
| 135 | - } |
|
| 136 | - else |
|
| 130 | + } else |
|
| 137 | 131 | throw new THttpException(404,'jsonservice_provider_unknown',$id); |
| 138 | 132 | } |
| 139 | 133 | |