Bugfix: Pageindex data for parent pages disappears when a child page is edited. Fixes #98.
This commit is contained in:
parent
320c871495
commit
ca89ccd33d
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
$start_time = microtime(true);
|
||||
mb_internal_encoding("UTF-8");
|
||||
|
||||
|
||||
/*
|
||||
|
@ -519,7 +520,7 @@ function get_subpages($pageindex, $pagename)
|
|||
*/
|
||||
function check_subpage_parents($pagename)
|
||||
{
|
||||
global $pageindex, $paths;
|
||||
global $pageindex, $paths, $env;
|
||||
// Save the new pageindex and return if there aren't any more parent pages to check
|
||||
if(strpos($pagename, "/") === false)
|
||||
{
|
||||
|
@ -2259,6 +2260,7 @@ register_module([
|
|||
|
||||
$content .= "</section>\n";
|
||||
|
||||
header("content-type: text/html; charset=UTF-8");
|
||||
exit(page_renderer::render($title, $content));
|
||||
|
||||
//header("content-type: text/plain");
|
||||
|
@ -3824,7 +3826,7 @@ DIFFSCRIPT;
|
|||
$pageindex->$page->lastmodified = time();
|
||||
if($env->is_logged_in)
|
||||
$pageindex->$page->lasteditor = utf8_encode($env->user);
|
||||
else
|
||||
else // TODO: Add an option to record the user's IP here instead
|
||||
$pageindex->$page->lasteditor = utf8_encode("anonymous");
|
||||
$pageindex->$page->tags = $page_tags;
|
||||
|
3
core.php
3
core.php
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
$start_time = microtime(true);
|
||||
mb_internal_encoding("UTF-8");
|
||||
|
||||
{settings}
|
||||
|
||||
|
@ -218,7 +219,7 @@ function get_subpages($pageindex, $pagename)
|
|||
*/
|
||||
function check_subpage_parents($pagename)
|
||||
{
|
||||
global $pageindex, $paths;
|
||||
global $pageindex, $paths, $env;
|
||||
// Save the new pageindex and return if there aren't any more parent pages to check
|
||||
if(strpos($pagename, "/") === false)
|
||||
{
|
|
@ -68,7 +68,7 @@
|
|||
"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.",
|
||||
"id": "feature-search",
|
||||
"lastupdate": 1471697540,
|
||||
"lastupdate": 1471791401,
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
|
@ -113,7 +113,7 @@
|
|||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Allows you to edit pages by adding the edit and save actions. You should probably include this one.",
|
||||
"id": "page-edit",
|
||||
"lastupdate": 1471632938,
|
||||
"lastupdate": 1471809336,
|
||||
"optional": false
|
||||
},
|
||||
{
|
|
@ -165,6 +165,7 @@ register_module([
|
|||
|
||||
$content .= "</section>\n";
|
||||
|
||||
header("content-type: text/html; charset=UTF-8");
|
||||
exit(page_renderer::render($title, $content));
|
||||
|
||||
//header("content-type: text/plain");
|
|
@ -276,7 +276,7 @@ DIFFSCRIPT;
|
|||
$pageindex->$page->lastmodified = time();
|
||||
if($env->is_logged_in)
|
||||
$pageindex->$page->lasteditor = utf8_encode($env->user);
|
||||
else
|
||||
else // TODO: Add an option to record the user's IP here instead
|
||||
$pageindex->$page->lasteditor = utf8_encode("anonymous");
|
||||
$pageindex->$page->tags = $page_tags;
|
||||
|
Loading…
Reference in New Issue