From f294eab92a4e44c0ad8790b7875173a1340f4b5c Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 15 Jan 2009 23:07:49 +0000 Subject: is_readonly() -> isReadOnly() --- index.php | 2 +- lib/action.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 3cecb5c8b..387b642e2 100644 --- a/index.php +++ b/index.php @@ -55,7 +55,7 @@ if (file_exists($actionfile)) { $action_obj = new $action_class(); - if ($config['db']['mirror'] && $action_obj->is_readonly()) { + if ($config['db']['mirror'] && $action_obj->isReadOnly()) { if (is_array($config['db']['mirror'])) { // "load balancing", ha ha $k = array_rand($config['db']['mirror']); diff --git a/lib/action.php b/lib/action.php index 207be3c82..2a8f5677c 100644 --- a/lib/action.php +++ b/lib/action.php @@ -460,7 +460,7 @@ class Action extends HTMLOutputter // lawsuit return null; } - function is_readonly() + function isReadOnly() { return false; } -- cgit v1.2.3-54-g00ecf From ba9f1f603b5d832d8dd2f2b910ddf90bf32181b8 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 15 Jan 2009 23:09:16 +0000 Subject: All actions now use isReadOnly() --- actions/api.php | 2 +- actions/foaf.php | 2 +- actions/invite.php | 2 +- actions/login.php | 21 ++++++++------------- actions/logout.php | 2 +- actions/publicxrds.php | 2 +- actions/requesttoken.php | 2 +- actions/sup.php | 2 +- actions/userbyid.php | 2 +- actions/xrds.php | 2 +- 10 files changed, 17 insertions(+), 22 deletions(-) diff --git a/actions/api.php b/actions/api.php index 64971774d..47c119605 100644 --- a/actions/api.php +++ b/actions/api.php @@ -174,7 +174,7 @@ class ApiAction extends Action } } - function is_readonly() + function isReadOnly() { # NOTE: before handle(), can't use $this->arg $apiaction = $_REQUEST['apiaction']; diff --git a/actions/foaf.php b/actions/foaf.php index a0f8a1ff3..9fa321d4a 100644 --- a/actions/foaf.php +++ b/actions/foaf.php @@ -26,7 +26,7 @@ define('BOTH', 0); class FoafAction extends Action { - function is_readonly() + function isReadOnly() { return true; } diff --git a/actions/invite.php b/actions/invite.php index 879264deb..95d96bcde 100644 --- a/actions/invite.php +++ b/actions/invite.php @@ -22,7 +22,7 @@ if (!defined('LACONICA')) { exit(1); } class InviteAction extends Action { - function is_readonly() + function isReadOnly() { return false; } diff --git a/actions/login.php b/actions/login.php index 060d16ad6..cd337bd39 100644 --- a/actions/login.php +++ b/actions/login.php @@ -22,7 +22,7 @@ if (!defined('LACONICA')) { exit(1); } class LoginAction extends Action { - function is_readonly() + function isReadOnly() { return true; } @@ -33,13 +33,13 @@ class LoginAction extends Action if (common_is_real_login()) { $this->clientError(_('Already logged in.')); } else if ($_SERVER['REQUEST_METHOD'] == 'POST') { - $this->check_login(); + $this->checkLogin(); } else { - $this->show_form(); + $this->showForm(); } } - function check_login() + function checkLogin() { # XXX: login throttle @@ -75,7 +75,7 @@ class LoginAction extends Action } common_redirect($url); } else { - $this->show_form(_('Incorrect username or password.')); + $this->showForm(_('Incorrect username or password.')); return; } @@ -104,7 +104,7 @@ class LoginAction extends Action common_redirect($url); } - function show_form($error=null) + function showForm($error=null) { $this->error = $error; $this->showPage(); @@ -120,7 +120,7 @@ class LoginAction extends Action if ($this->error) { $this->element('p', 'error', $this->error); } else { - $instr = $this->get_instructions(); + $instr = $this->getInstructions(); $output = common_markup_to_html($instr); $this->elementStart('div', 'instructions'); $this->raw($output); @@ -145,10 +145,9 @@ class LoginAction extends Action $this->element('a', array('href' => common_local_url('recoverpassword')), _('Lost or forgotten password?')); $this->elementEnd('p'); - common_show_footer(); } - function get_instructions() + function getInstructions() { if (common_logged_in() && !common_is_real_login() && @@ -166,8 +165,4 @@ class LoginAction extends Action 'try [OpenID](%%action.openidlogin%%). '); } } - - function show_top($error=null) - { - } } diff --git a/actions/logout.php b/actions/logout.php index 3001f3613..86d6270ab 100644 --- a/actions/logout.php +++ b/actions/logout.php @@ -24,7 +24,7 @@ require_once(INSTALLDIR.'/lib/openid.php'); class LogoutAction extends Action { - function is_readonly() + function isReadOnly() { return true; } diff --git a/actions/publicxrds.php b/actions/publicxrds.php index f66e34533..e765fb1c9 100644 --- a/actions/publicxrds.php +++ b/actions/publicxrds.php @@ -26,7 +26,7 @@ require_once(INSTALLDIR.'/lib/openid.php'); class PublicxrdsAction extends Action { - function is_readonly() + function isReadOnly() { return true; } diff --git a/actions/requesttoken.php b/actions/requesttoken.php index 378db4403..5058deedb 100644 --- a/actions/requesttoken.php +++ b/actions/requesttoken.php @@ -24,7 +24,7 @@ require_once(INSTALLDIR.'/lib/omb.php'); class RequesttokenAction extends Action { - function is_readonly() + function isReadOnly() { return false; } diff --git a/actions/sup.php b/actions/sup.php index 6a1897585..38e2e2e59 100644 --- a/actions/sup.php +++ b/actions/sup.php @@ -79,7 +79,7 @@ class SupAction extends Action return $updates; } - function is_readonly() + function isReadOnly() { return true; } diff --git a/actions/userbyid.php b/actions/userbyid.php index 3ff2c9c41..4bb896c38 100644 --- a/actions/userbyid.php +++ b/actions/userbyid.php @@ -22,7 +22,7 @@ if (!defined('LACONICA')) { exit(1); } class UserbyidAction extends Action { - function is_readonly() + function isReadOnly() { return true; } diff --git a/actions/xrds.php b/actions/xrds.php index 7cb2cd210..14cb9d503 100644 --- a/actions/xrds.php +++ b/actions/xrds.php @@ -24,7 +24,7 @@ require_once(INSTALLDIR.'/lib/omb.php'); class XrdsAction extends Action { - function is_readonly() + function isReadOnly() { return true; } -- cgit v1.2.3-54-g00ecf