]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/QnA/QnAPlugin.php
Add a 'closed' class to questions that have been closed
[quix0rs-gnu-social.git] / plugins / QnA / QnAPlugin.php
index 6841ec9873204e7d8e82001838ae9a20c19f3cf8..ad0541a71cf1f08d34787261ba6e7e6e87ee9d8f 100644 (file)
@@ -299,6 +299,13 @@ class QnAPlugin extends MicroAppPlugin
             if ($nli->notice->scope != 0 && $nli->notice->scope != 1) {
                 $class .= ' limited-scope';
             }
+
+            $question = QnA_Question::staticGet('uri', $nli->notice->uri);
+
+            if (!empty($question->closed)) {
+                $class .= ' closed';
+            }
+
             $nli->out->elementStart(
                 'li', array(
                     'class' => $class,