move php path setting inside proc_run

This commit is contained in:
Friendika 2011-02-23 15:16:12 -08:00
commit 755c2245e8
16 changed files with 25 additions and 67 deletions

View file

@ -182,13 +182,11 @@ foreach($_FILES AS $key => $val) {
);
$drop_id = intval($rr['id']);
$php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
// send the notification upstream/downstream as the case may be
if($rr['visible'])
//proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"drop\" \"$drop_id\" & ",array(),$foo));
proc_run($php_path,"include/notifier.php","drop","$drop_id");
proc_run('php',"include/notifier.php","drop","$drop_id");
}
}
}
@ -232,11 +230,9 @@ foreach($_FILES AS $key => $val) {
$url = $a->get_baseurl();
$drop_id = intval($i[0]['id']);
$php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
if($i[0]['visible'])
//proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"drop\" \"$drop_id\" & ", array(),$foo));
proc_run($php_path,"include/notifier.php","drop","$drop_id");
proc_run('php',"include/notifier.php","drop","$drop_id");
}
}
@ -474,9 +470,8 @@ foreach($_FILES AS $key => $val) {
$arr['target'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . $a->get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . '" />' . "\n" . '<link rel="preview" type="image/jpeg" href="' . $a->get_baseurl() . "/photo/" . $p[0]['resource-id'] . '-' . $best . '.jpg' . '" />') . '</link></target>';
$item_id = item_store($arr);
$php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
//proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"tag\" \"$item_id\" & ",array(),$foo));
proc_run($php_path,"include/notifier.php","tag","$item_id");
if($item_id)
proc_run('php',"include/notifier.php","tag","$item_id");
}
}