]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Filling in missing endHTML calls for Action AJAX
authorMikael Nordfeldth <mmn@hethane.se>
Tue, 24 Sep 2013 00:32:17 +0000 (02:32 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Tue, 24 Sep 2013 00:32:17 +0000 (02:32 +0200)
This completes 1c6f9df80e7e6927e964fdfdd72fda9b15106ddd where a lot
of other functions were fixed (by conforming to startHTML and endHTML)

37 files changed:
actions/addpeopletag.php
actions/approvegroup.php
actions/approvesub.php
actions/cancelgroup.php
actions/cancelsubscription.php
actions/deletegroup.php
actions/disfavor.php
actions/favor.php
actions/joingroup.php
actions/leavegroup.php
actions/newmessage.php
actions/newnotice.php
actions/nudge.php
actions/pluginenable.php
actions/profilecompletion.php
actions/removepeopletag.php
actions/repeat.php
actions/subscribe.php
actions/subscribepeopletag.php
actions/tagprofile.php
actions/unsubscribe.php
actions/unsubscribepeopletag.php
lib/error.php
plugins/ActivitySpam/actions/train.php
plugins/AnonymousFave/actions/anondisfavor.php
plugins/AnonymousFave/actions/anonfavor.php
plugins/Bookmark/actions/bookmarkforurl.php
plugins/GroupPrivateMessage/actions/newgroupmessage.php
plugins/QnA/actions/qnanewanswer.php
plugins/SearchSub/actions/searchsub.php
plugins/SearchSub/actions/searchunsub.php
plugins/SubMirror/actions/basemirror.php
plugins/SubMirror/actions/mirrorsettings.php
plugins/TagSub/actions/tagsub.php
plugins/TagSub/actions/tagunsub.php
plugins/YammerImport/actions/yammeradminpanel.php
plugins/YammerImport/actions/yammerauth.php

index e5e52b83f007d58f0d9e4d2140bc8bc73632cc87..1c0ce55a2b40f20c132c7faa0e74237d4e6cc651 100644 (file)
@@ -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));
index c87d743a7bb3bbd10ac946544c13db9d4dcb851b..db64e0596273c414b0815ebfbfc671dc707c076c 100644 (file)
@@ -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)),
index 89368686a9eac6afb187c05d71d050140903f112..b92ad66e7ae16d65fc13fe61082dc90f3973e7f4 100644 (file)
@@ -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)),
index 66ae6b3695b1a984fc02067df336e952bbe35479..4196eb3ffc5e01356f79d948bbd7adae191e350f 100644 (file)
@@ -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)),
index 2baecbd22686200a2056173475070f623dae5b91..590fde9f2ef309c5192a8a073b23637aec7466af 100644 (file)
@@ -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)),
index 0a0baf887c9af1d73079e765efc8633268abc0b5..5efb5e6a919feb23b70806055b46be86a2f98958 100644 (file)
@@ -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
index 40285be4cf3f9cd5da3a2d200aa881a4bf6683ea..72b8d26f761aedaa7468df3f5c179d2f74851caf 100644 (file)
@@ -84,7 +84,7 @@ class DisfavorAction extends FormAction
             $favor = new FavorForm($this, $notice);
             $favor->show();
             $this->elementEnd('body');
-            $this->elementEnd('html');
+            $this->endHTML();
             exit;
         }
     }
index 05c95c5794b373bdd099b5162d4817dccd089233..720d80541fd117f748e2a27e5eb58fe096bb53c4 100644 (file)
@@ -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',
index da61086b68fbd0e27a33cc3721465bdfc9d2c36c..af204698d85d9ae5ba1d7ac348fb64935340381e 100644 (file)
@@ -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)),
index 0d635ed0e244248303f4681bcbcdba2dc8b059a7..d92dd37de56b693c27033d0a1fe9a131251bbb01 100644 (file)
@@ -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)),
index 6816ffae6bfc76a31d561d95cc79fadaae671ccd..364be72a1a7c6542b8ac45eb6e4fbd5e4feaf374 100644 (file)
@@ -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)
index 749cfdecb36e4f764d90f456e05d3558bacbd8f2..7c324aaded4ca054d4114e34477e158006e37ef2 100644 (file)
@@ -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();
     }
 
     /**
index 3287711deed07ecff1005dd6883e2cb9c9f1a1a2..0ca3753dc7bc03427138f3163322f42bf93684f8 100644 (file)
@@ -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',
index 156a604cf060ed64008795f00b4c82af110d53f2..d48cef018368bd8c68f20967976419a10fcf9b11 100644 (file)
@@ -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);
index 6bd8330e011da3a2be70a91a20fad6c57d349d76..b859ccc9439035cda96866dbff3b13ca321d213c 100644 (file)
@@ -151,7 +151,7 @@ class ProfilecompletionAction extends Action
             }
         }
         $this->elementEnd('body');
-        $this->elementEnd('html');
+        $this->endHTML();
     }
 
     function getResults()
index 360d1c4c61fe5c106cf975d0f5f63d5e26312022..7077573999b36fea515506d807b7afe7d3757dcf 100644 (file)
@@ -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));
index 7433cf4b73d76925e2a0024d082f65527ccb9442..baa35f535e480e227322436f23224c7b7cd38bde 100644 (file)
@@ -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!
         }
index faa833ade3599be6608e37db125825d59feac294..5b74c2503b098634695fd029b65f214012729a9f 100644 (file)
@@ -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));
index 9a85e38ef6c86da62cf72cd60f9769cb0f92ac7a..1bb14420ff66b8186ce824fc7c8dc297d0736778 100644 (file)
@@ -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,
index b4312ad4597b1cfbf0ef4a0a7c86ed16e92b2cf0..3acb9e4a865643b97f4fb2b962273af0a7f45984 100644 (file)
@@ -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.');
index 8679ea6256bbf6a4b0b16b030398d7f1503b2d27..1beb295aeca8aba768d17da87a14f6c1a0f85d85 100644 (file)
@@ -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)),
index 5e144ab886a0cf975156cf70ebaaab88ea13567e..c739c6760c55caee3e8102f9a40b520d96262e2c 100644 (file)
@@ -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);
index 4024a9affc37290f1b530afcbce6c9215eb8d128..c24f3bbf433d2621a7199a5803c3c4a464760527 100644 (file)
@@ -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();
     }
 }
index 69124b0dcc1f1772a9317be814f8cd0dc370e3bc..c56f49fb51868297545d2820350a26e0d6adf089 100644 (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);
         }
index 0060b7fa507df5f5cdd34826534c56df64345d96..c54a39202c654084dbd01c242cf39fafc3739c70 100644 (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();
         }
index 61868125c12f9b4478d743dfb6221016b33da67a..da8757082e670af92ff01b4f779e6cd4ed8e901a 100644 (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();
         }
index 4e6de9bffac6dad6128e41cbafcf6f46b36c89f1..8eb02e64a00a56f17a046345271e7111e6e62689 100644 (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();
     }
 
     /**
index 37738a385ca1bce189af3f17551c0e008041ae7f..9b611edc860cb4c6a785b4b4704af9c6dd5c6876 100644 (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);
         }
index 92b640c1669ea5e3026cca31d1c0ad182da48959..49ba5baa697e8036fc4e270b5ed274f3dd4b4912 100644 (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();
     }
 
     /**
index 0234feef400c226da929f2e6d261ee8eed2b3448..dcd072e8f85922432b93ab6bc95c0750508e9653 100644 (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));
index f7f006e21c831fedc1e9662d177b1732285f65b3..a6ce0f07c5b9e0e681e0da9e39bc42c8b7cb03f3 100644 (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));
index e6bbaf68642c8cc6779d269712ee7ad3fa826bc3..bc5e2b541cda7f7134efca7d34be5996dd376586 100644 (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);
index 272698abc37d2f3b04c44bbada59609d0b9c78f7..b8e23ca561a5b13e8a63d2a1ed2b09f6910ac4fc 100644 (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);
         }
index 18335f4cc8cd38b8f2b0f84cd5560a18bf5d986b..dd8c76b53decd12755280bd6ae991c0a2cd50321 100644 (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));
index 26fb9ffec8b005535b78de40f915156bb1a2ebca..43afab08e374c5e2b9dbbcf826b9f746887dcb27 100644 (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));
index f8e099109eac36b4cc4d50cebec0ad2df926b1b8..d1b9259f8b81dcc18c00c30212d9e3498e2807a7 100644 (file)
@@ -142,7 +142,7 @@ class YammeradminpanelAction extends AdminPanelAction
         $this->elementStart('body');
         $form->show();
         $this->elementEnd('body');
-        $this->elementEnd('html');
+        $this->endHTML();
     }
 
     /**
index d25be914401e9db66e3ce33004ec504bf2b152a1..8a648702ca663dbfe984a29ad149d04b28ec8cae 100644 (file)
@@ -72,6 +72,6 @@ class YammerauthAction extends AdminPanelAction
         $this->elementStart('body');
         $form->show();
         $this->elementEnd('body');
-        $this->elementEnd('html');
+        $this->endHTML();
     }
 }