svn: /web/doc-editor/trunk/php/ PreviewFile.php

[email protected] (Hannes Magnusson)
Newsgroups php.doc.web
Message-ID <[email protected]>
bjori                                    Wed, 08 Jun 2011 19:21:16 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=311940

Log:
whoppsy, this should be fullpath

Changed paths:
    U   web/doc-editor/trunk/php/PreviewFile.php

Modified: web/doc-editor/trunk/php/PreviewFile.php
===================================================================
--- web/doc-editor/trunk/php/PreviewFile.php	2011-06-08 19:18:39 UTC (rev 311939)
+++ web/doc-editor/trunk/php/PreviewFile.php	2011-06-08 19:21:16 UTC (rev 311940)
@@ -32,7 +32,7 @@
         $appConf = $this->am->appConf;
         $project = $this->am->project;

-        $fullPath = $appConf['GLOBAL_CONFIGURATION']['data.path'].$appConf[$project]['vcs.module'].'/'.$this->path;
+        $this->fullPath = $appConf['GLOBAL_CONFIGURATION']['data.path'].$appConf[$project]['vcs.module'].'/'.$this->path;

     }

@@ -68,10 +68,10 @@
         $rename = 0;
         $t = time();
         // We are editing temporary file
-        if( file_exists($fullPath.'.new') ) {
+        if( file_exists($this->fullPath.'.new') ) {
             $rename = 1;
-            rename($this->path, $this->path . $t);
-            rename($this->path .'.new', $this->path);
+            rename($this->fullPath, $this->fullPath . $t);
+            rename($this->fullPath .'.new', $this->fullPath);
         }

         // We start the build for this file
@@ -79,8 +79,8 @@
         exec("$cmd");
         // Rename it back
         if ($rename) {
-            rename($this->path, $this->path . '.new');
-            rename($this->path . $t, $this->path);
+            rename($this->fullPath, $this->fullPath . '.new');
+            rename($this->fullPath . $t, $this->fullPath);
         }

         $this->buildCmd = $cmd;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.