]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/actions/ostatussub.php
Merge remote branch 'chat-interface-plugins/msn-plugin' into 1.0.x
[quix0rs-gnu-social.git] / plugins / OStatus / actions / ostatussub.php
index bee48a8aed5c5fbfb0d74cadc815ed4c46d414d1..28714514f5ec402827bfd9cbe4df06fee5e26cc6 100644 (file)
@@ -149,7 +149,7 @@ class OStatusSubAction extends Action
         $fullname = $entity->fullname;
         $homepage = $entity->homepage;
         $location = $entity->location;
-        
+
         if (!$avatar) {
             $avatar = Avatar::defaultImage(AVATAR_PROFILE_SIZE);
         }
@@ -242,7 +242,7 @@ class OStatusSubAction extends Action
             if (Validate::email($this->profile_uri)) {
                 $this->oprofile = Ostatus_profile::ensureWebfinger($this->profile_uri);
             } else if (Validate::uri($this->profile_uri)) {
-                $this->oprofile = Ostatus_profile::ensureProfile($this->profile_uri);
+                $this->oprofile = Ostatus_profile::ensureProfileURL($this->profile_uri);
             } else {
                 $this->error = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname");
                 common_debug('Invalid address format.', __FILE__);
@@ -299,7 +299,7 @@ class OStatusSubAction extends Action
         if ($user->isSubscribed($local)) {
             // TRANS: OStatus remote subscription dialog error.
             $this->showForm(_m('Already subscribed!'));
-        } elseif ($this->oprofile->subscribeLocalToRemote($user)) {
+        } elseif (Subscription::start($user, $local)) {
             $this->success();
         } else {
             // TRANS: OStatus remote subscription dialog error.
@@ -339,7 +339,6 @@ class OStatusSubAction extends Action
         }
     }
 
-
     /**
      * Handle posts to this form
      *
@@ -398,7 +397,7 @@ class OStatusSubAction extends Action
     function title()
     {
         // TRANS: Page title for OStatus remote subscription form
-        return _m('Authorize subscription');
+        return _m('Confirm');
     }
 
     /**
@@ -447,4 +446,18 @@ class OStatusSubAction extends Action
     {
         return common_local_url('ostatussub');
     }
+
+    /**
+     * Disable the send-notice form at the top of the page.
+     * This is really just a hack for the broken CSS in the Cloudy theme,
+     * I think; copying from other non-notice-navigation pages that do this
+     * as well. There will be plenty of others also broken.
+     *
+     * @fixme fix the cloudy theme
+     * @fixme do this in a more general way
+     */
+    function showNoticeForm() {
+        // nop
+    }
+
 }