1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-22 04:23:01 +00:00

Bugfix the inverted index. Fixes #34.

This commit is contained in:
Starbeamrainbowlabs 2015-11-11 18:42:12 +00:00
parent bf2da0b28c
commit 05026b9045
3 changed files with 6 additions and 6 deletions

View file

@ -1591,7 +1591,7 @@ class search
public static function rebuild_invindex()
{
global $pageindex;
global $pageindex, $env, $paths;
$invindex = [];
foreach($pageindex as $pagename => $pagedetails)
@ -1602,7 +1602,7 @@ class search
self::merge_into_invindex($invindex, ids::getid($pagename), $index);
}
self::save_invindex("invindex.json", $invindex);
self::save_invindex($paths->searchindex, $invindex);
}
/*

View file

@ -50,7 +50,7 @@
"author": "Starbeamrainbowlabs",
"description": "Adds proper search functionality to Pepperminty Wiki. Note that this module, at the moment, just contains test code while I figure out how best to write a search engine.",
"id": "feature-search",
"lastupdate": 1447053773,
"lastupdate": 1447267196,
"optional": false
},
{
@ -140,7 +140,7 @@
"author": "Starbeamrainbowlabs",
"description": "Adds an action to allow administrators to move pages.",
"id": "page-move",
"lastupdate": 1447266379,
"lastupdate": 1447266462,
"optional": false
},
{

View file

@ -187,7 +187,7 @@ class search
public static function rebuild_invindex()
{
global $pageindex;
global $pageindex, $env, $paths;
$invindex = [];
foreach($pageindex as $pagename => $pagedetails)
@ -198,7 +198,7 @@ class search
self::merge_into_invindex($invindex, ids::getid($pagename), $index);
}
self::save_invindex("invindex.json", $invindex);
self::save_invindex($paths->searchindex, $invindex);
}
/*