]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fixes to bugs where non-local messages were being wrong put in the public timeline...
authorCiaran Gultnieks <ciaran@ciarang.com>
Thu, 7 Jan 2010 20:59:31 +0000 (20:59 +0000)
committerCiaran Gultnieks <ciaran@ciarang.com>
Thu, 7 Jan 2010 20:59:31 +0000 (20:59 +0000)
actions/shownotice.php
classes/Notice.php
lib/jabber.php
lib/noticelist.php
lib/ping.php

index 5d16fdad9ed84a4706d759c04f9d681ab37ac760..d09100f676aaf473e46e54aadd409f6ff1b1eb0c 100644 (file)
@@ -103,7 +103,7 @@ class ShownoticeAction extends OwnerDesignAction
 
         $this->user = User::staticGet('id', $this->profile->id);
 
-        if (! $this->notice->is_local) {
+        if ($this->notice->is_local == Notice::REMOTE_OMB) {
             common_redirect($this->notice->uri);
             return false;
         }
index 9fa022650f67cdd814df885e8cb57f0c636bb6e3..9bda478271f23af89bf37458f5a86a2a12fde02f 100644 (file)
@@ -63,7 +63,7 @@ class Notice extends Memcached_DataObject
     public $created;                         // datetime  multiple_key not_null default_0000-00-00%2000%3A00%3A00
     public $modified;                        // timestamp   not_null default_CURRENT_TIMESTAMP
     public $reply_to;                        // int(4)
-    public $is_local;                        // tinyint(1)
+    public $is_local;                        // int(4)
     public $source;                          // varchar(32)
     public $conversation;                    // int(4)
     public $lat;                             // decimal(10,7)
index 01aed8ffa54d8d6a351a8172ccedbb1b10529241..6e094c207e5b21099f9f372bd1b10025ec8f7603 100644 (file)
@@ -440,7 +440,7 @@ function jabber_public_notice($notice)
     // XXX: should we send out non-local messages if public,localonly
     // = false? I think not
 
-    if ($public && $notice->is_local) {
+    if ($public && $notice->is_local == LOCAL_PUBLIC) {
         $profile = Profile::staticGet($notice->profile_id);
 
         if (!$profile) {
index 5eb2633ac288ccbf479df5b84369374b94430022..78abf34a76d512bb6fd289fbd6f4a5ce4fabf153 100644 (file)
@@ -379,7 +379,7 @@ class NoticeListItem extends Widget
 
     function showNoticeLink()
     {
-        if($this->notice->is_local){
+        if($this->notice->is_local == Notice::LOCAL_PUBLIC || $this->notice->is_local == Notice::LOCAL_NONPUBLIC){
             $noticeurl = common_local_url('shownotice',
                                       array('notice' => $this->notice->id));
         }else{
index 5698c403875e52b584b80a5fd5f86d8b93a4699f..735af9ef134ecccb2ad55a089f10ba7c3dd37cce 100644 (file)
@@ -21,7 +21,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
 
 function ping_broadcast_notice($notice) {
 
-       if (!$notice->is_local) {
+       if ($notice->is_local != Notice::LOCAL_PUBLIC && $notice->is_local != Notice::LOCAL_NONPUBLIC) {
                return true;
        }
 
@@ -115,4 +115,4 @@ function ping_notice_tags($notice) {
                return implode('|', $tags);
        }
        return NULL;
-}
\ No newline at end of file
+}