summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-01-21 16:33:11 -0800
committerBrion Vibber <brion@pobox.com>2010-01-21 16:33:11 -0800
commitc9c7bb3234f8ede65c328ecf9f713b189a81faad (patch)
tree5834925a7ad38aad43af252f949cfd836fad9c4d /actions
parentdcba61332223cfc875b355f6a5f4d2e574dd55b2 (diff)
parent4b0f953ccf7435d6ebe4a674953f62af36cc978b (diff)
Merge commit 'origin/testing' into 0.9.x
Diffstat (limited to 'actions')
-rw-r--r--actions/apistatusesretweets.php15
-rw-r--r--actions/apitimelineretweetedbyme.php51
-rw-r--r--actions/apitimelineretweetedtome.php15
-rw-r--r--actions/apitimelineretweetsofme.php15
4 files changed, 52 insertions, 44 deletions
diff --git a/actions/apistatusesretweets.php b/actions/apistatusesretweets.php
index f7a3dd60a..a79d43168 100644
--- a/actions/apistatusesretweets.php
+++ b/actions/apistatusesretweets.php
@@ -113,4 +113,19 @@ class ApiStatusesRetweetsAction extends ApiAuthAction
break;
}
}
+
+ /**
+ * Return true if read only.
+ *
+ * MAY override
+ *
+ * @param array $args other arguments
+ *
+ * @return boolean is read only action?
+ */
+
+ function isReadOnly($args)
+ {
+ return true;
+ }
}
diff --git a/actions/apitimelineretweetedbyme.php b/actions/apitimelineretweetedbyme.php
index 88652c3fd..564e98619 100644
--- a/actions/apitimelineretweetedbyme.php
+++ b/actions/apitimelineretweetedbyme.php
@@ -69,58 +69,21 @@ class ApiTimelineRetweetedByMeAction extends ApiAuthAction
{
parent::prepare($args);
- $cnt = $this->int('count', self::DEFAULTCOUNT, self::MAXCOUNT, 1);
+ $this->serverError('Unimplemented', 503);
- $page = $this->int('page', 1, (self::MAXNOTICES/$this->cnt));
-
- $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($args)
{
- 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;
}
}
diff --git a/actions/apitimelineretweetedtome.php b/actions/apitimelineretweetedtome.php
index 113ab96d2..e47bc30b8 100644
--- a/actions/apitimelineretweetedtome.php
+++ b/actions/apitimelineretweetedtome.php
@@ -122,4 +122,19 @@ class ApiTimelineRetweetedToMeAction extends ApiAuthAction
break;
}
}
+
+ /**
+ * Return true if read only.
+ *
+ * MAY override
+ *
+ * @param array $args other arguments
+ *
+ * @return boolean is read only action?
+ */
+
+ function isReadOnly($args)
+ {
+ return true;
+ }
}
diff --git a/actions/apitimelineretweetsofme.php b/actions/apitimelineretweetsofme.php
index 6ca2c779c..e4b09e9bd 100644
--- a/actions/apitimelineretweetsofme.php
+++ b/actions/apitimelineretweetsofme.php
@@ -123,4 +123,19 @@ class ApiTimelineRetweetsOfMeAction extends ApiAuthAction
break;
}
}
+
+ /**
+ * Return true if read only.
+ *
+ * MAY override
+ *
+ * @param array $args other arguments
+ *
+ * @return boolean is read only action?
+ */
+
+ function isReadOnly($args)
+ {
+ return true;
+ }
}