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:
Mikael Nordfeldth
2013-09-24 02:32:17 +02:00
parent f7719b57f2
commit 64df40e409
37 changed files with 42 additions and 43 deletions

View File

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

View File

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

View File

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

View File

@@ -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();
}
/**

View File

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

View File

@@ -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();
}
/**

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -142,7 +142,7 @@ class YammeradminpanelAction extends AdminPanelAction
$this->elementStart('body');
$form->show();
$this->elementEnd('body');
$this->elementEnd('html');
$this->endHTML();
}
/**

View File

@@ -72,6 +72,6 @@ class YammerauthAction extends AdminPanelAction
$this->elementStart('body');
$form->show();
$this->elementEnd('body');
$this->elementEnd('html');
$this->endHTML();
}
}