* Plugin Name: GLM Members Database Events
* Plugin URI: http://www.gaslightmedia.com/
* Description: Gaslight Media Members Database.
- * Version: 1.2.22
+ * Version: 1.2.23
* Author: Chuck Scott
* Author URI: http://www.gaslightmedia.com/
* License: GPL2
* @package glmMembersDatabaseEventsAddOn
* @author Chuck Scott <cscott@gaslightmedia.com>
* @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.2.22
+ * @version 1.2.23
*/
/*
* so that we're sure the other add-ons see an up to date
* version from this plugin.
*/
-define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.2.22');
+define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.2.23');
define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.0.18');
// This is the minimum version of the GLM Members DB plugin require for this plugin.
}
public function importFromTimely() {
$limit = 25;
- $debug = false;
+ $debug = true;
if ( isset( $_REQUEST['start'] ) ) {
$start = filter_var( $_REQUEST['start'], FILTER_VALIDATE_INT );
} else {
AND post_status = 'publish'";
//$sql .= " AND ID IN ( SELECT post_id FROM " . $this->wpdb->prefix . "ai1ec_events
//WHERE end >= " . time() . " )";
- //$sql .= " AND ID IN ( 1647 )";
+ $sql .= " AND ID IN ( 3785 )";
$sql .= " LIMIT $limit OFFSET $start";
$results = $this->wpdb->get_results( $sql, ARRAY_A );
$location_format[] = '%s';
}
if ($event_data['address']) {
- $location_data['address'] = $event_data['address'];
+ // test the address to see if there's commas
+ if ( strpos( $event_data['address'], ',' ) === false) {
+ $location_data['address'] = $event_data['address'];
+ } else {
+ $location_data['address'] = substr( $event_data['address'], 0, strpos( $event_data['address'], ',' ) );
+ }
$location_format[] = '%s';
}
if ($event_data['city']) {