|  | @@ -404,8 +404,8 @@ function tripal_bulk_loader_progess_file_get_progress($job_id, $update_progress
 | 
											
												
													
														|  |      return (object) array();
 |  |      return (object) array();
 | 
											
												
													
														|  |    }
 |  |    }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -  $num_lines = trim(`wc --lines < $filename`);
 |  | 
 | 
											
												
													
														|  | -  $num_records = trim(`grep -o "." $filename | wc --lines`);
 |  | 
 | 
											
												
													
														|  | 
 |  | +  $num_lines = trim(shell_exec('wc --lines < ' . escapeshellarg($filename)));
 | 
											
												
													
														|  | 
 |  | +  $num_records = trim(shell_exec('grep -o "." ' . escapeshellarg($filename) . ' | wc --lines'));
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |    $job = db_query("SELECT j.*, b.file, b.file_has_header, c.num as num_constant_sets
 |  |    $job = db_query("SELECT j.*, b.file, b.file_has_header, c.num as num_constant_sets
 | 
											
												
													
														|  |                                FROM {tripal_jobs} j
 |  |                                FROM {tripal_jobs} j
 | 
											
										
											
												
													
														|  | @@ -423,7 +423,7 @@ function tripal_bulk_loader_progess_file_get_progress($job_id, $update_progress
 | 
											
												
													
														|  |      if ($job->num_constant_sets != $num_constant_sets_loaded) {
 |  |      if ($job->num_constant_sets != $num_constant_sets_loaded) {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |        // total lines in input file
 |  |        // total lines in input file
 | 
											
												
													
														|  | -      $total_lines = trim(`wc --lines < $job->file`);
 |  | 
 | 
											
												
													
														|  | 
 |  | +      $total_lines = trim(shell_exec('wc --lines < ' . escapeshellarg($job->file)));
 | 
											
												
													
														|  |        if ($job->file_has_header) {
 |  |        if ($job->file_has_header) {
 | 
											
												
													
														|  |          $total_lines--;
 |  |          $total_lines--;
 | 
											
												
													
														|  |        }
 |  |        }
 |