Correction vérification format 'local-data'
This commit is contained in:
parent
955161ba26
commit
c4e2356877
22
automate.php
22
automate.php
|
@ -71,20 +71,20 @@
|
|||
/* [3] Test de la vérification du format de fichier pour l'upload
|
||||
=========================================================*/
|
||||
?>
|
||||
<!-- <form action='' method='POST' enctype='multipart/form-data'>
|
||||
<form action='' method='POST' enctype='multipart/form-data'>
|
||||
<input type='file' name='file'>
|
||||
<input type='submit' value='Upload'>
|
||||
</form> -->
|
||||
</form>
|
||||
<?php
|
||||
// var_dump($_FILES);
|
||||
//
|
||||
// if( isset($_FILES) ){
|
||||
//
|
||||
// $request = new ModuleRequest('upload/call_log', array('phone_number'=>'01 02 03 04 05') );
|
||||
// $response = $request->dispatch();
|
||||
// var_dump( ManagerError::explicit($response->error) );
|
||||
//
|
||||
// }
|
||||
var_dump($_FILES);
|
||||
|
||||
if( isset($_FILES) ){
|
||||
|
||||
$request = new ModuleRequest('upload/local_data',array() );
|
||||
$response = $request->dispatch();
|
||||
var_dump( ManagerError::explicit($response->error) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* [4] Test download via AJAX
|
||||
|
|
|
@ -251,10 +251,11 @@
|
|||
|
||||
|
||||
/* (3) Vérification du sujet */
|
||||
$checkSubject = isset($json['subject']['tmp_id']) && ( is_string($json['subject']['tmp_id']) || is_null($json['subject']['tmp_id']) );
|
||||
$checkSubject = $checkSubject && isset($json['subject']['username']) && is_string($json['subject']['username']);
|
||||
$checkSubject = isset($json['subject']['tmp_id']) && ( is_string($json['subject']['tmp_id']) || is_null($json['subject']['tmp_id']) );
|
||||
$checkSubject = $checkSubject && isset($json['subject']['subject_id']) && is_numeric($json['subject']['subject_id']);
|
||||
|
||||
// Erreur des attributs du sujet incorrects ou manquants
|
||||
var_dump($checkSubject);
|
||||
if( !$checkSubject )
|
||||
return false;
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue