Filling in missing endHTML calls for Action AJAX
This completes 1c6f9df80e
where a lot
of other functions were fixed (by conforming to startHTML and endHTML)
This commit is contained in:
parent
f7719b57f2
commit
64df40e409
|
@ -156,7 +156,7 @@ class AddpeopletagAction extends Action
|
|||
$unsubscribe = new UntagButton($this, $this->tagged, $this->peopletag);
|
||||
$unsubscribe->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
$url = common_local_url('subscriptions',
|
||||
array('nickname' => $this->user->nickname));
|
||||
|
|
|
@ -184,7 +184,7 @@ class ApprovegroupAction extends Action
|
|||
$this->element('p', 'success', _('Join request canceled.'));
|
||||
}
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
common_redirect(common_local_url('groupmembers', array('nickname' =>
|
||||
$this->group->nickname)),
|
||||
|
|
|
@ -136,7 +136,7 @@ class ApprovesubAction extends Action
|
|||
$this->element('p', 'success', _('Subscription canceled.'));
|
||||
}
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
common_redirect(common_local_url('subqueue', array('nickname' =>
|
||||
$cur->nickname)),
|
||||
|
|
|
@ -162,7 +162,7 @@ class CancelgroupAction extends Action
|
|||
$jf = new JoinForm($this, $this->group);
|
||||
$jf->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
common_redirect(common_local_url('groupmembers', array('nickname' =>
|
||||
$this->group->nickname)),
|
||||
|
|
|
@ -114,7 +114,7 @@ class CancelsubscriptionAction extends Action
|
|||
$subscribe = new SubscribeForm($this, $other);
|
||||
$subscribe->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
common_redirect(common_local_url('subscriptions',
|
||||
array('nickname' => $user->nickname)),
|
||||
|
|
|
@ -162,7 +162,7 @@ class DeletegroupAction extends RedirectingAction
|
|||
$this->elementStart('body');
|
||||
// @fixme add a sensible AJAX response form!
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
// @fixme if we could direct to the page on which this group
|
||||
// would have shown... that would be awesome
|
||||
|
|
|
@ -84,7 +84,7 @@ class DisfavorAction extends FormAction
|
|||
$favor = new FavorForm($this, $notice);
|
||||
$favor->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ class FavorAction extends FormAction
|
|||
$disfavor = new DisFavorForm($this, $notice);
|
||||
$disfavor->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
exit;
|
||||
}
|
||||
common_redirect(common_local_url('showfavorites',
|
||||
|
|
|
@ -163,7 +163,7 @@ class JoingroupAction extends Action
|
|||
}
|
||||
$form->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
common_redirect(common_local_url('groupmembers', array('nickname' =>
|
||||
$this->group->nickname)),
|
||||
|
|
|
@ -145,7 +145,7 @@ class LeavegroupAction extends Action
|
|||
$jf = new JoinForm($this, $this->group);
|
||||
$jf->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
common_redirect(common_local_url('groupmembers', array('nickname' =>
|
||||
$this->group->nickname)),
|
||||
|
|
|
@ -154,7 +154,7 @@ class NewmessageAction extends FormAction
|
|||
sprintf(_('Direct message to %s sent.'),
|
||||
$this->other->nickname));
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
$url = common_local_url('outbox',
|
||||
array('nickname' => $this->scoped->nickname));
|
||||
|
@ -182,7 +182,7 @@ class NewmessageAction extends FormAction
|
|||
$this->elementStart('body');
|
||||
$this->element('p', array('id' => 'error'), $msg);
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
}
|
||||
|
||||
function showForm($msg = null)
|
||||
|
|
|
@ -217,7 +217,7 @@ class NewnoticeAction extends FormAction
|
|||
$this->elementStart('body');
|
||||
$this->element('p', array('id' => 'error'), $msg);
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -242,7 +242,7 @@ class NewnoticeAction extends FormAction
|
|||
$form->show();
|
||||
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -101,7 +101,7 @@ class NudgeAction extends Action
|
|||
// TRANS: Confirmation text after sending a nudge.
|
||||
$this->element('p', array('id' => 'nudge_response'), _('Nudge sent!'));
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
// display a confirmation to the user
|
||||
common_redirect(common_local_url('showstream',
|
||||
|
|
|
@ -141,7 +141,7 @@ class PluginEnableAction extends Action
|
|||
$form = $this->successNextForm();
|
||||
$form->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
$url = common_local_url('pluginsadminpanel');
|
||||
common_redirect($url, 303);
|
||||
|
|
|
@ -151,7 +151,7 @@ class ProfilecompletionAction extends Action
|
|||
}
|
||||
}
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
}
|
||||
|
||||
function getResults()
|
||||
|
|
|
@ -158,7 +158,7 @@ class RemovepeopletagAction extends Action
|
|||
$unsubscribe = new TagButton($this, $this->tagged, $this->peopletag);
|
||||
$unsubscribe->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
$url = common_local_url('subscriptions',
|
||||
array('nickname' => $this->user->nickname));
|
||||
|
|
|
@ -107,7 +107,7 @@ class RepeatAction extends Action
|
|||
// TRANS: Confirmation text after repeating a notice.
|
||||
_('Repeated!'));
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
// @todo FIXME!
|
||||
}
|
||||
|
|
|
@ -144,7 +144,7 @@ class SubscribeAction extends Action
|
|||
}
|
||||
$form->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
$url = common_local_url('subscriptions',
|
||||
array('nickname' => $this->user->nickname));
|
||||
|
|
|
@ -140,7 +140,7 @@ class SubscribepeopletagAction extends Action
|
|||
$lf = new UnsubscribePeopletagForm($this, $this->peopletag);
|
||||
$lf->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
common_redirect(common_local_url('peopletagsubscribers',
|
||||
array('tagger' => $this->tagger->nickname,
|
||||
|
|
|
@ -94,7 +94,7 @@ class TagprofileAction extends Action
|
|||
$this->elementStart('body');
|
||||
$this->element('p', 'error', $error);
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
$this->showPage();
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ class TagprofileAction extends Action
|
|||
}
|
||||
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
// TRANS: Success message if lists are saved.
|
||||
$this->error = _('Lists saved.');
|
||||
|
|
|
@ -102,7 +102,7 @@ class UnsubscribeAction extends Action
|
|||
$subscribe = new SubscribeForm($this, $other);
|
||||
$subscribe->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
common_redirect(common_local_url('subscriptions',
|
||||
array('nickname' => $this->scoped->nickname)),
|
||||
|
|
|
@ -133,7 +133,7 @@ class UnsubscribepeopletagAction extends Action
|
|||
$lf = new SubscribePeopletagForm($this, $this->peopletag);
|
||||
$lf->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
if (common_get_returnto()) {
|
||||
common_redirect(common_get_returnto(), 303);
|
||||
|
|
|
@ -119,6 +119,6 @@ class ErrorAction extends InfoAction
|
|||
$this->elementStart('body');
|
||||
$this->element('p', array('id' => 'error'), $this->message);
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ class TrainAction extends Action
|
|||
$this->elementStart('body');
|
||||
$form->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
common_redirect(common_local_url('spam'), 303);
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ class AnonDisfavorAction extends RedirectingAction
|
|||
$favor = new AnonFavorForm($this, $notice);
|
||||
$favor->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
$this->returnToPrevious();
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ class AnonFavorAction extends RedirectingAction
|
|||
$disfavor = new AnonDisFavorForm($this, $notice);
|
||||
$disfavor->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
$this->returnToPrevious();
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ class BookmarkforurlAction extends Action
|
|||
$bf = new BookmarkForm($this, $this->title, $this->url, null, null, $this->thumbnail);
|
||||
$bf->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -149,7 +149,7 @@ class NewgroupmessageAction extends Action
|
|||
sprintf(_m('Direct message to %s sent.'),
|
||||
$this->group->nickname));
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
common_redirect($gm->url, 303);
|
||||
}
|
||||
|
|
|
@ -226,7 +226,7 @@ class QnanewanswerAction extends Action
|
|||
$this->elementStart('body');
|
||||
$this->element('p', array('id' => 'error'), $msg);
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -252,7 +252,7 @@ class QnanewanswerAction extends Action
|
|||
$form->show();
|
||||
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -139,7 +139,7 @@ class SearchsubAction extends Action
|
|||
$unsubscribe = new SearchUnsubForm($this, $this->search);
|
||||
$unsubscribe->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
$url = common_local_url('search',
|
||||
array('search' => $this->search));
|
||||
|
|
|
@ -79,7 +79,7 @@ class SearchunsubAction extends SearchsubAction
|
|||
$subscribe = new SearchSubForm($this, $this->search);
|
||||
$subscribe->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
$url = common_local_url('search',
|
||||
array('search' => $this->search));
|
||||
|
|
|
@ -167,7 +167,7 @@ abstract class BaseMirrorAction extends Action
|
|||
$unsubscribe = new EditMirrorForm($this, $this->profile);
|
||||
$unsubscribe->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
$url = common_local_url('mirrorsettings');
|
||||
common_redirect($url, 303);
|
||||
|
|
|
@ -126,8 +126,7 @@ class MirrorSettingsAction extends SettingsAction
|
|||
function handle($args)
|
||||
{
|
||||
if ($this->boolean('ajax')) {
|
||||
header('Content-Type: text/html;charset=utf-8');
|
||||
$this->elementStart('html');
|
||||
$this->startHTML('text/xml;charset=utf-8');
|
||||
$this->elementStart('head');
|
||||
// TRANS: Title for page with form to add a mirror feed provider on.
|
||||
$this->element('title', null, _m('Provider add'));
|
||||
|
@ -137,7 +136,7 @@ class MirrorSettingsAction extends SettingsAction
|
|||
$this->showAddFeedForm();
|
||||
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
return parent::handle($args);
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ class TagsubAction extends Action
|
|||
$unsubscribe = new TagUnsubForm($this, $this->tag);
|
||||
$unsubscribe->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
$url = common_local_url('tag',
|
||||
array('tag' => $this->tag));
|
||||
|
|
|
@ -79,7 +79,7 @@ class TagunsubAction extends TagsubAction
|
|||
$subscribe = new TagSubForm($this, $this->tag);
|
||||
$subscribe->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
} else {
|
||||
$url = common_local_url('tag',
|
||||
array('tag' => $this->tag));
|
||||
|
|
|
@ -142,7 +142,7 @@ class YammeradminpanelAction extends AdminPanelAction
|
|||
$this->elementStart('body');
|
||||
$form->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -72,6 +72,6 @@ class YammerauthAction extends AdminPanelAction
|
|||
$this->elementStart('body');
|
||||
$form->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
$this->endHTML();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user