From fffadb829a8074c39c0ecfe77649b214fdd6cb3c Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 2 Jul 2018 23:44:10 +0100 Subject: [PATCH] Add history-revert action, but it isn't tested yet. --- Changelog.md | 1 + build/index.php | 192 +++++++++++++++++++++++++++-------- core.php | 14 +-- module_index.json | 8 +- modules/api-status.php | 8 +- modules/feature-history.php | 120 ++++++++++++++++++++-- modules/feature-redirect.php | 46 +++++---- 7 files changed, 307 insertions(+), 82 deletions(-) diff --git a/Changelog.md b/Changelog.md index 9e8c175..77ac4cd 100644 --- a/Changelog.md +++ b/Changelog.md @@ -8,6 +8,7 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t - [Rest API] Add `user-add` and `set-password` moderator actions - Added `random_page_exclude_redirects` setting that prevents the `random` action from returning redirect pages. - Added link to user table on the credits page + - Added history reversion via the `history-revert` action ### Fixed - Updated the search system to transliterate characters to better support searching pages that are written in other languages. diff --git a/build/index.php b/build/index.php index 228115b..733635a 100644 --- a/build/index.php +++ b/build/index.php @@ -402,7 +402,7 @@ if($settings->sessionprefix == "auto") ///////////////////////////////////////////////////////////////////////////// /** The version of Pepperminty Wiki currently running. */ $version = "v0.17-dev"; -$commit = "10b374871faaaebe84139ac36c7708c2598313ca"; +$commit = "2853cf4da595832f9d7e3519c3fb96cfb714d745"; /// Environment /// /** Holds information about the current request environment. */ $env = new stdClass(); @@ -503,15 +503,15 @@ if($env->is_logged_in) /** * @apiDefine Admin Only the wiki administrator may use this call. */ - /** - * @apiDefine Moderator Only users loggged with a moderator account may use this call. - */ /** -* @apiDefine User Only users loggged in may use this call. -*/ + * @apiDefine Moderator Only users loggged with a moderator account may use this call. + */ /** -* @apiDefine Anonymous Anybody may use this call. -*/ + * @apiDefine User Only users loggged in may use this call. + */ +/** + * @apiDefine Anonymous Anybody may use this call. + */ /** * @apiDefine UserNotLoggedInError * @apiError UserNotLoggedInError You didn't log in before sending this request. @@ -2347,7 +2347,7 @@ register_module([ "name" => "API status", "version" => "0.1", "author" => "Starbeamrainbowlabs", - "description" => "Provides a basic JSON status action that provices a few useful bits of information for API consumption.", + "description" => "Provides a basic JSON status action that provides a few useful bits of information for API consumption.", "id" => "api-status", "code" => function() { global $settings; @@ -2360,7 +2360,13 @@ register_module([ * @apiParam {boolean} Whether or not the result should be minified JSON. Default: false */ - + /* + * ███████ ████████ █████ ████████ ██ ██ ███████ + * ██ ██ ██ ██ ██ ██ ██ ██ + * ███████ ██ ███████ ██ ██ ██ ███████ + * ██ ██ ██ ██ ██ ██ ██ ██ + * ███████ ██ ██ ██ ██ ██████ ███████ + */ add_action("status", function() { global $version, $env, $settings, $actions; @@ -3210,7 +3216,7 @@ register_module([ * @apiGroup Page * @apiPermission Anonymous * - * @apiParam {string} page The page name to return a revision list for. + * @apiUse PageParameter * @apiParam {string} format The format to return the list of pages in. available values: html, json, text. Default: html */ @@ -3235,8 +3241,8 @@ register_module([ $content .= "\t\t