mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-25 05:22:59 +00:00
Only build an index for the old version if it actually exists
This commit is contained in:
parent
d55132fd19
commit
8924c7b9ac
1 changed files with 3 additions and 1 deletions
|
@ -139,7 +139,9 @@ 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 = search::index(file_get_contents("$env->page.md"));
|
$oldindex = [];
|
||||||
|
if(file_exists("$env->page.md"))
|
||||||
|
$oldindex = search::index(file_get_contents("$env->page.md"));
|
||||||
$newindex = search::index($pagedata);
|
$newindex = search::index($pagedata);
|
||||||
|
|
||||||
// Compare the indexes of the old and new content
|
// Compare the indexes of the old and new content
|
||||||
|
|
Loading…
Reference in a new issue