@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 | /** |
| 202 | - * @return boolean true to post the inputs of the form on callback, default |
|
| 202 | + * @return string true to post the inputs of the form on callback, default |
|
| 203 | 203 | * is post the inputs on callback. |
| 204 | 204 | */ |
| 205 | 205 | public function getPostState() |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | /** |
| 220 | - * @return integer callback request timeout. |
|
| 220 | + * @return string callback request timeout. |
|
| 221 | 221 | */ |
| 222 | 222 | public function getRequestTimeOut() |
| 223 | 223 | { |
@@ -261,6 +261,7 @@ discard block |
||
| 261 | 261 | * update. This will automatically set HasPrority to true. |
| 262 | 262 | * @param boolean true enables the callback response to update the |
| 263 | 263 | * viewstate. |
| 264 | + * @param boolean $value |
|
| 264 | 265 | */ |
| 265 | 266 | public function setEnablePageStateUpdate($value) |
| 266 | 267 | { |
@@ -269,7 +270,7 @@ discard block |
||
| 269 | 270 | } |
| 270 | 271 | |
| 271 | 272 | /** |
| 272 | - * @return boolean client-side viewstate will be updated on callback |
|
| 273 | + * @return boolean|string client-side viewstate will be updated on callback |
|
| 273 | 274 | * response if true. Default is true. |
| 274 | 275 | */ |
| 275 | 276 | public function getEnablePageStateUpdate() |
@@ -252,8 +252,9 @@ discard block |
||
| 252 | 252 | public function setHasPriority($value) |
| 253 | 253 | { |
| 254 | 254 | // mimic the old behavior |
| 255 | - if(!$value) |
|
| 256 | - $this->setEnablePageStateUpdate(false); |
|
| 255 | + if(!$value) { |
|
| 256 | + $this->setEnablePageStateUpdate(false); |
|
| 257 | + } |
|
| 257 | 258 | } |
| 258 | 259 | |
| 259 | 260 | /** |
@@ -291,8 +292,9 @@ discard block |
||
| 291 | 292 | */ |
| 292 | 293 | public function setPostBackTarget($value) |
| 293 | 294 | { |
| 294 | - if($value instanceof TControl) |
|
| 295 | - $value = $value->getUniqueID(); |
|
| 295 | + if($value instanceof TControl) { |
|
| 296 | + $value = $value->getUniqueID(); |
|
| 297 | + } |
|
| 296 | 298 | $this->setOption('EventTarget', $value); |
| 297 | 299 | } |
| 298 | 300 | |
@@ -528,7 +528,9 @@ discard block |
||
| 528 | 528 | function _read() |
| 529 | 529 | { |
| 530 | 530 | $fp = @fopen($this->_file, "rb"); |
| 531 | - if ($this->_fileLocking) @flock($fp, LOCK_SH); |
|
| 531 | + if ($this->_fileLocking) { |
|
| 532 | + @flock($fp, LOCK_SH); |
|
| 533 | + } |
|
| 532 | 534 | if ($fp) { |
| 533 | 535 | // because the filesize can be cached by PHP itself... |
| 534 | 536 | clearstatcache(); |
@@ -538,7 +540,9 @@ discard block |
||
| 538 | 540 | $length = $length - 32; |
| 539 | 541 | } |
| 540 | 542 | $data = @fread($fp, $length); |
| 541 | - if ($this->_fileLocking) @flock($fp, LOCK_UN); |
|
| 543 | + if ($this->_fileLocking) { |
|
| 544 | + @flock($fp, LOCK_UN); |
|
| 545 | + } |
|
| 542 | 546 | @fclose($fp); |
| 543 | 547 | if ($this->_readControl) { |
| 544 | 548 | $hashData = $this->_hash($data, $this->_readControlType); |
@@ -564,13 +568,17 @@ discard block |
||
| 564 | 568 | { |
| 565 | 569 | $fp = @fopen($this->_file, "wb"); |
| 566 | 570 | if ($fp) { |
| 567 | - if ($this->_fileLocking) @flock($fp, LOCK_EX); |
|
| 571 | + if ($this->_fileLocking) { |
|
| 572 | + @flock($fp, LOCK_EX); |
|
| 573 | + } |
|
| 568 | 574 | if ($this->_readControl) { |
| 569 | 575 | @fwrite($fp, $this->_hash($data, $this->_readControlType), 32); |
| 570 | 576 | } |
| 571 | 577 | $len = strlen($data); |
| 572 | 578 | @fwrite($fp, $data, $len); |
| 573 | - if ($this->_fileLocking) @flock($fp, LOCK_UN); |
|
| 579 | + if ($this->_fileLocking) { |
|
| 580 | + @flock($fp, LOCK_UN); |
|
| 581 | + } |
|
| 574 | 582 | @fclose($fp); |
| 575 | 583 | return true; |
| 576 | 584 | } |