FIXFILE now implemented

This commit is contained in:
Steven Mondji-Lerider 2013-04-26 15:01:49 +00:00
parent 2a92283fe5
commit 13142812db
1 changed files with 6 additions and 1 deletions

View File

@ -90,7 +90,7 @@ if (file_exists($LOCK_FILE) !== false){
$params=unserialize($c["parameters"]);
// We can resume these types of action, so we reset the job to process it later
d("Previous job was the n°".$c["id"]." : '".$c["type"]."'");
if($c["type"] == "CREATE_FILE" && is_dir(dirname($params["file"])) || $c["type"] == "CREATE_DIR" || $c["type"] == "DELETE" || $c["type"] == "FIXDIR"){
if($c["type"] == "CREATE_FILE" && is_dir(dirname($params["file"])) || $c["type"] == "CREATE_DIR" || $c["type"] == "DELETE" || $c["type"] == "FIXDIR" || $c["type"] == "FIXFILE"){
d("Reset of the job! So it will be resumed...");
$action->reset_job($c["id"]);
}else{
@ -157,6 +157,11 @@ while ($rr=$action->get_action()){
if($code!=0)
$output[0]="Fixperms.sh failed, returned error code : $code";
break;
case "FIXFILE" :
@exec("$SU $FIXPERM -f ".$params["file"]." 2>&1", $trash, $code);
if($code!=0)
$output[0]="Fixperms.sh failed, returned error code : $code";
break;
default :
$output=array("Fail: Sorry dude, i do not know this type of action");
break;