Added is_readonly() method to all Actions

darcs-hash:20080722171501-ca946-160bad6c4f80be2b3b105ea9b913f1c0f9edb0ef.gz
This commit is contained in:
zach 2008-07-22 13:15:01 -04:00
parent 80facfa16d
commit 038f762bce
16 changed files with 69 additions and 1 deletions

View File

@ -23,6 +23,10 @@ require_once(INSTALLDIR.'/lib/settingsaction.php');
class AvatarAction extends SettingsAction { class AvatarAction extends SettingsAction {
function is_readonly() {
return false;
}
function get_instructions() { 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.'); 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.');
} }

View File

@ -21,6 +21,10 @@ if (!defined('LACONICA')) { exit(1); }
class ConfirmaddressAction extends Action { class ConfirmaddressAction extends Action {
function is_readonly() {
return false;
}
function handle($args) { function handle($args) {
parent::handle($args); parent::handle($args);
if (!common_logged_in()) { if (!common_logged_in()) {

View File

@ -32,6 +32,10 @@ class FinishaddopenidAction extends Action {
} }
} }
function is_readonly() {
return false;
}
function try_login() { function try_login() {
$consumer =& oid_consumer(); $consumer =& oid_consumer();

View File

@ -23,6 +23,10 @@ require_once(INSTALLDIR.'/lib/omb.php');
class FinishremotesubscribeAction extends Action { class FinishremotesubscribeAction extends Action {
function is_readonly() {
return false;
}
function handle($args) { function handle($args) {
parent::handle($args); parent::handle($args);

View File

@ -21,6 +21,10 @@ if (!defined('LACONICA')) { exit(1); }
class NewnoticeAction extends Action { class NewnoticeAction extends Action {
function is_readonly() {
return false;
}
function handle($args) { function handle($args) {
parent::handle($args); parent::handle($args);
# XXX: Ajax! # XXX: Ajax!

View File

@ -21,6 +21,10 @@ if (!defined('LACONICA')) { exit(1); }
require_once(INSTALLDIR.'/lib/omb.php'); require_once(INSTALLDIR.'/lib/omb.php');
function is_readonly() {
return false;
}
class PostnoticeAction extends Action { class PostnoticeAction extends Action {
function handle($args) { function handle($args) {
parent::handle($args); parent::handle($args);

View File

@ -25,6 +25,10 @@ define(MAX_RECOVERY_TIME, 24 * 60 * 60);
class RecoverpasswordAction extends Action { class RecoverpasswordAction extends Action {
function is_readonly() {
return false;
}
function handle($args) { function handle($args) {
parent::handle($args); parent::handle($args);
if (common_logged_in()) { if (common_logged_in()) {

View File

@ -21,6 +21,10 @@ if (!defined('LACONICA')) { exit(1); }
class RegisterAction extends Action { class RegisterAction extends Action {
function is_readonly() {
return false;
}
function handle($args) { function handle($args) {
parent::handle($args); parent::handle($args);

View File

@ -20,6 +20,11 @@
if (!defined('LACONICA')) { exit(1); } if (!defined('LACONICA')) { exit(1); }
class SubscribeAction extends Action { class SubscribeAction extends Action {
function is_readonly() {
return false;
}
function handle($args) { function handle($args) {
parent::handle($args); parent::handle($args);

View File

@ -23,6 +23,10 @@ require_once(INSTALLDIR.'/lib/twitterapi.php');
class TwitapiaccountAction extends TwitterapiAction { class TwitapiaccountAction extends TwitterapiAction {
function is_readonly() {
return false;
}
function verify_credentials($args, $apidata) { function verify_credentials($args, $apidata) {
if ($apidata['content-type'] == 'xml') { if ($apidata['content-type'] == 'xml') {

View File

@ -27,6 +27,10 @@ require_once(INSTALLDIR.'/lib/twitterapi.php');
*/ */
class TwitapistatusesAction extends TwitterapiAction { class TwitapistatusesAction extends TwitterapiAction {
function is_readonly() {
return false;
}
function public_timeline($args, $apidata) { function public_timeline($args, $apidata) {
parent::handle($args); parent::handle($args);

View File

@ -18,6 +18,11 @@
*/ */
class UnsubscribeAction extends Action { class UnsubscribeAction extends Action {
function is_readonly() {
return false;
}
function handle($args) { function handle($args) {
parent::handle($args); parent::handle($args);
if (!common_logged_in()) { if (!common_logged_in()) {

View File

@ -22,6 +22,11 @@ if (!defined('LACONICA')) { exit(1); }
require_once(INSTALLDIR.'/lib/omb.php'); require_once(INSTALLDIR.'/lib/omb.php');
class UpdateprofileAction extends Action { class UpdateprofileAction extends Action {
function is_readonly() {
return false;
}
function handle($args) { function handle($args) {
parent::handle($args); parent::handle($args);
try { try {

View File

@ -23,6 +23,11 @@ require_once(INSTALLDIR.'/lib/omb.php');
define('TIMESTAMP_THRESHOLD', 300); define('TIMESTAMP_THRESHOLD', 300);
class UserauthorizationAction extends Action { class UserauthorizationAction extends Action {
function is_readonly() {
return false;
}
function handle($args) { function handle($args) {
parent::handle($args); parent::handle($args);

View File

@ -26,6 +26,10 @@ class Action { // lawsuit
function Action() { function Action() {
} }
function is_readonly() {
return true;
}
function arg($key, $def=NULL) { function arg($key, $def=NULL) {
if (array_key_exists($key, $this->args)) { if (array_key_exists($key, $this->args)) {
return $this->args[$key]; return $this->args[$key];

View File

@ -21,6 +21,10 @@ if (!defined('LACONICA')) { exit(1); }
class SettingsAction extends Action { class SettingsAction extends Action {
function is_readonly() {
return false;
}
function handle($args) { function handle($args) {
parent::handle($args); parent::handle($args);
if (!common_logged_in()) { if (!common_logged_in()) {