We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 038f762b authored by zach's avatar zach

Added is_readonly() method to all Actions

darcs-hash:20080722171501-ca946-160bad6c4f80be2b3b105ea9b913f1c0f9edb0ef.gz
parent 80facfa1
......@@ -23,6 +23,10 @@ require_once(INSTALLDIR.'/lib/settingsaction.php');
class AvatarAction extends SettingsAction {
function is_readonly() {
return false;
}
function get_instructions() {
return _('Upload a new "avatar" (user image) here. You can\'t edit the picture after you upload it, so make sure it\'s more or less square. It must be under the site license, also. Use a picture that belongs to you and that you want to share.');
}
......
......@@ -21,6 +21,10 @@ if (!defined('LACONICA')) { exit(1); }
class ConfirmaddressAction extends Action {
function is_readonly() {
return false;
}
function handle($args) {
parent::handle($args);
if (!common_logged_in()) {
......
......@@ -32,6 +32,10 @@ class FinishaddopenidAction extends Action {
}
}
function is_readonly() {
return false;
}
function try_login() {
$consumer =& oid_consumer();
......
......@@ -23,6 +23,10 @@ require_once(INSTALLDIR.'/lib/omb.php');
class FinishremotesubscribeAction extends Action {
function is_readonly() {
return false;
}
function handle($args) {
parent::handle($args);
......
......@@ -21,6 +21,10 @@ if (!defined('LACONICA')) { exit(1); }
class NewnoticeAction extends Action {
function is_readonly() {
return false;
}
function handle($args) {
parent::handle($args);
# XXX: Ajax!
......
......@@ -21,6 +21,10 @@ if (!defined('LACONICA')) { exit(1); }
require_once(INSTALLDIR.'/lib/omb.php');
function is_readonly() {
return false;
}
class PostnoticeAction extends Action {
function handle($args) {
parent::handle($args);
......
......@@ -25,6 +25,10 @@ define(MAX_RECOVERY_TIME, 24 * 60 * 60);
class RecoverpasswordAction extends Action {
function is_readonly() {
return false;
}
function handle($args) {
parent::handle($args);
if (common_logged_in()) {
......
......@@ -21,6 +21,10 @@ if (!defined('LACONICA')) { exit(1); }
class RegisterAction extends Action {
function is_readonly() {
return false;
}
function handle($args) {
parent::handle($args);
......
......@@ -20,6 +20,11 @@
if (!defined('LACONICA')) { exit(1); }
class SubscribeAction extends Action {
function is_readonly() {
return false;
}
function handle($args) {
parent::handle($args);
......
......@@ -23,6 +23,10 @@ require_once(INSTALLDIR.'/lib/twitterapi.php');
class TwitapiaccountAction extends TwitterapiAction {
function is_readonly() {
return false;
}
function verify_credentials($args, $apidata) {
if ($apidata['content-type'] == 'xml') {
......
......@@ -27,6 +27,10 @@ require_once(INSTALLDIR.'/lib/twitterapi.php');
*/
class TwitapistatusesAction extends TwitterapiAction {
function is_readonly() {
return false;
}
function public_timeline($args, $apidata) {
parent::handle($args);
......
......@@ -18,6 +18,11 @@
*/
class UnsubscribeAction extends Action {
function is_readonly() {
return false;
}
function handle($args) {
parent::handle($args);
if (!common_logged_in()) {
......
......@@ -22,6 +22,11 @@ if (!defined('LACONICA')) { exit(1); }
require_once(INSTALLDIR.'/lib/omb.php');
class UpdateprofileAction extends Action {
function is_readonly() {
return false;
}
function handle($args) {
parent::handle($args);
try {
......
......@@ -23,6 +23,11 @@ require_once(INSTALLDIR.'/lib/omb.php');
define('TIMESTAMP_THRESHOLD', 300);
class UserauthorizationAction extends Action {
function is_readonly() {
return false;
}
function handle($args) {
parent::handle($args);
......
......@@ -26,6 +26,10 @@ class Action { // lawsuit
function Action() {
}
function is_readonly() {
return true;
}
function arg($key, $def=NULL) {
if (array_key_exists($key, $this->args)) {
return $this->args[$key];
......@@ -55,7 +59,7 @@ class Action { // lawsuit
} else {
return $def;
}
}
}
function server_error($msg, $code=500) {
$action = $this->trimmed('action');
......
......@@ -21,6 +21,10 @@ if (!defined('LACONICA')) { exit(1); }
class SettingsAction extends Action {
function is_readonly() {
return false;
}
function handle($args) {
parent::handle($args);
if (!common_logged_in()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment