Correction vérification format 'local-data'

This commit is contained in:
xdrm-brackets 2016-05-30 12:30:35 +02:00
parent 955161ba26
commit c4e2356877
3 changed files with 15 additions and 14 deletions

View File

@ -71,20 +71,20 @@
/* [3] Test de la vérification du format de fichier pour l'upload /* [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='file' name='file'>
<input type='submit' value='Upload'> <input type='submit' value='Upload'>
</form> --> </form>
<?php <?php
// var_dump($_FILES); var_dump($_FILES);
//
// if( isset($_FILES) ){ if( isset($_FILES) ){
//
// $request = new ModuleRequest('upload/call_log', array('phone_number'=>'01 02 03 04 05') ); $request = new ModuleRequest('upload/local_data',array() );
// $response = $request->dispatch(); $response = $request->dispatch();
// var_dump( ManagerError::explicit($response->error) ); var_dump( ManagerError::explicit($response->error) );
//
// } }
/* [4] Test download via AJAX /* [4] Test download via AJAX

View File

@ -251,10 +251,11 @@
/* (3) Vérification du sujet */ /* (3) Vérification du sujet */
$checkSubject = isset($json['subject']['tmp_id']) && ( is_string($json['subject']['tmp_id']) || is_null($json['subject']['tmp_id']) ); $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 = $checkSubject && isset($json['subject']['subject_id']) && is_numeric($json['subject']['subject_id']);
// Erreur des attributs du sujet incorrects ou manquants // Erreur des attributs du sujet incorrects ou manquants
var_dump($checkSubject);
if( !$checkSubject ) if( !$checkSubject )
return false; return false;

File diff suppressed because one or more lines are too long