@@ -253,11 +253,9 @@ function fileToTempTable(string $tableName, $file, $fields, $fileSize, string $p
253
253
254
254
// Process the class file
255
255
function procClassArray (array $ lineSplit ): array {
256
- // Escape class title, description, and course number (since it needs to be trimmed)
257
- $ lineSplit [6 ] = $ this ->dbConn ->real_escape_string (trim ($ lineSplit [6 ]));
258
- $ lineSplit [7 ] = $ this ->dbConn ->real_escape_string ($ lineSplit [7 ]);
259
- $ lineSplit [8 ] = $ this ->dbConn ->real_escape_string (trim ($ lineSplit [8 ]));
260
- $ lineSplit [23 ] = $ this ->dbConn ->real_escape_string ($ lineSplit [23 ]);
256
+ // Trim course number and topic
257
+ $ lineSplit [6 ] = trim ($ lineSplit [6 ]);
258
+ $ lineSplit [8 ] = trim ($ lineSplit [8 ]);
261
259
262
260
// Grab the integer credit count (they give it to us as a decimal)
263
261
preg_match ('/(\d)+\.\d\d/ ' , $ lineSplit [11 ], $ match );
@@ -287,10 +285,6 @@ function procMeetArray(array $lineSplit) {
287
285
}
288
286
289
287
function procInstrArray (array $ lineSplit ): array {
290
- // Escape the instructor names
291
- $ lineSplit [6 ] = mysqli_real_escape_string ($ this ->dbConn , $ lineSplit [6 ]);
292
- $ lineSplit [7 ] = mysqli_real_escape_string ($ this ->dbConn , $ lineSplit [7 ]);
293
-
294
288
// Section number needs to be padded to at lease 2 digits
295
289
$ lineSplit [4 ] = str_pad ($ lineSplit [4 ], 2 , '0 ' , STR_PAD_LEFT );
296
290
return $ lineSplit ;
0 commit comments