Merge branch 'fabrixxm-master'

Conflicts:
	boot.php
This commit is contained in:
Friendika 2011-01-28 18:50:20 -08:00
commit 26cc2e02fe
16 changed files with 213 additions and 99 deletions

View file

@ -1655,7 +1655,6 @@ function attribute_contains($attr,$s) {
if(! function_exists('logger')) {
function logger($msg,$level = 0) {
$debugging = get_config('system','debugging');
$loglevel = intval(get_config('system','loglevel'));
$logfile = get_config('system','logfile');
@ -2225,7 +2224,31 @@ function prepare_body($item) {
$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));
}}
}}