fix systematic failure message: output was never set so this was always setting an error

also do not use the macho 'dude', operator genitalia having very little relevance here
This commit is contained in:
Antoine Beaupr�� 2014-10-14 21:47:20 +00:00
parent 2ac05cfb6f
commit 281edf671d
1 changed files with 2 additions and 7 deletions

View File

@ -264,14 +264,9 @@ while ($rr=$action->get_action()){
}
break;
default :
$output=array("Fail: Sorry dude, i do not know this type of action");
$errorsList[]=array("Fail: Sorry, i do not know this type of action: ". $r['type']);
break;
}
// Get the error (if exists).
if(isset($output[0])){
$return=$output[0];
$errorsList[]="\nAction n°".$r["id"]." '".$r["type"]."' failed! With user: ".$r["user"]."\nHere is the complete output:\n".print_r($output);
}
// We finished the action, notify the DB.
d("Finishing... return value is : $return\n");
if(!$action->finish($r["id"],addslashes($return))){
@ -290,4 +285,4 @@ if(count($errorsList)) {
unlink(ALTERNC_DO_ACTION_LOCK);
// Exit this script
exit(0);
exit(0);