summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEudyptula <eitan@mosenkis.net>2009-07-27 12:00:35 -0400
committerEudyptula <eitan@mosenkis.net>2009-07-27 12:00:35 -0400
commit809b4020f160fb89449256b631581ddd84d3b031 (patch)
tree3854ccc540aeac39733ed4f818322b7f084704db /shared/classes/task.php
parentReorganized log URLs; little update to routing.csv format (diff)
downloadingenue-809b4020f160fb89449256b631581ddd84d3b031.tar.gz
ingenue-809b4020f160fb89449256b631581ddd84d3b031.tar.bz2
ingenue-809b4020f160fb89449256b631581ddd84d3b031.zip
Remove pointless links from tasks, builds; Log env fed to tasks; Add masked indicator back to package selection
Diffstat (limited to 'shared/classes/task.php')
-rw-r--r--shared/classes/task.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/shared/classes/task.php b/shared/classes/task.php
index 1112b0a..cdcd15c 100644
--- a/shared/classes/task.php
+++ b/shared/classes/task.php
@@ -28,6 +28,9 @@ class sql_task extends sql_row_obj {
'command' => array (
'type' => 'TEXT'
),
+ 'env' => array (
+ 'type' => 'TEXT'
+ ),
'start' => array (
'type' => 'INT',
'length' => 10,
@@ -45,7 +48,9 @@ class sql_task extends sql_row_obj {
);
function display() {
- $html='<div class="task"><div class="description">'.htmlentities($this->description).'</div><div class="info">[<a href="'.url("build/$this->build/$this->order").'">log</a>] '.($this->command?'<span class="command">'.htmlentities($this->command).'</span> ':'');
+ global $S;
+ $link="build/$this->build/$this->order";
+ $html='<div class="task"><div class="description">'.htmlentities($this->description).'</div><div class="info">'.($S['request'] == $link || strpos($S['request'], "$link/") === 0?'':'[<a href="'.url($link).'">log</a>] ').($this->command?'<span class="command"'.($this->env?' title="'.htmlentities(str_replace("\n", '; ', $this->env)).'"':'').'>'.htmlentities($this->command).'</span> ':'');
if (isset($this->start)) {
if (isset($this->finish)) {
$html.='<span class="status ';
@@ -80,6 +85,13 @@ class sql_task extends sql_row_obj {
} elseif (isset($this->start)) {
throw_exception('task has already executed: start is '.$this->start);
}
+ if (isset($env)) {
+ $str=array();
+ foreach ($env as $name => $val) {
+ $str[]=$name.'='.escapeshellarg($val);
+ }
+ $this->env=implode("\n", $str);
+ }
$this->type='exec';
debug('Executing '.$this->command.'...');
$descriptorspec=array(