com web/doc-editor: Fix error when we use read method from the update_data tools: php/File.php
| From: | Yannick Torres | Date: | Wed, 23 Jan 2013 20:32:49 +0000 |
| Subject: | com web/doc-editor: Fix error when we use read method from the update_data tools: php/File.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-10959@lists.php.net to get a copy of this message | ||
Commit: 63c8842543f6e6e2238e666063e850c8f0568777
Author: Yannick Torrès <yannick.torres@gmail.com> Wed, 23 Jan 2013 21:32:49 +0100
Parents: 2a0bbf4c9b690d6ad643bc35c5002cc2af5e34ef
Branches: master
Link: http://git.php.net/?p=web/doc-editor.git;a=commitdiff;h=63c8842543f6e6e2238e666063e850c8f0568777
Log:
Fix error when we use read method from the update_data tools
Changed paths:
M php/File.php
Diff:
diff --git a/php/File.php b/php/File.php
index c0a09da..faa0529 100644
--- a/php/File.php
+++ b/php/File.php
@@ -162,9 +162,13 @@ class File
*/
public function read($readOriginal=false)
{
- $isModified = $this->isModified();
- $isModified = (bool) $isModified;
-
+ if( $readOriginal ) {
+ $isModified = false;
+ } else {
+ $isModified = $this->isModified();
+ $isModified = (bool) $isModified;
+ }
+
$path = ($readOriginal || !$isModified)
? $this->full_path
: $this->full_new_path;