X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Faction.php;h=c2d60e11e974bec1414fe2b9b143b4babdb4ce0d;hb=17a65ff873156a936baba6ad29640a7722ed2220;hp=a9cc99221da1b2eb573bb309aac6f323e4352a21;hpb=c94d9994d898eddf654121ac45d455891954e830;p=quix0rs-gnu-social.git diff --git a/lib/action.php b/lib/action.php index a9cc99221d..c2d60e11e9 100644 --- a/lib/action.php +++ b/lib/action.php @@ -125,11 +125,10 @@ class Action extends HTMLOutputter // lawsuit } else { common_debug('Prepare failed for Action.'); } - } - - $this->flush(); - Event::handle('EndActionExecute', array($this)); + $this->flush(); + Event::handle('EndActionExecute', array($this)); + } } /** @@ -206,7 +205,7 @@ class Action extends HTMLOutputter // lawsuit * * @return nothing */ - function showPage() + public function showPage() { if (GNUsocial::isAjax()) { self::showAjax(); @@ -461,6 +460,7 @@ class Action extends HTMLOutputter // lawsuit // TRANS: Localized tooltip for '...' expansion button on overlong remote messages. $messages['showmore_tooltip'] = _m('TOOLTIP', 'Show more'); + $messages['popup_close_button'] = _m('TOOLTIP', 'Close popup'); $messages = array_merge($messages, $this->getScriptMessages()); @@ -535,15 +535,11 @@ class Action extends HTMLOutputter // lawsuit */ function showFeeds() { - $feeds = $this->getFeeds(); - - if ($feeds) { - foreach ($feeds as $feed) { - $this->element('link', array('rel' => $feed->rel(), - 'href' => $feed->url, - 'type' => $feed->mimeType(), - 'title' => $feed->title)); - } + foreach ($this->getFeeds() as $feed) { + $this->element('link', array('rel' => $feed->rel(), + 'href' => $feed->url, + 'type' => $feed->mimeType(), + 'title' => $feed->title)); } } @@ -1036,9 +1032,9 @@ class Action extends HTMLOutputter // lawsuit function showExportData() { $feeds = $this->getFeeds(); - if ($feeds) { - $fl = new FeedList($this); - $fl->show($feeds); + if (!empty($feeds)) { + $fl = new FeedList($this, $feeds); + $fl->show(); } } @@ -1494,7 +1490,7 @@ class Action extends HTMLOutputter // lawsuit } $this->initDocument('json'); $error_array = array('error' => $msg, 'request' => $_SERVER['REQUEST_URI']); - $this->text(json_encode($error_array)); + print(json_encode($error_array)); $this->endDocument('json'); break; case 'text': @@ -1659,7 +1655,7 @@ class Action extends HTMLOutputter // lawsuit */ function getFeeds() { - return null; + return array(); } /**