mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
Merge branch 'fabrixxm-master'
Conflicts: boot.php
This commit is contained in:
commit
26cc2e02fe
16 changed files with 213 additions and 99 deletions
27
boot.php
27
boot.php
|
@ -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));
|
||||
}}
|
||||
|
||||
}}
|
Loading…
Add table
Add a link
Reference in a new issue