From 224d82793c769c06d1e4f39c19cd5f2e9cf519b0 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 20 Nov 2009 02:50:43 -0800 Subject: Revert "Added 'login' command that gives you a link that can be used to login to the website" This reverts commit b9d40f723bce8e01ddcbbb989bd7035b92cd9af8. Conflicts: actions/login.php classes/statusnet.ini db/08to09.sql db/08to09_pg.sql db/statusnet_pg.sql lib/command.php lib/commandinterpreter.php --- actions/login.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'actions') diff --git a/actions/login.php b/actions/login.php index cee29fd09..cd1326813 100644 --- a/actions/login.php +++ b/actions/login.php @@ -79,8 +79,6 @@ class LoginAction extends Action $this->clientError(_('Already logged in.')); } else if ($_SERVER['REQUEST_METHOD'] == 'POST') { $this->checkLogin(); - } else if (isset($args['user_id']) && isset($args['token'])){ - $this->checkLogin($args['user_id'],$args['token']); } else { common_ensure_session(); $this->showForm(); @@ -97,7 +95,7 @@ class LoginAction extends Action * @return void */ - function checkLogin($user_id=null, $token=null) + function checkLogin() { if(isset($token) && isset($user_id)){ //Token based login (from the LoginCommand) @@ -139,6 +137,11 @@ class LoginAction extends Action $user = common_check_user($nickname, $password); } + $nickname = common_canonical_nickname($this->trimmed('nickname')); + $password = $this->arg('password'); + + $user = common_check_user($nickname, $password); + if (!$user) { $this->showForm(_('Incorrect username or password.')); return; -- cgit v1.2.3-54-g00ecf From a7be30857a58f04abe585337076796fb363d481b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 20 Nov 2009 14:52:29 -0800 Subject: Fix bug 1997: notice search rss utter failure Since commit c4072ef7c930b82b74f8e90f6554974b761c686c in March there's no longer an automatic run of $this->getNotices() from RssAction parent class; added to the subclass. It might make sense to put it back in the parent class, but of course only if those dupe calls can be resolved. --- actions/noticesearchrss.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actions') diff --git a/actions/noticesearchrss.php b/actions/noticesearchrss.php index 18f07f855..a59e7b99b 100644 --- a/actions/noticesearchrss.php +++ b/actions/noticesearchrss.php @@ -53,6 +53,13 @@ class NoticesearchrssAction extends Rss10Action { return true; } + + function prepare($args) + { + parent::prepare($args); + $this->notices = $this->getNotices(); + return true; + } function getNotices($limit=0) { -- cgit v1.2.3-54-g00ecf From f1b64c4db52d6881c845704bfde3e3514e3ebe8f Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 25 Nov 2009 12:07:19 -0800 Subject: Fix fatal error on OMB subscription for first-timers --- actions/finishremotesubscribe.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'actions') diff --git a/actions/finishremotesubscribe.php b/actions/finishremotesubscribe.php index b1cec66f4..deee70f36 100644 --- a/actions/finishremotesubscribe.php +++ b/actions/finishremotesubscribe.php @@ -89,12 +89,16 @@ class FinishremotesubscribeAction extends Action } $remote = Remote_profile::staticGet('uri', $service->getListenerURI()); + if ($remote) { + // Note remote profile may not have been saved yet. + // @fixme not convinced this is correct at all! - $profile = Profile::staticGet($remote->id); + $profile = Profile::staticGet($remote->id); - if ($user->hasBlocked($profile)) { - $this->clientError(_('That user has blocked you from subscribing.')); - return; + if ($user->hasBlocked($profile)) { + $this->clientError(_('That user has blocked you from subscribing.')); + return; + } } /* Perform the handling itself via libomb. */ @@ -122,6 +126,7 @@ class FinishremotesubscribeAction extends Action /* The service URLs are not accessible from datastore, so setting them after insertion of the profile. */ + $remote = Remote_profile::staticGet('uri', $service->getListenerURI()); $orig_remote = clone($remote); $remote->postnoticeurl = -- cgit v1.2.3-54-g00ecf