]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/AutoSandbox/AutoSandboxPlugin.php
Merge branch 'fix-author-fallback' into 'nightly'
[quix0rs-gnu-social.git] / plugins / AutoSandbox / AutoSandboxPlugin.php
index 9e930c0cc4610d947ea15cbef1da9ce4df4a82bf..706523564a521126f800b5bc2e801b56848b95a1 100644 (file)
@@ -56,12 +56,12 @@ class AutoSandboxPlugin extends Plugin
         }
     }
 
-    function onPluginVersion(&$versions)
+    function onPluginVersion(array &$versions)
     {
         $versions[] = array('name' => 'AutoSandbox',
                             'version' => GNUSOCIAL_VERSION,
                             'author' => 'Sean Carmody',
-                            'homepage' => 'http://status.net/wiki/Plugin:AutoSandbox',
+                            'homepage' => 'https://git.gnu.io/gnu/gnu-social/tree/master/plugins/AutoSandbox',
                             'rawdescription' =>
                             // TRANS: Plugin description.
                             _m('Automatically sandboxes newly registered members.'));
@@ -75,10 +75,12 @@ class AutoSandboxPlugin extends Plugin
 
          if (isset($this->contact)) {
              $contactuser = User::getKV('nickname', $this->contact);
-             if (!empty($contactuser)) {
-                 $contactlink = "@<a href=\"$contactuser->uri\">$contactuser->nickname</a>";
+             if ($contactuser instanceof User) {
+                 $contactlink = sprintf('@<a href="%s">%s</a>',
+                                        htmlspecialchars($contactuser->getProfile()->getUrl()),
+                                        htmlspecialchars($contactuser->getProfile()->getNickname()));
                  // TRANS: User instructions after registration.
-                 // TRANS: %s is a clickable e-mailaddress.
+                 // TRANS: %s is a clickable OStatus profile URL.
                  $instr = sprintf(_m('Note you will initially be "sandboxed" so your posts will not appear in the public timeline. '.
                    'Send a message to %s to speed up the unsandboxing process.'),$contactlink);
              }