]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/action.php
Merge remote-tracking branch 'upstream/master'
[quix0rs-gnu-social.git] / lib / action.php
index 5dff73906a620f186007ba6b90b54d6f0abb4b06..ca8ece7ebc1a075aa9d5e3e9813e72948d3b8db9 100644 (file)
@@ -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();
     }
 
     /**