mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 16:33:00 +00:00
Bugfix: Another (successful this time) attempt to rid ourselves of blank tags
This commit is contained in:
parent
1c58a64134
commit
9046d72e7c
3 changed files with 19 additions and 21 deletions
|
@ -2360,11 +2360,15 @@ register_module([
|
||||||
if($settings->clean_raw_html)
|
if($settings->clean_raw_html)
|
||||||
$pagedata = htmlentities($pagedata, ENT_QUOTES);
|
$pagedata = htmlentities($pagedata, ENT_QUOTES);
|
||||||
|
|
||||||
// Read in the new page tags
|
// Read in the new page tags, so long as there are actually some tags to read in
|
||||||
$page_tags = explode(",", $_POST["tags"]);
|
$page_tags = [];
|
||||||
// Trim off all the whitespace
|
if(strlen(trim($_POST["tags"])) > 0)
|
||||||
foreach($page_tags as &$tag)
|
{
|
||||||
$tag = trim($tag);
|
$page_tags = explode(",", $_POST["tags"]);
|
||||||
|
// Trim off all the whitespace
|
||||||
|
foreach($page_tags as &$tag)
|
||||||
|
$tag = trim($tag);
|
||||||
|
}
|
||||||
|
|
||||||
// Update the inverted search index
|
// Update the inverted search index
|
||||||
|
|
||||||
|
@ -2372,11 +2376,6 @@ register_module([
|
||||||
$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);
|
||||||
|
|
||||||
echo("old: ");
|
|
||||||
var_dump($oldindex);
|
|
||||||
echo("new: ");
|
|
||||||
var_dump($newindex);
|
|
||||||
|
|
||||||
// Compare the indexes of the old and new content
|
// Compare the indexes of the old and new content
|
||||||
$additions = [];
|
$additions = [];
|
||||||
$removals = [];
|
$removals = [];
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
"author": "Starbeamrainbowlabs",
|
"author": "Starbeamrainbowlabs",
|
||||||
"description": "Allows you to edit pages by adding the edit and save actions. You should probably include this one.",
|
"description": "Allows you to edit pages by adding the edit and save actions. You should probably include this one.",
|
||||||
"id": "page-edit",
|
"id": "page-edit",
|
||||||
"lastupdate": 1446387938,
|
"lastupdate": 1446388267,
|
||||||
"optional": false
|
"optional": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -126,11 +126,15 @@ register_module([
|
||||||
if($settings->clean_raw_html)
|
if($settings->clean_raw_html)
|
||||||
$pagedata = htmlentities($pagedata, ENT_QUOTES);
|
$pagedata = htmlentities($pagedata, ENT_QUOTES);
|
||||||
|
|
||||||
// Read in the new page tags
|
// Read in the new page tags, so long as there are actually some tags to read in
|
||||||
$page_tags = explode(",", $_POST["tags"]);
|
$page_tags = [];
|
||||||
// Trim off all the whitespace
|
if(strlen(trim($_POST["tags"])) > 0)
|
||||||
foreach($page_tags as &$tag)
|
{
|
||||||
$tag = trim($tag);
|
$page_tags = explode(",", $_POST["tags"]);
|
||||||
|
// Trim off all the whitespace
|
||||||
|
foreach($page_tags as &$tag)
|
||||||
|
$tag = trim($tag);
|
||||||
|
}
|
||||||
|
|
||||||
// Update the inverted search index
|
// Update the inverted search index
|
||||||
|
|
||||||
|
@ -138,11 +142,6 @@ register_module([
|
||||||
$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);
|
||||||
|
|
||||||
echo("old: ");
|
|
||||||
var_dump($oldindex);
|
|
||||||
echo("new: ");
|
|
||||||
var_dump($newindex);
|
|
||||||
|
|
||||||
// Compare the indexes of the old and new content
|
// Compare the indexes of the old and new content
|
||||||
$additions = [];
|
$additions = [];
|
||||||
$removals = [];
|
$removals = [];
|
||||||
|
|
Loading…
Reference in a new issue