@@ -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 | } |
@@ -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 | |