From 38badd3c1f97fe2730c7b2d0147fa70645597b6d Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sat, 17 Aug 2019 20:47:51 +0100 Subject: [PATCH] [search] Add StorageBox.php as an extra data file It's time to refactor the search system to use an SQLite-backed key-value data store. It's just a shame that something designed for this like LevelDB / RocksDB doesn't have a PHP package that we can use :-/ We can always switch later, I suppose. --- modules/feature-search.php | 9 +++++++-- modules/parser-parsedown.php | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/feature-search.php b/modules/feature-search.php index 26673ab..0c8e60d 100644 --- a/modules/feature-search.php +++ b/modules/feature-search.php @@ -1,12 +1,17 @@ "Search", - "version" => "0.8", + "version" => "0.9", "author" => "Starbeamrainbowlabs", "description" => "Adds proper search functionality to Pepperminty Wiki using an inverted index to provide a full text search engine. If pages don't show up, then you might have hit a stop word. If not, try requesting the `invindex-rebuild` action to rebuild the inverted index from scratch.", + "extra_data" => [ + "StorageBox.php" => "https://gist.githubusercontent.com/sbrl/c3bfbbbb3d1419332e9ece1bac8bb71c/raw/c4c858831e63d24fcecb2e221375486735cf3109/StorageBox.php" + ], "id" => "feature-search", "code" => function() { - global $settings; + global $settings, $paths; + + require_once("$paths->extra_data_directory/feature-search/StorageBox.php"); /** * @api {get} ?action=index&page={pageName} Get an index of words for a given page diff --git a/modules/parser-parsedown.php b/modules/parser-parsedown.php index c7f73d1..da65ed6 100644 --- a/modules/parser-parsedown.php +++ b/modules/parser-parsedown.php @@ -3,7 +3,7 @@ register_module([ "name" => "Parsedown", "version" => "0.10", "author" => "Emanuil Rusev & Starbeamrainbowlabs", - "description" => "An upgraded (now default!) parser based on Emanuil Rusev's Parsedown Extra PHP library (https://github.com/erusev/parsedown-extra), which is licensed MIT. Please be careful, as this module adds some weight to your installation, and also *requires* write access to the disk on first load.", + "description" => "An upgraded (now default!) parser based on Emanuil Rusev's Parsedown Extra PHP library (https://github.com/erusev/parsedown-extra), which is licensed MIT. Please be careful, as this module adds some weight to your installation.", "extra_data" => [ /******** Parsedown versions ******** * Parsedown Core: 1.8.0-beta-5 *