"Page History", "version" => "0.3", "author" => "Starbeamrainbowlabs", "description" => "Adds the ability to keep unlimited page history, limited only by your disk space. Note that this doesn't store file history (yet). Currently depends on feature-recent-changes for rendering of the history page.", "id" => "feature-history", "code" => function() { /** * @api {get} ?action=history&page={pageName} Get a list of revisions for a page * @apiName History * @apiGroup Page * @apiPermission Anonymous * * @apiParam {string} page The page name to return a revision list for. * @apiParam {string} format The format to return the list of pages in. available values: html, json, text. Default: html */ /* * ██ ██ ██ ███████ ████████ ██████ ██████ ██ ██ * ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ * ███████ ██ ███████ ██ ██ ██ ██████ ████ * ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ * ██ ██ ██ ███████ ██ ██████ ██ ██ ██ */ add_action("history", function() { global $settings, $env, $pageindex; $supported_formats = [ "html", "json", "text" ]; $format = $_GET["format"] ?? "html"; switch($format) { case "html": $content = "

History for $env->page

\n"; if(!empty($pageindex->{$env->page}->history)) { $content .= "\t\t