svn: /web/doc-editor/trunk/php/ ExtJsController.php PreviewFile.php
| From: | Hannes Magnusson | Date: | Wed, 08 Jun 2011 19:38:42 +0000 |
| Subject: | svn: /web/doc-editor/trunk/php/ ExtJsController.php PreviewFile.php | ||
| Groups: | php.doc.web | ||
| Request: | Send a blank email to doc-web+get-2011@lists.php.net to get a copy of this message | ||
bjori Wed, 08 Jun 2011 19:38:42 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=311941
Log:
Add all these shell commands and output as a debug info in the returned json
Changed paths:
U web/doc-editor/trunk/php/ExtJsController.php
U web/doc-editor/trunk/php/PreviewFile.php
Modified: web/doc-editor/trunk/php/ExtJsController.php
===================================================================
--- web/doc-editor/trunk/php/ExtJsController.php 2011-06-08 19:21:16 UTC (rev 311940)
+++ web/doc-editor/trunk/php/ExtJsController.php 2011-06-08 19:38:42 UTC (rev 311941)
@@ -2168,7 +2168,14 @@
return JsonResponseBuilder::success(
array(
'url' => $preview->getPreviewUrl(),
- 'buildCmd' => $preview->getBuildCmd()
+ 'log' => array(
+ 'buildCmd' => $preview->getBuildCmd()
+ 'buildLog' => $preview->buildLog,
+ 'moveCmd' => $preview->moveCmd,
+ 'moveLog' => $preview->moveLog,
+ 'cleanCmd' => $preview->cleanCmd,
+ 'cleanLog' => $preview->cleanLog,
+ ),
)
);
Modified: web/doc-editor/trunk/php/PreviewFile.php
===================================================================
--- web/doc-editor/trunk/php/PreviewFile.php 2011-06-08 19:21:16 UTC (rev 311940)
+++ web/doc-editor/trunk/php/PreviewFile.php 2011-06-08 19:38:42 UTC (rev 311941)
@@ -63,7 +63,9 @@
// We clean the input output directory
$cmd = 'rm -R '.$this->outputDir.'* ;';
- exec("$cmd");
+ exec("$cmd", $output);
+ $this->cleanCmd = $cmd;
+ $this->cleanOutput = $output;
$rename = 0;
$t = time();
@@ -76,21 +78,24 @@
// We start the build for this file
$cmd = 'cd '.$appConf[$project]['vcs.path'].';
'.$appConf['GLOBAL_CONFIGURATION']['php.bin'].' doc-base/configure.php
--generate='.$this->path.' ;
'.$appConf['GLOBAL_CONFIGURATION']['php.bin'].' ../phd/render.php
--package PHP --format php --memoryindex -d doc-base/.manual.xml --output
'.$this->outputDir;
- exec("$cmd");
+ exec("$cmd", $output);
+ $this->buildCmd = $cmd;
+ $this->buildLog = $output;
+
// Rename it back
if ($rename) {
rename($this->fullPath, $this->fullPath . '.new');
rename($this->fullPath . $t, $this->fullPath);
}
- $this->buildCmd = $cmd;
// Only move the specific file we are generating
$xmlID = $this->getOutputId();
$filename = 'phdoe-' . time() . '-' . $xmlID. '.php';
$cmd = 'mv '.$this->outputDir.'php-web/'.$xmlID.'.php
'.$this->inputDir. $filename;
- exec("$cmd");
+ exec("$cmd", $output);
$this->moveCmd = $cmd;
+ $this->moveLog = $output;
$this->previewUrl =
$this->am->appConf[$this->am->project]['preview.baseURI'].'manual/en/'
. $filename;