* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @category Search
- * @package GNUSocial
+ * @package GNUsocial
* @author Zach Copley <zach@status.net>
* @copyright 2008-2010 StatusNet, Inc.
* @copyright 2013 Free Software Foundation, Inc.
*
* @return boolean true if nothing goes wrong
*/
- function prepare($args)
+ function prepare(array $args=array())
{
parent::prepare($args);
*
* @return void
*/
- function handle($args)
+ function handle(array $args=array())
{
parent::handle($args);
$this->showResults();
$search_engine->limit(($this->page - 1) * $this->rpp, $this->rpp + 1);
if ($search_engine->query($this->query)) {
$cnt = $notice->find();
- $this->notices = $notice->fetchAll();
+ foreach ($notice->fetchAll() as $testNotice) {
+ // Must be true
+ assert($testNotice instanceof Notice);
+
+ // Check scope of notice to current profile (including guests)
+ if ($testNotice->isCurrentProfileInScope()) {
+ // In scope
+ $this->notices[] = $testNotice;
+ }
+ } // END - if
}
$this->showJsonTimeline($this->notices);
*
* @return boolean true
*/
- function isReadOnly($args)
+ function isReadOnly(array $args=array())
{
return true;
}