1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-25 17:23:00 +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 // Update the inverted search index
// Construct an index for the old and new page content // 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")); $oldindex = search::index(file_get_contents("$env->page.md"));
$newindex = search::index($pagedata); $newindex = search::index($pagedata);