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
rodzic 80facfa16d
commit 038f762bce
16 zmienionych plików z 69 dodań i 1 usunięć

Wyświetl plik

@ -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.');
}

Wyświetl plik

@ -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()) {

Wyświetl plik

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

Wyświetl plik

@ -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);

Wyświetl plik

@ -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!

Wyświetl plik

@ -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);

Wyświetl plik

@ -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()) {

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

@ -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') {

Wyświetl plik

@ -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);

Wyświetl plik

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

Wyświetl plik

@ -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 {

Wyświetl plik

@ -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);

Wyświetl plik

@ -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');

Wyświetl plik

@ -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()) {