Merge remote-tracking branch 'upstream/master'
[quix0rs-gnu-social.git] / actions / tagprofile.php
index 79a401c6a93dccfb7d584ddb088d4cb33f1fdd7d..871d0e30b09012f1b809cf9e68829ef52a5dafc2 100644 (file)
@@ -19,8 +19,6 @@
 
 if (!defined('GNUSOCIAL')) { exit(1); }
 
-require_once INSTALLDIR . '/lib/peopletags.php';
-
 class TagprofileAction extends FormAction
 {
     var $error = null;
@@ -67,6 +65,15 @@ class TagprofileAction extends FormAction
         return sprintf(_m('ADDTOLIST','List %s'), $this->target->getNickname());
     }
 
+    function showPage()
+    {
+        // Only serve page content if we aren't POSTing via ajax
+        // otherwise, we serve XML content from doPost()
+        if (!$this->isPost() || !$this->boolean('ajax')) {
+            parent::showPage();
+        }
+    }
+
     function showContent()
     {
         $this->elementStart('div', 'entity_profile h-card');