]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
hide feeds from group page if it's private-only
authorEvan Prodromou <evan@status.net>
Mon, 7 Feb 2011 19:24:35 +0000 (14:24 -0500)
committerEvan Prodromou <evan@status.net>
Mon, 7 Feb 2011 19:24:35 +0000 (14:24 -0500)
plugins/GroupPrivateMessage/GroupPrivateMessagePlugin.php

index e086fe91dc17f506d52b2103e71c44e8220ca9a4..6a58ec3e21d585c7608325b809eb370d02ce9087 100644 (file)
@@ -478,6 +478,18 @@ class GroupPrivateMessagePlugin extends Plugin
         return true;
     }
 
+    function onStartShowExportData($action)
+    {
+        if ($action instanceof ShowgroupAction) {
+            $gps = Group_privacy_settings::forGroup($action->group);
+        
+            if ($gps->allow_privacy == Group_privacy_settings::ALWAYS) {
+                return false;
+            }
+        }
+        return true;
+    }
+
     function onPluginVersion(&$versions)
     {
         $versions[] = array('name' => 'GroupPrivateMessage',