1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-25 05:22:59 +00:00

Bugfix: Faltal error on edit page

This commit is contained in:
Starbeamrainbowlabs 2015-09-22 14:48:59 +01:00
parent 7d425c3998
commit 745c3cb072
3 changed files with 6 additions and 6 deletions

View file

@ -1081,7 +1081,7 @@ register_module([
register_module([
"name" => "Page editor",
"version" => "0.9",
"version" => "0.9.1",
"author" => "Starbeamrainbowlabs",
"description" => "Allows you to edit pages by adding the edit and save actions. You should probably include this one.",
"id" => "page-edit",
@ -1100,6 +1100,7 @@ register_module([
global $pageindex, $settings, $env;
$filename = "$env->page.md";
$page = $env->page;
$creatingpage = !isset($pageindex->$page);
if((isset($_GET["newpage"]) and $_GET["newpage"] == "true") or $creatingpage)
{
@ -1111,7 +1112,6 @@ register_module([
}
$pagetext = "";
$page = $env->$page;
if(isset($pageindex->$page))
{
$pagetext = file_get_contents($filename);

View file

@ -41,11 +41,11 @@
},
{
"name": "Page editor",
"version": "0.9",
"version": "0.9.1",
"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": 1442903905
"lastupdate": 1442929698
},
{
"name": "Export",

View file

@ -1,7 +1,7 @@
<?php
register_module([
"name" => "Page editor",
"version" => "0.9",
"version" => "0.9.1",
"author" => "Starbeamrainbowlabs",
"description" => "Allows you to edit pages by adding the edit and save actions. You should probably include this one.",
"id" => "page-edit",
@ -20,6 +20,7 @@ register_module([
global $pageindex, $settings, $env;
$filename = "$env->page.md";
$page = $env->page;
$creatingpage = !isset($pageindex->$page);
if((isset($_GET["newpage"]) and $_GET["newpage"] == "true") or $creatingpage)
{
@ -31,7 +32,6 @@ register_module([
}
$pagetext = "";
$page = $env->$page;
if(isset($pageindex->$page))
{
$pagetext = file_get_contents($filename);