]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Only use ActivityVerb::SHARE (forwardId is deprecated)
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 21 Oct 2013 20:25:19 +0000 (22:25 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 21 Oct 2013 20:25:19 +0000 (22:25 +0200)
StatusNet >= 1.0 support it.

classes/Notice.php
lib/activity.php
lib/activitycontext.php

index 65b0d668570d4f4010271ae4f48448113f235a9b..ed5a494f7e6b3eaffdaf9fc49762e19159892a01 100644 (file)
@@ -1603,18 +1603,6 @@ class Notice extends Managed_DataObject
                 break;
             }
 
-            // XXX: deprecated; use ActivityVerb::SHARE instead
-
-            $repeat = null;
-
-            if (!empty($this->repeat_of)) {
-                $repeat = Notice::getKV('id', $this->repeat_of);
-                if (!empty($repeat)) {
-                    $ctx->forwardID  = $repeat->uri;
-                    $ctx->forwardUrl = $repeat->bestUrl();
-                }
-            }
-
             $act->context = $ctx;
 
             $source = $this->getSource();
index 870ece13ad5524bb6dcf2afac1e4da8193c5b07c..eaa7cf1c2d499b0a55915d4d229ff7fb6eeb0671 100644 (file)
@@ -631,19 +631,6 @@ class Activity
                                            'href' => $attnURI));
             }
 
-            // XXX: shoulda used ActivityVerb::SHARE
-
-            if (!empty($this->context->forwardID)) {
-                if (!empty($this->context->forwardUrl)) {
-                    $xs->element('ostatus:forward',
-                                 array('ref' => $this->context->forwardID,
-                                       'href' => $this->context->forwardUrl));
-                } else {
-                    $xs->element('ostatus:forward',
-                                 array('ref' => $this->context->forwardID));
-                }
-            }
-
             if (!empty($this->context->location)) {
                 $loc = $this->context->location;
                 $xs->element('georss:point', null, $loc->lat . ' ' . $loc->lon);
index bd5bb5f76ef56e6e4f75da987fe980d986463b07..371eab3e640bce81d39677ae18b4cf9f976479a7 100644 (file)
@@ -40,8 +40,6 @@ class ActivityContext
     public $attention = array();
     public $attentionType = array();
     public $conversation;
-    public $forwardID; // deprecated, use ActivityVerb::SHARE instead
-    public $forwardUrl; // deprecated, use ActivityVerb::SHARE instead
     public $scope;
 
     const THR     = 'http://purl.org/syndication/thread/1.0';
@@ -141,8 +139,6 @@ class ActivityContext
 
         $context['inReplyTo']    = $this->getInReplyToArray();
         $context['conversation'] = $this->conversation;
-        $context['forwardId']    = $this->forwardID;
-        $context['forwardUrl']   = $this->forwardUrl;
 
         return array_filter($context);
     }