]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Add a 'closed' class to questions that have been closed
authorZach Copley <zach@status.net>
Mon, 18 Apr 2011 20:53:14 +0000 (13:53 -0700)
committerZach Copley <zach@status.net>
Mon, 18 Apr 2011 23:49:32 +0000 (16:49 -0700)
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,