]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
local-only is optional on public timeline
authorEvan Prodromou <evan@prodromou.name>
Fri, 22 Aug 2008 21:03:07 +0000 (17:03 -0400)
committerEvan Prodromou <evan@prodromou.name>
Fri, 22 Aug 2008 21:03:07 +0000 (17:03 -0400)
darcs-hash:20080822210307-84dde-c90f6e7953d11c5b12c7a084ac23e5578412932c.gz

actions/public.php
actions/publicrss.php
actions/twitapistatuses.php
lib/common.php

index b66a3f0f13f9a1c6c9b6fca52e441743505b34f6..f99215dadbdd8aec3759aa37ac53d7d67e9d9b28 100644 (file)
@@ -63,7 +63,9 @@ class PublicAction extends StreamAction {
 
                # XXX: sub-optimal
 
-               $notice->is_local = 1;
+               if (common_config('public', 'localonly')) {
+                       $notice->is_local = 1;
+               }
 
                $notice->orderBy('created DESC, notice.id DESC');
 
index 185a4ff785f192c90202a70f0680485579df0256..98a1908abf4851b90134ac663b6c73a2b6e50236 100644 (file)
@@ -38,7 +38,9 @@ class PublicrssAction extends Rss10Action {
 
                # XXX: bad performance
 
-               $notice->is_local = 1;
+               if (common_config('public', 'localonly')) {
+                       $notice->is_local = 1;
+               }
 
                $notice->orderBy('created DESC, notice.id DESC');
 
index 2f95d90c9d34086da64201111d873cab4cde82e6..3041240dded4dd59fdff76e5da2f49f0f0637672 100644 (file)
@@ -61,7 +61,10 @@ class TwitapistatusesAction extends TwitterapiAction {
 
                # XXX: sub-optimal performance
 
-               $notice->is_local = 1;
+               if (common_config('public', 'localonly')) {
+                       $notice->is_local = 1;
+               }
+
                $notice->orderBy('created DESC, notice.id DESC');
                $notice->limit($MAX_PUBSTATUSES);
                $cnt = $notice->find();
index 32ef6ea7bdede384596ff2890b94e294b027ce5d..6db9f91fe4efc757de40b7fff86bbb848a77d788 100644 (file)
@@ -77,6 +77,8 @@ $config =
                array('blacklist' => array()),
                'avatar' =>
                array('server' => NULL),
+               'public' =>
+               array('localonly' => true),
                'theme' =>
                array('server' => NULL),
                'xmpp' =>