From 7533c7cfe1bf1adc87ad1f3b9be9271930cc58a5 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 5 Apr 2011 12:53:49 -0400 Subject: [PATCH 1/3] Revert "Paging fix for public timeline: drop replies from the stuff we pull in for the threaded web view." This reverts commit 880661de4e8fd6735e9eba57e059fca0c719666b. --- actions/public.php | 7 ++----- lib/publicnoticestream.php | 22 +++------------------- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/actions/public.php b/actions/public.php index 1b6c14b2e6..b029407250 100644 --- a/actions/public.php +++ b/actions/public.php @@ -85,11 +85,8 @@ class PublicAction extends Action common_set_returnto($this->selfUrl()); - $stream = new PublicNoticeStream(PublicNoticeStream::THREADED); - $this->notice = $stream->getNotices(($this->page-1)*NOTICES_PER_PAGE, - NOTICES_PER_PAGE + 1, - 0, - 0); + $this->notice = Notice::publicStream(($this->page-1)*NOTICES_PER_PAGE, + NOTICES_PER_PAGE + 1); if (!$this->notice) { // TRANS: Server error displayed when a public timeline cannot be retrieved. diff --git a/lib/publicnoticestream.php b/lib/publicnoticestream.php index 08ac790fab..5c8d313d46 100644 --- a/lib/publicnoticestream.php +++ b/lib/publicnoticestream.php @@ -47,16 +47,10 @@ if (!defined('STATUSNET')) { class PublicNoticeStream extends ScopingNoticeStream { - const THREADED=true; - - /** - * - * @param boolean $threaded set to true to exclude replies, for later fetching - */ - function __construct($threaded=false) + function __construct() { - parent::__construct(new CachingNoticeStream(new RawPublicNoticeStream($threaded), - $threaded ? 'public:threaded' : 'public')); + parent::__construct(new CachingNoticeStream(new RawPublicNoticeStream(), + 'public')); } } @@ -73,13 +67,6 @@ class PublicNoticeStream extends ScopingNoticeStream class RawPublicNoticeStream extends NoticeStream { - var $threaded; - - function __construct($threaded=false) - { - $this->threaded = $threaded; - } - function getNoticeIds($offset, $limit, $since_id, $max_id) { $notice = new Notice(); @@ -100,9 +87,6 @@ class RawPublicNoticeStream extends NoticeStream $notice->whereAdd('is_local !='. Notice::LOCAL_NONPUBLIC); $notice->whereAdd('is_local !='. Notice::GATEWAY); } - if ($this->threaded) { - $notice->whereAdd('reply_to IS NULL'); - } Notice::addWhereSinceId($notice, $since_id); Notice::addWhereMaxId($notice, $max_id); From f753258a749c8bad8391a5f673676ee46600fe5d Mon Sep 17 00:00:00 2001 From: Samantha Doherty Date: Tue, 5 Apr 2011 13:23:41 -0400 Subject: [PATCH 2/3] Style for best QnA answer. --- theme/neo/css/display.css | 5 +++++ theme/neo/images/rosette.png | Bin 0 -> 673 bytes 2 files changed, 5 insertions(+) create mode 100644 theme/neo/images/rosette.png diff --git a/theme/neo/css/display.css b/theme/neo/css/display.css index 61258bfab6..555b280825 100644 --- a/theme/neo/css/display.css +++ b/theme/neo/css/display.css @@ -1408,4 +1408,9 @@ table.profile_list tr.alt { margin-top: 0px; } +.question p.best { + background: url(../images/rosette.png) no-repeat top left; + padding-left: 20px; +} + }/*end of @media screen, projection, tv*/ diff --git a/theme/neo/images/rosette.png b/theme/neo/images/rosette.png new file mode 100644 index 0000000000000000000000000000000000000000..f233bc77053bf3d4b0c8fafd2a9c58bf34603b61 GIT binary patch literal 673 zcmV;S0$%-zP)N@1p=a9KakdI4{r9Fsj0rE)+ zb~J|8lW*Tz02$`Zaxk^6sfOa5!ghcM1=puT<{WmU!JK!6{4kb3fZrJ*ROjE>@quHyr}*Cr;=Aa64! zj|O-=Sx^U(hAq-h=kq`Q2V>dc0LCnFFu6l&F;*d8IpiIHH4yNNu{%yB`v73}L;K|S z5BXjfZJO%>P`FNNQN^m$1zjx5c5Y{17VpEWq!t0|e{#P8+?shbj%;~D00000NkvXX Hu0mjf+-WMY literal 0 HcmV?d00001 From 2d2c134a1f464021f2b3d3837eac95521ac02af5 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 5 Apr 2011 13:28:41 -0400 Subject: [PATCH 3/3] fix constructor error in FileNoticeStream --- lib/filenoticestream.php | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/filenoticestream.php b/lib/filenoticestream.php index 8c01893634..2b5e53eaf7 100644 --- a/lib/filenoticestream.php +++ b/lib/filenoticestream.php @@ -60,7 +60,6 @@ class RawFileNoticeStream extends NoticeStream function __construct($file) { - parent::__construct(); $this->file = $file; }