mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 04:23:01 +00:00
Added history support to the raw action.
This commit is contained in:
parent
0253ab6c0e
commit
dfeb2a9399
4 changed files with 14 additions and 13 deletions
|
@ -2,6 +2,9 @@
|
|||
|
||||
## v0.13-dev
|
||||
|
||||
### Added
|
||||
- Added history support to the `raw` action.
|
||||
|
||||
### Changed
|
||||
- Overhauled internal history logic - history logic is now done in core.
|
||||
- Added `$env->page_filename`, which points to the current page on disk.
|
||||
|
|
|
@ -1596,7 +1596,7 @@ register_module([
|
|||
|
||||
register_module([
|
||||
"name" => "Raw page source",
|
||||
"version" => "0.6",
|
||||
"version" => "0.7",
|
||||
"author" => "Starbeamrainbowlabs",
|
||||
"description" => "Adds a 'raw' action that shows you the raw source of a page.",
|
||||
"id" => "action-raw",
|
||||
|
@ -1621,9 +1621,8 @@ register_module([
|
|||
add_action("raw", function() {
|
||||
global $env;
|
||||
|
||||
header("x-filename: " . rawurlencode($env->page) . ".md");
|
||||
header("content-type: text/markdown");
|
||||
exit(file_get_contents("$env->storage_prefix$env->page.md"));
|
||||
exit(file_get_contents($env->page_filename));
|
||||
exit();
|
||||
});
|
||||
|
||||
|
@ -4689,7 +4688,7 @@ register_module([
|
|||
|
||||
register_module([
|
||||
"name" => "Page viewer",
|
||||
"version" => "0.15",
|
||||
"version" => "0.16",
|
||||
"author" => "Starbeamrainbowlabs",
|
||||
"description" => "Allows you to view pages. You really should include this one.",
|
||||
"id" => "page-view",
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
},
|
||||
{
|
||||
"name": "Raw page source",
|
||||
"version": "0.6",
|
||||
"version": "0.7",
|
||||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Adds a 'raw' action that shows you the raw source of a page.",
|
||||
"id": "action-raw",
|
||||
"lastupdate": 1465757909,
|
||||
"lastupdate": 1476812239,
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
|
@ -181,11 +181,11 @@
|
|||
},
|
||||
{
|
||||
"name": "Page viewer",
|
||||
"version": "0.15",
|
||||
"version": "0.16",
|
||||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Allows you to view pages. You really should include this one.",
|
||||
"id": "page-view",
|
||||
"lastupdate": 1476811748,
|
||||
"lastupdate": 1476812218,
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
register_module([
|
||||
"name" => "Raw page source",
|
||||
"version" => "0.6",
|
||||
"version" => "0.7",
|
||||
"author" => "Starbeamrainbowlabs",
|
||||
"description" => "Adds a 'raw' action that shows you the raw source of a page.",
|
||||
"id" => "action-raw",
|
||||
|
@ -26,9 +26,8 @@ register_module([
|
|||
add_action("raw", function() {
|
||||
global $env;
|
||||
|
||||
header("x-filename: " . rawurlencode($env->page) . ".md");
|
||||
header("content-type: text/markdown");
|
||||
exit(file_get_contents("$env->storage_prefix$env->page.md"));
|
||||
exit(file_get_contents($env->page_filename));
|
||||
exit();
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue