From 5e0ccc0fc5aa65cfcbbd4cd8bb164d7af4f0d111 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Fri, 14 Apr 2017 11:16:54 -0400 Subject: [PATCH] Updates to the Update Server code --- defines.php | 2 ++ index.php | 9 +++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/defines.php b/defines.php index 01b75c6..fb2e39f 100644 --- a/defines.php +++ b/defines.php @@ -62,3 +62,5 @@ $pluginsPath = str_replace(GLM_MEMBERS_NEARME_PLUGIN_SLUG, '', GLM_MEMBERS_NEARM define('GLM_MEMBERS_NEARME_MAIN_PLUGIN_PATH', $pluginsPath.'/glm-member-db'); define('GLM_MEMBERS_NEARME_PLUGIN_LIB_PATH', GLM_MEMBERS_NEARME_MAIN_PLUGIN_PATH.'/lib'); +// Update Server +define('GLM_MEMBERS_NEARME_PLUGIN_UPDATE_SERVER', 'http://www.gaslightmedia.com/update_server'); diff --git a/index.php b/index.php index 6964757..169a5f9 100644 --- a/index.php +++ b/index.php @@ -184,18 +184,15 @@ add_filter('glm-member-db-register-addon','glmMembersNearMeRegisterAddOn', 10, 1 /* * Plugin Update Support - uses Gaslight Media update server */ -/* Not functional yet - Need to resolve JavaScript conflicts with this feature in other plugins -require GLM_MEMBERS_NEARME_PLUGIN_LIB_PATH.'/opentools-update-checker/opentools-update-checker.php'; +require_once GLM_MEMBERS_NEARME_MAIN_PLUGIN_PATH.'/lib/opentools-update-checker/opentools-update-checker.php'; ${GLM_MEMBERS_NEARME_PLUGIN_PREFIX."updateChecker"} = new OpenToolsPluginUpdateChecker( - 'http://www.gaslightmedia.com/update_server/?action=get_metadata&slug='.GLM_MEMBERS_NEARME_PLUGIN_SLUG, + GLM_MEMBERS_NEARME_PLUGIN_UPDATE_SERVER.'/?action=get_metadata&slug='.GLM_MEMBERS_NEARME_PLUGIN_SLUG, __FILE__, GLM_MEMBERS_NEARME_PLUGIN_SLUG ); - ${GLM_MEMBERS_NEARME_PLUGIN_PREFIX."updateChecker"}->declareCredentials(array( - 'license_key' => __('License Key:') + 'license_key' => __('License Key:') )); -*/ /* * -- 2.17.1