X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fnoticesearchrss.php;h=2a5187b885dba53f440a1553fb1fc2eb3a261fb0;hb=3255e2e1b81ce6d8d867e924eeacff2c9e53d706;hp=14c280f62cfd3f973f5c64703ce0734b16949c6c;hpb=2e1c7c779d7d7a12529efdb42437fbc063475ba6;p=quix0rs-gnu-social.git diff --git a/actions/noticesearchrss.php b/actions/noticesearchrss.php index 14c280f62c..2a5187b885 100644 --- a/actions/noticesearchrss.php +++ b/actions/noticesearchrss.php @@ -28,11 +28,7 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET') && !defined('LACONICA')) { - exit(1); -} - -require_once INSTALLDIR.'/lib/rssaction.php'; +if (!defined('GNUSOCIAL')) { exit(1); } /** * RSS feed for notice search action class. @@ -48,19 +44,7 @@ require_once INSTALLDIR.'/lib/rssaction.php'; */ class NoticesearchrssAction extends Rss10Action { - function init() - { - return true; - } - - function prepare($args) - { - parent::prepare($args); - $this->notices = $this->getNotices(); - return true; - } - - function getNotices($limit=0) + protected function getNotices() { $q = $this->trimmed('q'); $notices = array(); @@ -70,8 +54,7 @@ class NoticesearchrssAction extends Rss10Action $search_engine = $notice->getSearchEngine('notice'); $search_engine->set_sort_mode('chron'); - if (!$limit) $limit = 20; - $search_engine->limit(0, $limit, true); + $search_engine->limit(0, $this->limit, true); if (false === $search_engine->query($q)) { $cnt = 0; } else {