From: Friendika Date: Sat, 29 Jan 2011 02:50:20 +0000 (-0800) Subject: Merge branch 'fabrixxm-master' X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=26cc2e02fe6e075cd35a3069edbc006219f5b435;p=friendica.git Merge branch 'fabrixxm-master' Conflicts: boot.php --- 26cc2e02fe6e075cd35a3069edbc006219f5b435 diff --cc boot.php index 3cc98cc9b6,d3187648c7..223c9416d1 --- a/boot.php +++ b/boot.php @@@ -2217,15 -2216,29 +2216,39 @@@ function link_compare($a,$b) }} +if(! function_exists('prepare_body')) { +function prepare_body($item) { + + require_once('include/bbcode.php'); + + $s = smilies(bbcode($item['body'])); + + return $s; ++}} + + /** + * + * Wrap calls to proc_close(proc_open()) and call hook + * so plugins can take part in process :) + * + * args: + * $cmd program to run + * next args are passed as $cmd command line + * + * e.g.: proc_run("ls","-la","/tmp"); + * + * $cmd and string args are surrounded with "" + */ + + if(! function_exists('run_proc')) { + function proc_run($cmd){ + $args = func_get_args(); + call_hooks("proc_run", $args); + + foreach ($args as &$arg){ + if(is_string($arg)) $arg='"'.$arg.'"'; + } + $cmdline = implode($args," "); + proc_close(proc_open($cmdline." &",array(),$foo)); + }} - }} -?>