From 8c5d1b63df63bdf73ef08f8b8c46699089939fc8 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 19 May 2009 00:09:06 +0000 Subject: Removed visited and vcard a background colors. --- theme/identica/css/display.css | 7 ------- 1 file changed, 7 deletions(-) diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index cc19da0f7..9d625848f 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -72,13 +72,6 @@ border-top-color:#CEE1E9; border-top-color:#87B4C8; } -#content .notice p.entry-content a:visited { -background-color:#fcfcfc; -} -#content .notice p.entry-content .vcard a { -background-color:#fcfffc; -} - #aside_primary { background-color:#CEE1E9; } -- cgit v1.2.3-54-g00ecf From 35b39342337fed5916e06876c8a37068d2052937 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Tue, 19 May 2009 01:07:45 +0000 Subject: Logout works properly now. --- plugins/FBConnect/FBConnectLogin.php | 9 +++---- plugins/FBConnect/FBConnectPlugin.php | 51 +++++++++++------------------------ 2 files changed, 20 insertions(+), 40 deletions(-) diff --git a/plugins/FBConnect/FBConnectLogin.php b/plugins/FBConnect/FBConnectLogin.php index a544352f3..c2a288571 100644 --- a/plugins/FBConnect/FBConnectLogin.php +++ b/plugins/FBConnect/FBConnectLogin.php @@ -254,6 +254,8 @@ class FBConnectloginAction extends Action function tryLogin() { + common_debug("Trying Facebook Login..."); + $flink = Foreign_link::getByForeignID($this->fbuid, FACEBOOK_SERVICE); if ($flink) { @@ -261,7 +263,7 @@ class FBConnectloginAction extends Action if ($user) { - common_debug("Logged in Facebook user $flink->foreign_id as user $user->id"); + common_debug("Logged in Facebook user $flink->foreign_id as user $user->id ($user->nickname)"); common_set_user($user); common_real_login(true); @@ -284,6 +286,7 @@ class FBConnectloginAction extends Action array('nickname' => $nickname)); } + common_redirect($url, 303); } @@ -302,10 +305,6 @@ class FBConnectloginAction extends Action function bestNewNickname() { - - common_debug("bestNewNickname()"); - common_debug(print_r($this->fb_fields, true)); - if (!empty($this->fb_fields['name'])) { $nickname = $this->nicknamize($this->fb_fields['name']); if ($this->isNewNickname($nickname)) { diff --git a/plugins/FBConnect/FBConnectPlugin.php b/plugins/FBConnect/FBConnectPlugin.php index 30532e5ec..342a62492 100644 --- a/plugins/FBConnect/FBConnectPlugin.php +++ b/plugins/FBConnect/FBConnectPlugin.php @@ -67,10 +67,8 @@ class FBConnectPlugin extends Plugin $name = get_class($action); - common_debug("action: $name"); - // Avoid a redirect loop - if ($name != 'FBConnectloginAction') { + if (!in_array($name, array('FBConnectloginAction', 'ClientErrorAction'))) { $this->checkFacebookUser($action); @@ -122,7 +120,14 @@ class FBConnectPlugin extends Plugin $apikey = common_config('facebook', 'apikey'); $plugin_path = common_path('plugins/FBConnect'); - $login_url = common_get_returnto() || common_local_url('public'); + $url = common_get_returnto(); + + if ($url) { + // We don't have to return to it again + common_set_returnto(null); + } else { + $url = common_local_url('public'); + } $html = sprintf('', $apikey, $plugin_path, $login_url); + ', $apikey, $plugin_path, $url); $action->raw($html); @@ -203,11 +208,16 @@ class FBConnectPlugin extends Plugin function checkFacebookUser() { + $user = common_current_user(); + + if ($user) { + return; + } + try { $facebook = getFacebook(); $fbuid = $facebook->get_loggedin_user(); - $user = common_current_user(); // If you're a Facebook user and you're logged in do nothing @@ -244,35 +254,6 @@ class FBConnectPlugin extends Plugin } - function onStartLogout($action) - { - common_debug("onEndLogout()"); - - common_set_user(null); - common_real_login(false); // not logged in - common_forgetme(); // don't log back in! - - try { - - $facebook = getFacebook(); - $fbuid = $facebook->get_loggedin_user(); - - // XXX: ARGGGH this doesn't work right! - - if ($fbuid) { - $facebook->expire_session(); - $facebook->logout(common_local_url('public')); - } - - } catch (Exception $e) { - common_debug('Problem expiring FB session'); - } - - common_debug("logged out."); - - return false; - } - } -- cgit v1.2.3-54-g00ecf