Jad Meouchy 9 лет назад
Родитель
Сommit
9654c0951d
1 измененных файлов с 5 добавлено и 4 удалено
  1. 5 4
      cron/filescanner.php

+ 5 - 4
cron/filescanner.php

@@ -89,7 +89,7 @@ function processFile($full_path, $id_company)
 	if(!file_exists($full_path))
 	{
 		echo "file doesn't exist" . PHP_EOL;
-		return;
+		return false;
 	}
 	
 	
@@ -142,7 +142,7 @@ function processFile($full_path, $id_company)
 		{
 			echo "PDO::errorInfo():" . PHP_EOL;
 			print_r($dbh->errorInfo());
-			return;
+			return false;
 		}
 		
 		$id_file = $dbh->lastInsertId();
@@ -178,7 +178,7 @@ function processFile($full_path, $id_company)
 	{
 		echo "PDO::errorInfo():" . PHP_EOL;
 		print_r($dbh->errorInfo());
-		return;
+		return false;
 	}
 	
 	
@@ -314,7 +314,6 @@ function processFile($full_path, $id_company)
 	
 	
 	//update the final status
-	
 	$stmt_file_status = $dbh->prepare("UPDATE file SET
 										num_rows = :num_rows,
 										num_ok = :num_ok,
@@ -332,6 +331,8 @@ function processFile($full_path, $id_company)
 	
 	$stmt_file_status->execute($params);
 	
+	
+	return true;
 }
 
 ?>