From 755c2245e8184ceee2ba3382e4f60143da31e6df Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 23 Feb 2011 15:16:12 -0800 Subject: move php path setting inside proc_run --- mod/photos.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'mod/photos.php') diff --git a/mod/photos.php b/mod/photos.php index d4835ba5e..bd48cfc9f 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -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'] .= '' . xmlify('' . "\n" . '') . ''; $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"); } } -- cgit v1.2.3