break;
case 'icalfeed':
+ //echo '<pre>$_REQUEST: ' . print_r( $_REQUEST, true ) . '</pre>';
+ //exit;
if ( isset( $_REQUEST['option2'] ) ) {
$option2 = filter_var( $_REQUEST['option2'], FILTER_SANITIZE_STRING );
}
if ( !wp_next_scheduled( GLM_MEMBERS_EVENTS_PLUGIN_CRON_EVENT, $feed_id ) ) {
wp_schedule_event( time(), GLM_MEMBERS_EVENTS_PLUGIN_CRON_RECURRANCE, GLM_MEMBERS_EVENTS_PLUGIN_CRON_EVENT, array( $feed_id ) );
}
+ } else {
+ $icalFeedResult = 'Not a valid url';
}
+ $event_settings = $this->editEntry(1);
break;
case 'eventImagesImport':
// Location Data
if ( isset( $event['LOCATION'] ) ) {
$location_data = explode( ',', str_replace( '\\', '', $event['LOCATION'] ) );
- $place = ( isset( $location_data[0] ) ? $location_data[0]: '');
- $address = ( isset( $location_data[1] ) ? $location_data[1]: '');
- $city = ( isset( $location_data[2] ) ? $location_data[2]: '');
- $state = ( isset( $location_data[3] ) ? $location_data[3]: '');
- $zip = ( isset( $location_data[4] ) ? $location_data[4]: '');
+ // Place will be before the first dash
+ $placeParts = explode( ' - ', $location_data[0] );
+ $place = ( isset( $placeParts[0] ) ? $placeParts[0]: '');
+ $address = ( isset( $placeParts[1] ) ? $placeParts[1]: '');
+ $city = ( isset( $location_data[1] ) ? $location_data[1]: '');
+ $state = ( isset( $location_data[2] ) ? $location_data[2]: '');
+ $zip = ( isset( $location_data[3] ) ? $location_data[3]: '');
$location = array(
'event' => $event_id,
'name' => $place,