";
- $supported_providers = $this->social_login_config_manager->getSupportedProviders();
- $configured_providers = $this->social_login_config_manager->getConfiguredProviders();
+ $supported_providers = $slcm->getSupportedProviders();
+ $configured_providers = $slcm->getConfiguredProviders();
$unconfigured_providers = array_diff($supported_providers, $configured_providers);
$unsupported_providers = array_diff($configured_providers, $supported_providers);
$configured_providers = array_diff($configured_providers, $unsupported_providers);
diff --git a/e107_plugins/social/languages/English/English_admin.php b/e107_plugins/social/languages/English/English_admin.php
index eaee772cc..1ddbc501f 100644
--- a/e107_plugins/social/languages/English/English_admin.php
+++ b/e107_plugins/social/languages/English/English_admin.php
@@ -15,8 +15,6 @@ define("LAN_SOCIAL_ADMIN_04", "Provider");
define("LAN_SOCIAL_ADMIN_05", "Key/ID");
define("LAN_SOCIAL_ADMIN_06", "Secret");
define("LAN_SOCIAL_ADMIN_07", "Allows users to signup/login with their social media accounts. When enabled, this option will still allow users to signup/login even if the core user registration system above is disabled.");
-define("LAN_SOCIAL_ADMIN_08", "Note: In most cases you will need to obtain an id and secret key from one of the providers.\nClick the blue links to the right to configure.\n\nYou may test your configuration with the following URL:");
-define("LAN_SOCIAL_ADMIN_09", "Your callback URL is: ");
define("LAN_SOCIAL_ADMIN_10", "Get a key from the provider");
define("LAN_SOCIAL_ADMIN_11", "Your");
define("LAN_SOCIAL_ADMIN_12", "page");
@@ -57,6 +55,11 @@ define("LAN_SOCIAL_UPDATE_REQUIRED",
"A database update is required to continue using this plugin."
);
+define("LAN_SOCIAL_ADMIN_TEST_PAGE_TOGGLE", "Test Page");
+define("LAN_SOCIAL_ADMIN_TEST_PAGE_INFO", "Enable or disable the social login test page");
+define("LAN_SOCIAL_ADMIN_08", "Note: In most cases, you will need to obtain an application ID and secret key from social login providers.\nIf a provider's name is a link, that link should take you to the login application configuration documentation.\n\nYou may test your configuration with the following URL after enabling the \"".LAN_SOCIAL_ADMIN_TEST_PAGE_TOGGLE."\" option:");
+define("LAN_SOCIAL_ADMIN_09", "Your callback URL is: ");
+
define("LAN_SOCIAL_LOGIN_SECTION_UNSUPPORTED", "Broken Configured Providers");
define("LAN_SOCIAL_LOGIN_SECTION_CONFIGURED", "Manage Existing Providers");
define("LAN_SOCIAL_LOGIN_SECTION_UNCONFIGURED", "Add New Providers");
diff --git a/e107_plugins/social/social_setup.php b/e107_plugins/social/social_setup.php
index 8e13b84aa..b89ac9ec8 100644
--- a/e107_plugins/social/social_setup.php
+++ b/e107_plugins/social/social_setup.php
@@ -68,7 +68,7 @@ class social_setup
}
}
- $manager->saveProviderConfig();
+ $manager->saveConfig();
}
private function upgradeDenormalizedProviderQuirks($denormalizedProviderName)
diff --git a/e107_tests/tests/unit/plugins/social/SocialLoginConfigManagerTest.php b/e107_tests/tests/unit/plugins/social/SocialLoginConfigManagerTest.php
index 5d3b4adb1..b7cad210e 100644
--- a/e107_tests/tests/unit/plugins/social/SocialLoginConfigManagerTest.php
+++ b/e107_tests/tests/unit/plugins/social/SocialLoginConfigManagerTest.php
@@ -55,6 +55,24 @@ class SocialLoginConfigManagerTest extends \Codeception\Test\Unit
$this->manager = new SocialLoginConfigManager($this->pref);
}
+ public function testFlagSetting()
+ {
+ $this->pref->set(SocialLoginConfigManager::SOCIAL_LOGIN_FLAGS, 0x0);
+ $this->manager = new SocialLoginConfigManager($this->pref);
+ $this->assertFalse($this->manager->isFlagActive(SocialLoginConfigManager::ENABLE_BIT_GLOBAL));
+ $this->assertFalse($this->manager->isFlagActive(SocialLoginConfigManager::ENABLE_BIT_TEST_PAGE));
+
+ $this->manager->setFlag(SocialLoginConfigManager::ENABLE_BIT_GLOBAL, 0);
+ $this->manager->setFlag(SocialLoginConfigManager::ENABLE_BIT_TEST_PAGE, 1);
+ $this->assertFalse($this->manager->isFlagActive(SocialLoginConfigManager::ENABLE_BIT_GLOBAL));
+ $this->assertTrue($this->manager->isFlagActive(SocialLoginConfigManager::ENABLE_BIT_TEST_PAGE));
+
+ $this->manager->setFlag(SocialLoginConfigManager::ENABLE_BIT_GLOBAL, 1);
+ $this->manager->setFlag(SocialLoginConfigManager::ENABLE_BIT_TEST_PAGE, 0);
+ $this->assertTrue($this->manager->isFlagActive(SocialLoginConfigManager::ENABLE_BIT_GLOBAL));
+ $this->assertFalse($this->manager->isFlagActive(SocialLoginConfigManager::ENABLE_BIT_TEST_PAGE));
+ }
+
public function testIsProviderEnabled()
{
$this->assertTrue($this->manager->isProviderEnabled('Twitter'));