1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-06-14 13:34:56 +00:00

Only build an index for the old version if it actually exists

This commit is contained in:
Starbeamrainbowlabs 2015-12-05 17:37:45 +00:00
parent d55132fd19
commit 8924c7b9ac

View file

@ -139,6 +139,8 @@ register_module([
// Update the inverted search index
// Construct an index for the old and new page content
$oldindex = [];
if(file_exists("$env->page.md"))
$oldindex = search::index(file_get_contents("$env->page.md"));
$newindex = search::index($pagedata);