Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x

* '1.0.x' of gitorious.org:statusnet/mainline:
  fix constructor error in FileNoticeStream
  Style for best QnA answer.
  Revert "Paging fix for public timeline: drop replies from the stuff we pull in for the threaded web view."
This commit is contained in:
Zach Copley 2011-04-05 10:30:14 -07:00
commit 77936568b5
5 changed files with 10 additions and 25 deletions

View File

@ -85,11 +85,8 @@ class PublicAction extends Action
common_set_returnto($this->selfUrl()); common_set_returnto($this->selfUrl());
$stream = new PublicNoticeStream(PublicNoticeStream::THREADED); $this->notice = Notice::publicStream(($this->page-1)*NOTICES_PER_PAGE,
$this->notice = $stream->getNotices(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
NOTICES_PER_PAGE + 1,
0,
0);
if (!$this->notice) { if (!$this->notice) {
// TRANS: Server error displayed when a public timeline cannot be retrieved. // TRANS: Server error displayed when a public timeline cannot be retrieved.

View File

@ -60,7 +60,6 @@ class RawFileNoticeStream extends NoticeStream
function __construct($file) function __construct($file)
{ {
parent::__construct();
$this->file = $file; $this->file = $file;
} }

View File

@ -47,16 +47,10 @@ if (!defined('STATUSNET')) {
class PublicNoticeStream extends ScopingNoticeStream class PublicNoticeStream extends ScopingNoticeStream
{ {
const THREADED=true; function __construct()
/**
*
* @param boolean $threaded set to true to exclude replies, for later fetching
*/
function __construct($threaded=false)
{ {
parent::__construct(new CachingNoticeStream(new RawPublicNoticeStream($threaded), parent::__construct(new CachingNoticeStream(new RawPublicNoticeStream(),
$threaded ? 'public:threaded' : 'public')); 'public'));
} }
} }
@ -73,13 +67,6 @@ class PublicNoticeStream extends ScopingNoticeStream
class RawPublicNoticeStream extends NoticeStream class RawPublicNoticeStream extends NoticeStream
{ {
var $threaded;
function __construct($threaded=false)
{
$this->threaded = $threaded;
}
function getNoticeIds($offset, $limit, $since_id, $max_id) function getNoticeIds($offset, $limit, $since_id, $max_id)
{ {
$notice = new Notice(); $notice = new Notice();
@ -100,9 +87,6 @@ class RawPublicNoticeStream extends NoticeStream
$notice->whereAdd('is_local !='. Notice::LOCAL_NONPUBLIC); $notice->whereAdd('is_local !='. Notice::LOCAL_NONPUBLIC);
$notice->whereAdd('is_local !='. Notice::GATEWAY); $notice->whereAdd('is_local !='. Notice::GATEWAY);
} }
if ($this->threaded) {
$notice->whereAdd('reply_to IS NULL');
}
Notice::addWhereSinceId($notice, $since_id); Notice::addWhereSinceId($notice, $since_id);
Notice::addWhereMaxId($notice, $max_id); Notice::addWhereMaxId($notice, $max_id);

View File

@ -1408,4 +1408,9 @@ table.profile_list tr.alt {
margin-top: 0px; margin-top: 0px;
} }
.question p.best {
background: url(../images/rosette.png) no-repeat top left;
padding-left: 20px;
}
}/*end of @media screen, projection, tv*/ }/*end of @media screen, projection, tv*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B