@@ -158,7 +158,7 @@ function edu_api_listview_eventlist() {
158158 $ order = array ();
159159 $ custom_order = explode ( ' ' , $ custom_order_by_order );
160160 foreach ( $ custom_order as $ coVal ) {
161- ! isset ( $ coVal ) || $ coVal === "asc " ? array_push ( $ order , 1 ) : array_push ( $ order , -1 );
161+ ! isset ( $ coVal ) || $ coVal === "asc " ? array_push ( $ order , 1 ) : array_push ( $ order , - 1 );
162162 }
163163 }
164164 } else {
@@ -351,7 +351,7 @@ function edu_api_listview_eventlist_template_A( $data, $request ) {
351351 }
352352
353353 include EDUADMIN_PLUGIN_PATH . '/content/template/listTemplate/blocks/event-block-a.php ' ;
354- $ current_events ++;
354+ $ current_events ++;
355355 }
356356}
357357
@@ -429,7 +429,7 @@ function edu_api_listview_eventlist_template_B( $data, $request ) {
429429 }
430430
431431 include EDUADMIN_PLUGIN_PATH . '/content/template/listTemplate/blocks/event-block-b.php ' ;
432- $ current_events ++;
432+ $ current_events ++;
433433 }
434434}
435435
@@ -482,6 +482,11 @@ function edu_api_eventlist() {
482482 $ events = array ();
483483
484484 foreach ( $ selected_course ['Events ' ] as $ event ) {
485+ if ( ! empty ( $ _POST ['eid ' ] ) ) { // Input var okay.
486+ if ( $ event ['EventId ' ] != $ _POST ['eid ' ] ) { // Input var okay.
487+ continue ;
488+ }
489+ }
485490 $ event ['CourseTemplate ' ] = $ selected_course ;
486491 unset( $ event ['CourseTemplate ' ]['Events ' ] );
487492
@@ -556,7 +561,7 @@ function edu_api_eventlist() {
556561 $ order = array ();
557562 $ custom_order = explode ( ' ' , $ custom_order_by_order );
558563 foreach ( $ custom_order as $ coVal ) {
559- ! isset ( $ coVal ) || $ coVal === "asc " ? array_push ( $ order , 1 ) : array_push ( $ order , -1 );
564+ ! isset ( $ coVal ) || $ coVal === "asc " ? array_push ( $ order , 1 ) : array_push ( $ order , - 1 );
560565 }
561566 }
562567 } else {
@@ -574,7 +579,7 @@ function edu_api_eventlist() {
574579
575580 $ last_city = '' ;
576581
577- $ show_more = ! empty ( $ _POST ['showmore ' ] ) ? $ _POST ['showmore ' ] : -1 ;
582+ $ show_more = ! empty ( $ _POST ['showmore ' ] ) ? $ _POST ['showmore ' ] : - 1 ;
578583 $ spot_left_option = $ _POST ['spotsleft ' ];
579584 $ always_few_spots = $ _POST ['fewspots ' ];
580585 $ show_event_venue = $ _POST ['showvenue ' ];
@@ -590,7 +595,7 @@ function edu_api_eventlist() {
590595 if ( ! empty ( $ prices ) ) {
591596 foreach ( $ events as $ ev ) {
592597 if ( isset ( $ _POST ['eid ' ] ) ) {
593- if ( $ ev ['EventId ' ] !== intval ( $ _POST ['eid ' ] ) ) {
598+ if ( $ ev ['EventId ' ] != intval ( $ _POST ['eid ' ] ) ) {
594599 continue ;
595600 }
596601 }
@@ -611,7 +616,7 @@ function edu_api_eventlist() {
611616
612617 include EDUADMIN_PLUGIN_PATH . '/content/template/detailTemplate/blocks/event-item.php ' ;
613618 $ last_city = $ ev ['City ' ];
614- $ i ++;
619+ $ i ++;
615620 }
616621 }
617622 if ( empty ( $ prices ) || empty ( $ events ) ) {
0 commit comments