if (!empty($opts['old'])) {
$opts['list'] = 1; // force listing..
}
+
$this->force = empty($opts['force']) ? 0 : 1;
+ if (!empty($opts['send-to'])) {
+ $this->send_to = $opts['send-to'];
+ }
+
$w = DB_DataObject::factory($this->table);
$cwd = $sn[0] == '/' ? dirname($sn) : dirname(realpath(getcwd() . $sn)); // same as run on.. (so script should end up being same relatively..)
$app = $cwd . '/' . basename($_SERVER["SCRIPT_NAME"]) . ' ' . $this->target . '/'. $id;
+ if ($this->force) {
+ $app .= ' -f';
+ }
+ if (!empty($this->send_to)) {
+ $app .= ' --sent-to='.escapeshellarg($this->send_to);
+ }
$cmd = $php . ' ' . $app. ' &';
+
echo $cmd . "\n";
$pipe = array();
$p = proc_open($cmd, $descriptorspec, $pipes, $cwd );