common_show_footer() was hidden in an if

darcs-hash:20080619172031-84dde-6b97932d4d51541581c0b220df8ce53cbc51e2da.gz
This commit is contained in:
Evan Prodromou 2008-06-19 13:20:31 -04:00
parent 50c7e4c722
commit 6ef35544b1

View File

@ -23,7 +23,7 @@ require_once(INSTALLDIR.'/lib/settingsaction.php');
require_once(INSTALLDIR.'/lib/openid.php'); require_once(INSTALLDIR.'/lib/openid.php');
class OpenidsettingsAction extends SettingsAction { class OpenidsettingsAction extends SettingsAction {
function show_top($arr) { function show_top($arr) {
$msg = $arr[0]; $msg = $arr[0];
$success = $arr[1]; $success = $arr[1];
@ -44,7 +44,7 @@ class OpenidsettingsAction extends SettingsAction {
common_show_header(_t('OpenID settings'), NULL, array($msg, $success), common_show_header(_t('OpenID settings'), NULL, array($msg, $success),
array($this, 'show_top')); array($this, 'show_top'));
common_element_start('form', array('method' => 'POST', common_element_start('form', array('method' => 'POST',
'id' => 'openidadd', 'id' => 'openidadd',
'action' => 'action' =>
@ -66,18 +66,18 @@ class OpenidsettingsAction extends SettingsAction {
'value' => _t('Add'))); 'value' => _t('Add')));
common_element_end('p'); common_element_end('p');
common_element_end('form'); common_element_end('form');
$oid = new User_openid(); $oid = new User_openid();
$oid->user_id = $user->id; $oid->user_id = $user->id;
$cnt = $oid->find(); $cnt = $oid->find();
if ($cnt > 0) { if ($cnt > 0) {
common_element('h2', NULL, _t('Remove OpenID')); common_element('h2', NULL, _t('Remove OpenID'));
if ($cnt == 1 && !$user->password) { if ($cnt == 1 && !$user->password) {
common_element('p', NULL, common_element('p', NULL,
_t('Removing your only OpenID would make it impossible to log in! ' . _t('Removing your only OpenID would make it impossible to log in! ' .
'If you need to remove it, add another OpenID first.')); 'If you need to remove it, add another OpenID first.'));
@ -90,7 +90,7 @@ class OpenidsettingsAction extends SettingsAction {
} }
} else { } else {
common_element('p', NULL, common_element('p', NULL,
_t('You can remove an OpenID from your account '. _t('You can remove an OpenID from your account '.
'by clicking the button marked "Remove".')); 'by clicking the button marked "Remove".'));
@ -99,7 +99,7 @@ class OpenidsettingsAction extends SettingsAction {
while ($oid->fetch()) { while ($oid->fetch()) {
common_element_start('form', array('method' => 'POST', common_element_start('form', array('method' => 'POST',
'id' => 'openiddelete' . $idx, 'id' => 'openiddelete' . $idx,
'action' => 'action' =>
common_local_url('openidsettings'))); common_local_url('openidsettings')));
common_element_start('p'); common_element_start('p');
common_element('a', array('href' => $oid->canonical), common_element('a', array('href' => $oid->canonical),
@ -118,9 +118,9 @@ class OpenidsettingsAction extends SettingsAction {
$idx++; $idx++;
} }
} }
common_show_footer();
} }
common_show_footer();
} }
function handle_post() { function handle_post() {
@ -135,7 +135,7 @@ class OpenidsettingsAction extends SettingsAction {
$this->show_form(_t('Something weird happened.')); $this->show_form(_t('Something weird happened.'));
} }
} }
function remove_openid() { function remove_openid() {
$openid_url = $this->trimmed('openid_url'); $openid_url = $this->trimmed('openid_url');