From df343dd2d64ad1ef29bb1f1b7397be18c520f9ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Mon, 2 Apr 2012 20:25:15 +0000 Subject: [PATCH] Migration hint: the form cannot be used as long as the settings are set in .htconfig.php, so tell this to the administrator. --- facebook/facebook.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/facebook/facebook.php b/facebook/facebook.php index 5c06ef71..5ffb0a22 100755 --- a/facebook/facebook.php +++ b/facebook/facebook.php @@ -649,6 +649,10 @@ function facebook_plugin_admin(&$a, &$o){ $poll_interval = get_config('facebook', 'poll_interval' ); if (!$poll_interval) $poll_interval = FACEBOOK_DEFAULT_POLL_INTERVAL; + $ret1 = q("SELECT `v` FROM `config` WHERE `cat` = 'facebook' AND `k` = 'appid' LIMIT 1"); + $ret2 = q("SELECT `v` FROM `config` WHERE `cat` = 'facebook' AND `k` = 'appsecret' LIMIT 1"); + if ((count($ret1) > 0 && $ret1[0]['v'] != $appid) || (count($ret2) > 0 && $ret2[0]['v'] != $appsecret)) $o .= t('Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

'); + $working_connection = false; if ($appid && $appsecret) { $subs = facebook_subscriptions_get(); @@ -656,7 +660,7 @@ function facebook_plugin_admin(&$a, &$o){ elseif (is_array($subs)) { $o .= t('The given API Key seems to work correctly.') . '
'; $working_connection = true; - } else $o .= t('The correctness of the API Key could not be detected. Somthing strang\'s going on.') . '
'; + } else $o .= t('The correctness of the API Key could not be detected. Somthing strange\'s going on.') . '
'; } $o .= '
';