X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapitimelineretweetedbyme.php;h=4ad4e269af5544bfa563e227f0547400eb979f41;hb=627d84a1e2db2aca5d2ce1272f6e83fb7faa8ad2;hp=1e65678ad5bc4bc6fad9438bb3c8e26c01828505;hpb=a5a89f50b8e3f9b99d8ea3a7eff378637b149c7f;p=quix0rs-gnu-social.git diff --git a/actions/apitimelineretweetedbyme.php b/actions/apitimelineretweetedbyme.php index 1e65678ad5..4ad4e269af 100644 --- a/actions/apitimelineretweetedbyme.php +++ b/actions/apitimelineretweetedbyme.php @@ -31,9 +31,6 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/apiauth.php'; -require_once INSTALLDIR . '/lib/mediafile.php'; - /** * Show authenticating user's most recent repeats * @@ -43,7 +40,6 @@ require_once INSTALLDIR . '/lib/mediafile.php'; * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class ApiTimelineRetweetedByMeAction extends ApiAuthAction { const DEFAULTCOUNT = 20; @@ -64,63 +60,25 @@ class ApiTimelineRetweetedByMeAction extends ApiAuthAction * @return boolean success flag * */ - - function prepare($args) + function prepare(array $args=array()) { parent::prepare($args); - $cnt = $this->int('count', self::DEFAULTCOUNT, self::MAXCOUNT, 1); - - $page = $this->int('page', 1, (self::MAXNOTICES/$this->cnt)); + // TRANS: Server error displayed calling unimplemented API method for 'retweeted by me'. + $this->serverError(_('Unimplemented.'), 503); - $since_id = $this->int('since_id'); - - $max_id = $this->int('max_id'); - - return true; + return false; } /** - * Handle the request - * - * show a timeline of the user's repeated notices + * Return true if read only. * - * @param array $args $_REQUEST data (unused) + * @param array $args other arguments * - * @return void + * @return boolean is read only action? */ - - function handle($args) + function isReadOnly(array $args=array()) { - parent::handle($args); - - $offset = ($this->page-1) * $this->cnt; - $limit = $this->cnt; - - $strm = $this->auth_user->repeatedByMe($offset, $limit, $this->since_id, $this->max_id); - - switch ($this->format) { - case 'xml': - $this->showXmlTimeline($strm); - break; - case 'json': - $this->showJsonTimeline($strm); - break; - case 'atom': - $profile = $this->auth_user->getProfile(); - - $title = sprintf(_("Repeated by %s"), $this->auth_user->nickname); - $taguribase = common_config('integration', 'taguri'); - $id = "tag:$taguribase:RepeatedByMe:" . $this->auth_user->id; - $link = common_local_url('showstream', - array('nickname' => $this->auth_user->nickname)); - - $this->showAtomTimeline($strm, $title, $id, $link); - break; - - default: - $this->clientError(_('API method not found!'), $code = 404); - break; - } + return true; } }