@@ -240,12 +240,7 @@ public function _log($string,$type='info') {
240240 if ($ this ->config ['debug ' ]){
241241 $ string = $ this ->getLogTime ().": " .$ string ;
242242 }
243- if ($ type =='info ' )
244- $ this ->log ->addInfo ($ string );
245- elseif ($ type =='warning ' )
246- $ this ->log ->addWarning ($ string );
247- elseif ($ type =='error ' )
248- $ this ->log ->addError ($ string );
243+ $ this ->log ->log ($ type , $ string );
249244 }
250245
251246 /**
@@ -599,19 +594,19 @@ function ($a, $b) {return $b->getMTime() - $a->getMTime();}
599594 */
600595 public function upload ($ file ,$ path ){
601596 if ( $ this ->validExt ($ file ->getClientOriginalName ())){
602- if ($ file ->getClientSize () > ($ this ->getMaxUploadFileSize () * 1024 * 1024 ) ){
597+ if ($ file ->getSize () > ($ this ->getMaxUploadFileSize () * 1024 * 1024 ) ){
603598
604- $ result = array ("query " =>"BE_UPLOAD_FILE_SIZE_NOT_SERVER " ,"params " =>array ($ file ->getClientSize ()));
599+ $ result = array ("query " =>"BE_UPLOAD_FILE_SIZE_NOT_SERVER " ,"params " =>array ($ file ->getSize ()));
605600 $ this ->setInfo (array ("msg " =>$ result ));
606601
607- if ( $ this ->config ['debug ' ] ) $ this ->_log (__METHOD__ ." - file size no permitido server: " .$ file ->getClientSize ());
602+ if ( $ this ->config ['debug ' ] ) $ this ->_log (__METHOD__ ." - file size no permitido server: " .$ file ->getSize ());
608603 return ;
609- }elseif ($ file ->getClientSize () > ($ this ->config ['upload ' ]['size_max ' ] * 1024 * 1024 ) ){
604+ }elseif ($ file ->getSize () > ($ this ->config ['upload ' ]['size_max ' ] * 1024 * 1024 ) ){
610605
611- $ result = array ("query " =>"BE_UPLOAD_FILE_SIZE_NOT_PERMITIDO " ,"params " =>array ($ file ->getClientSize ()));
606+ $ result = array ("query " =>"BE_UPLOAD_FILE_SIZE_NOT_PERMITIDO " ,"params " =>array ($ file ->getSize ()));
612607 $ this ->setInfo (array ("msg " =>$ result ));
613608
614- if ( $ this ->config ['debug ' ] ) $ this ->_log (__METHOD__ ." - file size no permitido: " .$ file ->getClientSize ());
609+ if ( $ this ->config ['debug ' ] ) $ this ->_log (__METHOD__ ." - file size no permitido: " .$ file ->getSize ());
615610 return ;
616611 }else {
617612 if ($ file ->isValid ()){
@@ -1033,4 +1028,4 @@ public function run(){
10331028 return $ jsonResponse ->sendContent ();
10341029 }
10351030}
1036- ?>
1031+ ?>
0 commit comments