From: Fabrixxm Date: Mon, 5 Nov 2012 08:37:58 +0000 (+0100) Subject: Merge remote-tracking branch 'remotes/friendica/master' into moveme X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5b4944fe8e951776542a0401a6766e92ff384020;p=friendica.git Merge remote-tracking branch 'remotes/friendica/master' into moveme --- 5b4944fe8e951776542a0401a6766e92ff384020 diff --cc boot.php index 71304e53e2,2628c0f3f1..cd309d8655 --- a/boot.php +++ b/boot.php @@@ -1505,20 -1501,14 +1505,20 @@@ if(! function_exists('proc_run')) if(count($args) && $args[0] === 'php') $args[0] = ((x($a->config,'php_path')) && (strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); - for($x = 0; $x < count($args); $x ++) + + // add baseurl to args. cli scripts can't construct it + $args[] = $a->get_baseurl(); + + for($x = 0; $x < count($args); $x ++) $args[$x] = escapeshellarg($args[$x]); + + $cmdline = implode($args," "); if(get_config('system','proc_windows')) - proc_close(proc_open('cmd /c start /b ' . $cmdline,array(),$foo)); + proc_close(proc_open('cmd /c start /b ' . $cmdline,array(),$foo,dirname(__FILE__))); else - proc_close(proc_open($cmdline." &",array(),$foo)); + proc_close(proc_open($cmdline." &",array(),$foo,dirname(__FILE__))); } } diff --cc include/notifier.php index c78d2f1a76,a999c3297b..c58a8a854f --- a/include/notifier.php +++ b/include/notifier.php @@@ -134,13 -134,22 +134,26 @@@ function notifier_run(&$argv, &$argc) $recipients[] = $suggest[0]['cid']; $item = $suggest[0]; } + elseif($cmd === 'removeme') { + $r = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1", intval($item_id)); + $user = $r[0]; + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1", intval($item_id)); + $self = $r[0]; + $r = q("SELECT * FROM `contact` WHERE `self` = 0 AND `uid` = %d", intval($item_id)); + if(! count($r)) + return; + require_once('include/Contact.php'); + foreach($r as $contact) { + terminate_friendship($user, $self, $contact); + } + return; + } + elseif($cmd === 'relocate') { + $normal_mode = false; + $relocate = true; + $uid = $item_id; + } else { -- // find ancestors $r = q("SELECT * FROM `item` WHERE `id` = %d and visible = 1 and moderated = 0 LIMIT 1", intval($item_id)