@@ -84,11 +84,10 @@ function jsonentity($adif) {
8484 echo json_encode ($ return , JSON_PRETTY_PRINT );
8585 }
8686
87- function json ($ tempcallsign , $ temptype , $ tempband , $ tempmode , $ tempstation_id = null ) {
87+ function json ($ tempcallsign , $ tempband , $ tempmode , $ tempstation_id = null ) {
8888 session_write_close ();
8989 // Cleaning for security purposes
9090 $ callsign = $ this ->security ->xss_clean ($ tempcallsign );
91- $ type = $ this ->security ->xss_clean ($ temptype );
9291 $ band = $ this ->security ->xss_clean ($ tempband );
9392 $ mode = $ this ->security ->xss_clean ($ tempmode );
9493 $ station_id = $ this ->security ->xss_clean ($ tempstation_id );
@@ -152,8 +151,8 @@ function json($tempcallsign, $temptype, $tempband, $tempmode, $tempstation_id =
152151 $ return ['qsl_manager ' ] = $ this ->nval ($ callbook ['qslmgr ' ] ?? '' , $ this ->logbook_model ->call_qslvia ($ callsign ));
153152 $ return ['callsign_state ' ] = $ this ->nval ($ callbook ['state ' ] ?? '' , $ this ->logbook_model ->call_state ($ callsign ));
154153 $ return ['callsign_us_county ' ] = $ this ->nval ($ callbook ['us_county ' ] ?? '' , $ this ->logbook_model ->call_us_county ($ callsign ));
155- $ return ['workedBefore ' ] = $ this ->worked_grid_before ($ return ['callsign_qra ' ], $ type , $ band , $ mode );
156- $ return ['confirmed ' ] = $ this ->confirmed_grid_before ($ return ['callsign_qra ' ], $ type , $ band , $ mode );
154+ $ return ['workedBefore ' ] = $ this ->worked_grid_before ($ return ['callsign_qra ' ], $ band , $ mode );
155+ $ return ['confirmed ' ] = $ this ->confirmed_grid_before ($ return ['callsign_qra ' ], $ band , $ mode );
157156 $ return ['timesWorked ' ] = $ this ->logbook_model ->times_worked ($ lookupcall );
158157
159158 if ($ this ->session ->userdata ('user_show_profile_image ' )) {
@@ -201,7 +200,7 @@ function nval($val1, $val2) {
201200 return (($ val2 ?? "" ) === "" ? ($ val1 ?? "" ) : ($ val2 ?? "" ));
202201 }
203202
204- function confirmed_grid_before ($ gridsquare , $ type , $ band , $ mode ) {
203+ function confirmed_grid_before ($ gridsquare , $ band , $ mode ) {
205204 if (strlen ($ gridsquare ) < 4 )
206205 return false ;
207206
@@ -235,7 +234,7 @@ function confirmed_grid_before($gridsquare, $type, $band, $mode) {
235234 }
236235
237236
238- if ($ type == "SAT " ) {
237+ if ($ band == "SAT " ) {
239238 $ this ->db ->where ('COL_PROP_MODE ' , 'SAT ' );
240239 if ($ extrawhere != '' ) {
241240 $ this ->db ->where ('( ' .$ extrawhere .') ' );
@@ -270,7 +269,7 @@ function confirmed_grid_before($gridsquare, $type, $band, $mode) {
270269 return false ;
271270 }
272271
273- function worked_grid_before ($ gridsquare , $ type , $ band , $ mode )
272+ function worked_grid_before ($ gridsquare , $ band , $ mode )
274273 {
275274 if (strlen ($ gridsquare ) < 4 )
276275 return false ;
@@ -279,7 +278,7 @@ function worked_grid_before($gridsquare, $type, $band, $mode)
279278 $ logbooks_locations_array = $ this ->logbooks_model ->list_logbook_relationships ($ this ->session ->userdata ('active_station_logbook ' ));
280279
281280 if (!empty ($ logbooks_locations_array )) {
282- if ($ type == "SAT " ) {
281+ if ($ band == "SAT " ) {
283282 $ this ->db ->where ('COL_PROP_MODE ' , 'SAT ' );
284283 } else {
285284 $ this ->db ->where ('COL_MODE ' , $ this ->logbook_model ->get_main_mode_from_mode ($ mode ));
0 commit comments