From ab8aa670087580f164f96af6727eef5d2cf0a6e1 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Fri, 5 Mar 2010 16:20:33 -0800 Subject: Fix for blank RSS1 tag feeds --- actions/tagrss.php | 1 + 1 file changed, 1 insertion(+) (limited to 'actions') diff --git a/actions/tagrss.php b/actions/tagrss.php index 75cbfa274..467a64abe 100644 --- a/actions/tagrss.php +++ b/actions/tagrss.php @@ -35,6 +35,7 @@ class TagrssAction extends Rss10Action $this->clientError(_('No such tag.')); return false; } else { + $this->notices = $this->getNotices($this->limit); return true; } } -- cgit v1.2.3-54-g00ecf From 1a03820628d37b9db6e47be22d98789f551f1959 Mon Sep 17 00:00:00 2001 From: Christopher Vollick Date: Thu, 11 Feb 2010 11:19:50 -0500 Subject: UserRSS Didn't Use the Tag Propery. This meant that server.com/user/tag/TAG/rss just returned all user data. That was incorrect. --- actions/userrss.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'actions') diff --git a/actions/userrss.php b/actions/userrss.php index 19e610551..6029f4431 100644 --- a/actions/userrss.php +++ b/actions/userrss.php @@ -38,7 +38,11 @@ class UserrssAction extends Rss10Action $this->clientError(_('No such user.')); return false; } else { - $this->notices = $this->getNotices($this->limit); + if ($this->tag) { + $this->notices = $this->getTaggedNotices($tag, $this->limit); + } else { + $this->notices = $this->getNotices($this->limit); + } return true; } } -- cgit v1.2.3-54-g00ecf From 4ada86560c7c9ef43e41e6c3cdf279d64ea132ba Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Fri, 5 Mar 2010 16:40:35 -0800 Subject: Fix undefined variable error and some other cleanup --- actions/userrss.php | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'actions') diff --git a/actions/userrss.php b/actions/userrss.php index 6029f4431..77bd316b2 100644 --- a/actions/userrss.php +++ b/actions/userrss.php @@ -29,6 +29,8 @@ class UserrssAction extends Rss10Action function prepare($args) { + common_debug("UserrssAction"); + parent::prepare($args); $nickname = $this->trimmed('nickname'); $this->user = User::staticGet('nickname', $nickname); @@ -38,8 +40,8 @@ class UserrssAction extends Rss10Action $this->clientError(_('No such user.')); return false; } else { - if ($this->tag) { - $this->notices = $this->getTaggedNotices($tag, $this->limit); + if (!empty($this->tag)) { + $this->notices = $this->getTaggedNotices($this->tag, $this->limit); } else { $this->notices = $this->getNotices($this->limit); } @@ -47,15 +49,15 @@ class UserrssAction extends Rss10Action } } - function getTaggedNotices($tag = null, $limit=0) + function getTaggedNotices() { - $user = $this->user; - - if (is_null($user)) { - return null; - } - - $notice = $user->getTaggedNotices(0, ($limit == 0) ? NOTICES_PER_PAGE : $limit, 0, 0, null, $tag); + $notice = $this->user->getTaggedNotices( + $this->tag, + 0, + ($this->limit == 0) ? NOTICES_PER_PAGE : $this->limit, + 0, + 0 + ); $notices = array(); while ($notice->fetch()) { @@ -66,15 +68,12 @@ class UserrssAction extends Rss10Action } - function getNotices($limit=0) + function getNotices() { - $user = $this->user; - - if (is_null($user)) { - return null; - } - - $notice = $user->getNotices(0, ($limit == 0) ? NOTICES_PER_PAGE : $limit); + $notice = $this->user->getNotices( + 0, + ($limit == 0) ? NOTICES_PER_PAGE : $limit + ); $notices = array(); while ($notice->fetch()) { -- cgit v1.2.3-54-g00ecf From d59284d42d3735e393e5e99d027136d96778600d Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Fri, 5 Mar 2010 16:52:15 -0800 Subject: No need to pass in $this->limit and $this-tag --- actions/userrss.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actions') diff --git a/actions/userrss.php b/actions/userrss.php index 77bd316b2..e03eb9356 100644 --- a/actions/userrss.php +++ b/actions/userrss.php @@ -41,9 +41,9 @@ class UserrssAction extends Rss10Action return false; } else { if (!empty($this->tag)) { - $this->notices = $this->getTaggedNotices($this->tag, $this->limit); + $this->notices = $this->getTaggedNotices(); } else { - $this->notices = $this->getNotices($this->limit); + $this->notices = $this->getNotices(); } return true; } -- cgit v1.2.3-54-g00ecf From 0d66dc543d368092de08b49857c67248210d8d84 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 8 Mar 2010 18:06:21 -0500 Subject: an otp is a real login --- actions/otp.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'actions') diff --git a/actions/otp.php b/actions/otp.php index acf84aee8..1e06603d4 100644 --- a/actions/otp.php +++ b/actions/otp.php @@ -126,6 +126,8 @@ class OtpAction extends Action $this->lt->delete(); $this->lt = null; + common_real_login(true); + if ($this->rememberme) { common_rememberme($this->user); } -- cgit v1.2.3-54-g00ecf