From: Chuck Scott Date: Thu, 5 Oct 2017 21:00:46 +0000 (-0400) Subject: Removing references to "addNotice" function in glmPluginSupport that were causing... X-Git-Tag: v1.6.77^2~43 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=8f8640845f4677f3d337eec5b462f20c5a8c8af0;p=WP-Plugins%2Fglm-member-db-events.git Removing references to "addNotice" function in glmPluginSupport that were causing problems. --- diff --git a/activate.php b/activate.php index fcd6998..8751090 100644 --- a/activate.php +++ b/activate.php @@ -71,7 +71,6 @@ class glmMembersEventsPluginActivate // Make sure the current user has this capability if (! current_user_can('activate_plugins')) { - $this->addNotice("Interesting, you don't have permission to activate plugins."); die(); } diff --git a/classes/data/dataAmenities.php b/classes/data/dataAmenities.php index ae6aab8..d31460f 100644 --- a/classes/data/dataAmenities.php +++ b/classes/data/dataAmenities.php @@ -230,10 +230,6 @@ class GlmDataEventsAmenities extends GlmDataAbstract } - if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { - glmMembersAdmin::addNotice("Amenity added: name = $name, ID = $amenityID", 'DataBlock', "addAmenity()"); - } - return $amenityID; } diff --git a/classes/data/dataCategories.php b/classes/data/dataCategories.php index aa4dd0b..50c1bde 100644 --- a/classes/data/dataCategories.php +++ b/classes/data/dataCategories.php @@ -298,10 +298,6 @@ class GlmDataEventsCategories extends GlmDataAbstract } - if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { - glmMembersAdmin::addNotice("Category added: name = $name, parent = $parent, ID = $categoryID", 'DataBlock', "addCategory()"); - } - return $categoryID; } @@ -403,7 +399,7 @@ class GlmDataEventsCategories extends GlmDataAbstract if (!is_array($array) || count($array) == 0) { return false; } - + // Do a sort by custom function with it included in the call // This lets me directly use $name and $parent in the sort function uasort($array, function ($a, $b) use ($name, $parent) { diff --git a/classes/data/dataEventAmenities.php b/classes/data/dataEventAmenities.php index b046d8b..7c5616a 100644 --- a/classes/data/dataEventAmenities.php +++ b/classes/data/dataEventAmenities.php @@ -212,11 +212,6 @@ class GlmDataEventsEventAmenities extends GlmDataAbstract ;"; $list = $this->wpdb->get_results($sql, ARRAY_A); - if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { - glmMembersAdmin::addNotice($sql, 'DataBlock', "DataAbstract - getListWithParents() query"); - glmMembersAdmin::addNotice($list, 'DataBlock', 'getListWithParents() data'); - } - return $list; } @@ -302,10 +297,6 @@ class GlmDataEventsEventAmenities extends GlmDataAbstract // Get new list and return it $current = $this->getList($eventID); - if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { - glmMembersAdmin::addNotice($current, 'DataBlock', 'Currently Selected Event Amenities'); - } - return $current; } diff --git a/classes/data/dataEventCategories.php b/classes/data/dataEventCategories.php index df05b33..23b7a50 100644 --- a/classes/data/dataEventCategories.php +++ b/classes/data/dataEventCategories.php @@ -225,11 +225,6 @@ class GlmDataEventsEventCategories extends GlmDataAbstract ;"; $list = $this->wpdb->get_results($sql, ARRAY_A); - if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { - glmMembersAdmin::addNotice($sql, 'DataBlock', "DataAbstract - getListWithParents() query"); - glmMembersAdmin::addNotice($list, 'DataBlock', 'getListWithParents() data'); - } - return $list; } @@ -315,10 +310,6 @@ class GlmDataEventsEventCategories extends GlmDataAbstract // Get new list and return it $current = $this->getList($eventID); - if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { - glmMembersAdmin::addNotice($current, 'DataBlock', 'Currently Selected Event Categories'); - } - return $current; } diff --git a/classes/data/dataEventGroups.php b/classes/data/dataEventGroups.php index 5687d65..55027d9 100644 --- a/classes/data/dataEventGroups.php +++ b/classes/data/dataEventGroups.php @@ -123,8 +123,5 @@ class GlmDataEventGroups extends GlmDataAbstract ), ); - if ( is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE ) { - glmMembersAdmin::addNotice( $this->fields, 'DataBlock', 'Table Fields: '.$this->table ); - } } } diff --git a/classes/data/dataRecurrences.php b/classes/data/dataRecurrences.php index fefcce7..74fa8f2 100644 --- a/classes/data/dataRecurrences.php +++ b/classes/data/dataRecurrences.php @@ -561,7 +561,7 @@ class GlmDataEventsRecurrences extends GlmDataAbstract return $timesData; } - + /** * Get recurances along with all times entries for a particular event ID * @@ -572,13 +572,13 @@ class GlmDataEventsRecurrences extends GlmDataAbstract */ public function getRecurWithTimes($eventID) { - + // Check for positive integer event ID $eventID = ($eventID-0); if ($eventID == 0) { return false; } - + // Get all recurrences $recurrences = $this->getList("T.event = $eventID", 'start_time'); @@ -590,9 +590,9 @@ class GlmDataEventsRecurrences extends GlmDataAbstract $recurrences[$k]['times'] = $Times->getEventTimesByRecurrenceSimplified($v['id']); } } - + return $recurrences; - + } } diff --git a/classes/data/dataTimes.php b/classes/data/dataTimes.php index 5f45881..ed2fb97 100644 --- a/classes/data/dataTimes.php +++ b/classes/data/dataTimes.php @@ -296,18 +296,18 @@ class GlmDataEventsTimes extends GlmDataAbstract */ public function getEventTimesByRecurrenceSimplified($recurrenceID = false, $startDate = false, $endDate = false) { - + $savedFields = $this->fields; - + $this->fields = array( 'id' => $savedFields['id'], 'start_time' => $savedFields['start_time'], 'end_time' => $savedFields['end_time'], 'all_day' => $savedFields['all_day'] ); - + $where = " T.recur_id = $recurrenceID "; - + // Only display times from startDate to endDate if (!$startDate) { $startDate = date('Y-m-d H:i:s'); @@ -316,16 +316,16 @@ class GlmDataEventsTimes extends GlmDataAbstract if ($endDate) { $where .= " AND T.start_time <= '$endDate' "; } - + $timesSimplified = $this->getList($where, 'start_time'); $this->fields = $savedFields; - + return $timesSimplified; - + } - - + + } ?> diff --git a/models/admin/management/events.php b/models/admin/management/events.php index 4d6d63b..2d7983c 100644 --- a/models/admin/management/events.php +++ b/models/admin/management/events.php @@ -367,14 +367,6 @@ class GlmMembersAdmin_management_events extends GlmDataEventsManagement $event_settings = $this->editEntry(1); //echo '
$event_settings: ' . print_r( $event_settings, true ) . '
'; - if ($event_settings === false) { - - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) { - glmMembersAdmin::addNotice("  /models/admin/management/events.php: Unable to load events management settings.", 'Alert'); - } - - } - break; } diff --git a/models/admin/settings/emailNotifications.php b/models/admin/settings/emailNotifications.php index fb2b854..1cdefe0 100644 --- a/models/admin/settings/emailNotifications.php +++ b/models/admin/settings/emailNotifications.php @@ -102,7 +102,7 @@ class GlmMembersAdmin_settings_emailNotifications extends GlmDataEmailNotificati $error = false; $enable_members = $this->config['settings']['enable_members']; $email_settings = false; - + $email_settings = $this->getSettings(); // If there's an action option @@ -112,7 +112,7 @@ class GlmMembersAdmin_settings_emailNotifications extends GlmDataEmailNotificati case 'update': $this->updateEntry($email_settings['id']); - + break; case 'new': $this->insertEntry(); @@ -133,11 +133,6 @@ class GlmMembersAdmin_settings_emailNotifications extends GlmDataEmailNotificati ); } - - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { - glmMembersAdmin::addNotice($categories, 'DataBlock', 'Categories Data'); - } - // Compile template data $templateData = array( 'enable_members' => $enable_members, diff --git a/models/admin/settings/eventAmenities.php b/models/admin/settings/eventAmenities.php index c987030..6bd88ed 100644 --- a/models/admin/settings/eventAmenities.php +++ b/models/admin/settings/eventAmenities.php @@ -211,9 +211,6 @@ class GlmMembersAdmin_settings_eventAmenities extends GlmDataEventsAmenities // Get a current list of amenities $amenities = $this->getList(); - if ( GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE ) { - glmMembersAdmin::addNotice( $amenities, 'DataBlock', 'Amenities Data' ); - } // If we have list entries - even if it's an empty list $success = true; $haveAmenities = false; @@ -237,9 +234,6 @@ class GlmMembersAdmin_settings_eventAmenities extends GlmDataEventsAmenities ); } - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { - glmMembersAdmin::addNotice( $amenities, 'DataBlock', 'Amenities Data' ); - } // Compile template data $templateData = array( 'enable_members' => $enable_members, diff --git a/models/admin/settings/eventCategories.php b/models/admin/settings/eventCategories.php index b25e695..1c7c2a1 100644 --- a/models/admin/settings/eventCategories.php +++ b/models/admin/settings/eventCategories.php @@ -146,10 +146,6 @@ class GlmMembersAdmin_settings_eventCategories extends GlmDataEventsCategories // Get a current list of categories $categories = $this->getList(); - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { - glmMembersAdmin::addNotice($categories, 'DataBlock', 'Category Data'); - } - // If we have list entries - even if it's an empty list $success = true; $haveCategories = false; @@ -177,10 +173,6 @@ class GlmMembersAdmin_settings_eventCategories extends GlmDataEventsCategories // Sort results by hierarchy (Parent/Child and Alpha) $categories = $this->sortParentChild($categories); - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { - glmMembersAdmin::addNotice($categories, 'DataBlock', 'Categories Data'); - } - // Compile template data $templateData = array( 'enable_members' => $enable_members,