PHP and Code tidy fixes

This commit is contained in:
SimonFair
2023-10-14 11:31:12 +01:00
parent 5a69f4b8e3
commit e3cbf2309d
5 changed files with 20 additions and 21 deletions
@@ -40,7 +40,7 @@ function execCommand_nchan($command,$idx) {
[$cmd,$args] = explode(' ',$command,2);
write("<p class='logLine'></p>","addLog\0<fieldset class='docker'><legend>"._('Command execution')."</legend>".basename($cmd).' '.str_replace(" -","<br>&nbsp;&nbsp;-",htmlspecialchars($args))."<br><span id='wait-$waitID'>"._('Please wait')." </span><p class='logLine'></p></fieldset>","show_Wait\0$waitID");
write("addLog\0<br>") ;
write("addToID\0$idx\0 $action") ;
#write("addToID\0$idx\0 $action") ;
$proc = popen("$command 2>&1",'r');
while ($out = fgets($proc)) {
$out = preg_replace("%[\t\n\x0B\f\r]+%", '',$out);
@@ -36,7 +36,7 @@ function write(...$messages){
}
curl_close($com);
}
function execCommand_nchan($command,$idx,$refcmd=false) {
function execCommand_nchan_clone($command,$idx,$refcmd=false) {
$waitID = mt_rand();
if ($refcmd) {
[$cmd,$args] = explode(' ',$refcmd,2);