]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/OStatusPlugin.php
Copy-and-paste error in OStatus button output
[quix0rs-gnu-social.git] / plugins / OStatus / OStatusPlugin.php
index 1a02cdc8d304b54f37f18ffa5a86df9b42b20b43..78408365dfa15a4f859ba7b01062fe128b7eed11 100644 (file)
@@ -125,11 +125,18 @@ class OStatusPlugin extends Plugin
      */
     function onStartEnqueueNotice($notice, &$transports)
     {
-        // FIXME: we don't do privacy-controlled OStatus updates yet.
-        // once that happens, finer grain of control here.
-        if ($notice->isLocal() && $notice->inScope(null)) {
-            // put our transport first, in case there's any conflict (like OMB)
-            array_unshift($transports, 'ostatus');
+        if ($notice->isLocal()) {
+                if ($notice->inScope(null)) {  
+               // put our transport first, in case there's any conflict (like OMB)
+               array_unshift($transports, 'ostatus');
+                       $this->log(LOG_INFO, "Notice {$notice->id} queued for OStatus processing");
+                } else {
+                       // FIXME: we don't do privacy-controlled OStatus updates yet.
+                       // once that happens, finer grain of control here.
+                       $this->log(LOG_NOTICE, "Not queueing notice {$notice->id} for OStatus because of privacy; scope = {$notice->scope}");
+                }
+        } else {
+               $this->log(LOG_NOTICE, "Not queueing notice {$notice->id} for OStatus because it's not local.");
         }
         return true;
     }
@@ -239,8 +246,8 @@ class OStatusPlugin extends Plugin
         $cur = common_current_user();
 
         if (empty($cur)) {
-            $output->elementStart('li', 'entity_subscribe');
-            $profile = $peopletag->getTagger();
+            $widget->out->elementStart('li', 'entity_subscribe');
+
             $url = common_local_url('ostatusinit',
                                     array('group' => $group->nickname));
             $widget->out->element('a', array('href' => $url,
@@ -248,7 +255,7 @@ class OStatusPlugin extends Plugin
                                 // TRANS: Link to subscribe to a remote entity.
                                 _m('Subscribe'));
 
-            $output->elementEnd('li');
+            $widget->out->elementEnd('li');
             return false;
         }
 
@@ -286,7 +293,7 @@ class OStatusPlugin extends Plugin
 
         $action->elementStart('fieldset');
         // TRANS: Fieldset legend.
-        $action->element('legend', null, _m('Tag remote profile'));
+        $action->element('legend', null, _m('List remote profile'));
         $action->hidden('token', common_session_token());
 
         $user = common_current_user();
@@ -343,8 +350,7 @@ class OStatusPlugin extends Plugin
      */
     function onStartProfileCompletionSearch($action, $profile, $search_engine) {
         if ($action->field == 'uri') {
-            $user = new User();
-            $profile->joinAdd($user);
+            $profile->joinAdd(array('id', 'user:id'));
             $profile->whereAdd('uri LIKE "%' . $profile->escape($q) . '%"');
             $profile->query();
 
@@ -876,7 +882,7 @@ class OStatusPlugin extends Plugin
             // TRANS: Title for following a remote list.
             $act->title = _m('TITLE','Follow list');
             // TRANS: Success message for remote list follow through OStatus.
-            // TRANS: %1$s is the subscriber name, %2$s is the list, %3$s is the tagger's name.
+            // TRANS: %1$s is the subscriber name, %2$s is the list, %3$s is the lister's name.
             $act->content = sprintf(_m('%1$s is now following people listed in %2$s by %3$s.'),
                                     $sub->getBestName(),
                                     $oprofile->getBestName(),
@@ -926,7 +932,7 @@ class OStatusPlugin extends Plugin
             // TRANS: Title for unfollowing a remote list.
             $act->title = _m('Unfollow list');
             // TRANS: Success message for remote list unfollow through OStatus.
-            // TRANS: %1$s is the subscriber name, %2$s is the list, %3$s is the tagger's name.
+            // TRANS: %1$s is the subscriber name, %2$s is the list, %3$s is the lister's name.
             $act->content = sprintf(_m('%1$s stopped following the list %2$s by %3$s.'),
                                     $sub->getBestName(),
                                     $oprofile->getBestName(),
@@ -1277,8 +1283,8 @@ class OStatusPlugin extends Plugin
                                         array('nickname' => $profileUser->nickname));
                 $output->element('a', array('href' => $url,
                                             'class' => 'entity_remote_tag'),
-                                  // TRANS: Link text for a user to tag an OStatus user.
-                                 _m('Tag'));
+                                  // TRANS: Link text for a user to list an OStatus user.
+                                 _m('List'));
                 $output->elementEnd('li');
             }
         }