]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/QnA/QnAPlugin.php
Merge branch 'issue-326' into 'master'
[quix0rs-gnu-social.git] / plugins / QnA / QnAPlugin.php
index 77c4abf320d1d1a9b3cd00631024e432cfa56b75..67806370090f32b6ed35d68d5d48a8be23d4789f 100644 (file)
@@ -75,12 +75,12 @@ class QnAPlugin extends MicroAppPlugin
     /**
      * Map URLs to actions
      *
-     * @param Net_URL_Mapper $m path-to-action mapper
+     * @param URLMapper $m path-to-action mapper
      *
      * @return boolean hook value; true means continue processing, false means stop.
      */
 
-    function onRouterInitialized($m)
+    public function onRouterInitialized(URLMapper $m)
     {
         $UUIDregex = '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}';
 
@@ -124,13 +124,13 @@ class QnAPlugin extends MicroAppPlugin
         return true;
     }
 
-    function onPluginVersion(&$versions)
+    function onPluginVersion(array &$versions)
     {
         $versions[] = array(
             'name'        => 'QnA',
             'version'     => GNUSOCIAL_VERSION,
             'author'      => 'Zach Copley',
-            'homepage'    => 'http://status.net/wiki/Plugin:QnA',
+            'homepage'    => 'https://git.gnu.io/gnu/gnu-social/tree/master/plugins/QnA',
             'description' =>
              // TRANS: Plugin description.
              _m('Question and Answers micro-app.')
@@ -260,7 +260,7 @@ class QnAPlugin extends MicroAppPlugin
      * @return boolean hook value
      */
 
-    function onStartOpenNoticeListItemElement($nli)
+    function onStartOpenNoticeListItemElement(NoticeListItem $nli)
     {
         $type = $nli->notice->object_type;
 
@@ -325,7 +325,7 @@ class QnAPlugin extends MicroAppPlugin
      *
      * @todo FIXME: WARNING WARNING WARNING this closes a 'div' that is implicitly opened in BookmarkPlugin's showNotice implementation
      */
-    function onStartShowNoticeItem($nli)
+    function onStartShowNoticeItem(NoticeListItem $nli)
     {
         if (!$this->isMyNotice($nli->notice)) {
             return true;
@@ -339,10 +339,7 @@ class QnAPlugin extends MicroAppPlugin
         $nli->showNoticeLink();
         $nli->showNoticeSource();
         $nli->showNoticeLocation();
-        $nli->showContext();
-        $nli->showRepeat();
-
-        $out->elementEnd('div');
+        $nli->showPermalink();
 
         $nli->showNoticeOptions();