Commit e5172662 authored by Clément Démoulins's avatar Clément Démoulins
Browse files

Adjust example file to fit new interface.

parent 28c18dc8
......@@ -49,11 +49,6 @@ include_once "inc/demopage.php";
class Example extends DemoPage
// Last execution output. Useful for error handling and/or
// displaying results.
private $last_output;
// Edit inc/config.php to find the new demo id.
public function id()
......@@ -125,10 +120,10 @@ class Example extends DemoPage
// Execution of the demo
protected function exec_($input, $tmpfile)
global $demos_bindir;
// Run the demo
exec("sudo -u webapp /home/lazzara/bin/example {$tmpfile}_orig.png {$tmpfile}.png", $output, $retval);
$this->last_output = $output;
$this->run("$demos_bindir/example", "{$tmpfile}_orig.png {$tmpfile}.png");
// Files to be displayed as results should be returned here.
return Array("{$tmpfile}.png", "{$tmpfile}_orig.png");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment