Bug fix for common event import
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 27 May 2016 21:00:13 +0000 (17:00 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 27 May 2016 21:00:13 +0000 (17:00 -0400)
index.php
models/admin/management/events.php

index 9cb73ba..7c58c7d 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Members Database Events
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Gaslight Media Members Database.
- * Version: 1.0.0
+ * Version: 1.0.1
  * Author: Chuck Scott
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -20,7 +20,7 @@
  * @package glmMembersDatabaseEventsAddOn
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.0.0
+ * @version 1.0.1
  */
 
 /*
@@ -38,7 +38,7 @@
  *  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.0.0');
+define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.0.1');
 define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.0.17');
 
 // This is the minimum version of the GLM Members DB plugin require for this plugin.
index bbd7958..bf0990c 100644 (file)
@@ -566,6 +566,7 @@ class GlmMembersAdmin_management_events extends GlmDataEventsManagement
      */
     public function getTime($time)
     {
+               echo '<pre>$time: ' . print_r($time, true) . '</pre>';
         if (!$time) {
             return false;
         }
@@ -573,12 +574,15 @@ class GlmMembersAdmin_management_events extends GlmDataEventsManagement
             //die('not found');
             return false;
         }
-        $hour = (!$timeParts[3] || in_array(strtolower(trim($timeParts[3])), array('pm', 'p')))
-            ? ( ((int)$timeParts[1] === 12) ? 12 : (int)$timeParts[1] += 12 )
-            : ( ((int)$timeParts[1] === 12) ? 0 : (int)$timeParts[1] );
+               echo '<pre>$timeParts: ' . print_r($timeParts, true) . '</pre>';
+        //$hour = (!$timeParts[3] || in_array(strtolower(trim($timeParts[3])), array('pm', 'p')))
+        //    ? ( ((int)$timeParts[1] === 12) ? 12 : (int)$timeParts[1] += 12 )
+        //    : ( ((int)$timeParts[1] === 12) ? 0 : (int)$timeParts[1] );
+               $hour = $timeParts[1];
         // parse the hour from event
         $dateTime = new DateTime();
         $dateTime->setTime($hour, (int)$timeParts[2] );
+               echo '<pre>$dateTime: ' . print_r($dateTime, true) . '</pre>';
         return $dateTime->format('H:i');
     }
 
@@ -651,6 +655,7 @@ class GlmMembersAdmin_management_events extends GlmDataEventsManagement
             $getFileData = $this->dbh->prepare($prepareSql);
         }
         //$sql .=" AND file != '' ";
+               //$sql .= " AND id = 5";
         $this->wpdb->show_errors();
         echo '<pre>$sql: ' . print_r($sql, true) . '</pre>';
         try {