page: api attribute indicate index requests
[minimedit.git] / issue / index.php
index 8c58f415de331bb8e23f42e8a4759e8fcd7fb2b2..87b22a39d876ac8774a1a1a512e52e025e9176b0 100644 (file)
@@ -15,6 +15,7 @@ if ($id and ctype_digit($id)) {
 
        $Page->title .= ': '.htmlspecialchars($Issue->subject);
        $Page->teaser = $Issue->body;
+       if ($Page->api) return;
        $Page->body = $replies;  # find image
 
        print "<h2>{$Page->title}</h2>\n";
@@ -54,6 +55,7 @@ if ($_POST) {
                }
                $_POST = [];
 }
+if ($Page->api) return;
 
 $subsql = "SELECT count(*) FROM comments WHERE page=i.page||'/'||i.id";
 $cols = "*, ($subsql AND message IS NOT NULL) AS replycount";