X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/714373870efc4f371ace2d324530a2354a696da7..b88d21d03da5f43a5c6177a3e12d10ef2b326be2:/article.inc.php diff --git a/article.inc.php b/article.inc.php index 9e92094..f14de99 100644 --- a/article.inc.php +++ b/article.inc.php @@ -4,6 +4,7 @@ class ArchiveArticle public $raw, $title, $body; # file contents public $meta = []; # head metadata properties public $place = []; # template variables replaced in render() + public $api = FALSE; # requested programming interface function __construct($path) { @@ -65,16 +66,16 @@ class ArchiveArticle return; } - function index() + function index($api = TRUE) { $this->handler; if (empty($this->handler)) { return; } - $User = NULL; + $this->api = $api; $Page = $this; - $res = include "./{$this->handler}/index.php"; - return $res; + global $User; + return require "./{$this->handler}/index.php"; } function restricted()