return;
}
- function index()
+ function index($api = TRUE)
{
$this->handler;
if (empty($this->handler)) {
return;
}
- $this->api = TRUE;
+ $this->api = $api;
$Page = $this;
- $res = include "./{$this->handler}/index.php";
- return $res;
+ global $User;
+ return require "./{$this->handler}/index.php";
}
function restricted()
<?php
-global $User, $Db;
+global $User, $Db, $Issue;
require_once 'database.inc.php';
@list ($id, $title) = explode('/', ltrim($Page->path, '/'));
include_once 'format.inc.php';
ob_start();
-if ($Page->handler and !require("./{$Page->handler}/index.php")) {
+if ($Page->handler and !$Page->index($Page->api)) {
# replace contents by code output on false return
$Page->raw = ob_get_clean();
}
print '<ul class="replies">'."\n";
foreach ($search->files() as $ref => $article) {
print '<li>';
- include 'linkref.php';
+ require 'linkref.php';
if (is_array($article->index)) {
print '<ul>';
foreach ($article->index as $article) {