@@ -87,19 +87,19 @@ public function getFields()
8787 public function upload ($ name )
8888 {
8989 if (!isset ($ _FILES [$ name ]) || $ _FILES [$ name ]['error ' ]) {
90- throw new waException (_ ("Error uploading file " ));
90+ throw new waException (_ws ("Error uploading file " ));
9191 }
9292
9393 $ file_info = explode (". " , $ _FILES [$ name ]['name ' ]);
9494 if (!in_array (strtolower (end ($ file_info )), $ this ->extensions )) {
95- throw new waException (_ ("Unknown extension *. " ).end ($ file_info ));
95+ throw new waException (_ws ("Unknown extension *. " ).end ($ file_info ));
9696 }
9797
9898 $ file = uniqid ("csv " ).".csv " ;
9999 if (move_uploaded_file ($ _FILES [$ name ]['tmp_name ' ], $ this ->getPath ($ file ))) {
100100 $ this ->file = $ this ->getPath ($ file );
101101 } else {
102- throw new waException (_ ('Error moving file ' ));
102+ throw new waException (_ws ('Error moving file ' ));
103103 }
104104 return $ file ;
105105 }
@@ -116,7 +116,7 @@ public function saveContent($content)
116116 if (file_put_contents ($ this ->getPath ($ file ), $ content )) {
117117 $ this ->file = $ this ->getPath ($ file );
118118 } else {
119- throw new waException (_ ('Error moving file ' ));
119+ throw new waException (_ws ('Error moving file ' ));
120120 }
121121 return $ file ;
122122 }
@@ -134,11 +134,11 @@ public function saveContent($content)
134134 public function getInfo ()
135135 {
136136 if (!$ this ->file || !file_exists ($ this ->file )) {
137- throw new waException (_ ('File does not exist ' ));
137+ throw new waException (_ws ('File does not exist ' ));
138138 }
139139 $ h = fopen ($ this ->file , "r " );
140140 if (!$ h ) {
141- throw new waException (_ ("Error open file " ));
141+ throw new waException (_ws ("Error open file " ));
142142 }
143143 // Read the first string
144144 $ string = fgets ($ h , $ this ->length );
@@ -248,7 +248,7 @@ public function import($limit = 50)
248248 if (!$ this ->handler ) {
249249 $ this ->handler = fopen ($ this ->file , "r " );
250250 if (!$ this ->handler ) {
251- throw new waException (_ ("Error open file " ));
251+ throw new waException (_ws ("Error open file " ));
252252 }
253253 if (!$ this ->first_line ) {
254254 $ fields = $ this ->encodeArray (fgetcsv ($ this ->handler , $ this ->length , $ this ->delimiter ));
0 commit comments