mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 16:33:00 +00:00
Add pageindex size to dev help
This commit is contained in:
parent
5b914abeb3
commit
8e9254774f
1 changed files with 4 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Help page",
|
"name" => "Help page",
|
||||||
"version" => "0.9.1",
|
"version" => "0.9.2",
|
||||||
"author" => "Starbeamrainbowlabs",
|
"author" => "Starbeamrainbowlabs",
|
||||||
"description" => "Adds a rather useful help page. Access through the 'help' action. This module also exposes help content added to Pepperminty Wiki's inbuilt invisible help section system.",
|
"description" => "Adds a rather useful help page. Access through the 'help' action. This module also exposes help content added to Pepperminty Wiki's inbuilt invisible help section system.",
|
||||||
"id" => "page-help",
|
"id" => "page-help",
|
||||||
|
@ -16,7 +16,7 @@ register_module([
|
||||||
* ██ ██ ███████ ███████ ██
|
* ██ ██ ███████ ███████ ██
|
||||||
*/
|
*/
|
||||||
add_action("help", function() {
|
add_action("help", function() {
|
||||||
global $settings, $version, $help_sections, $actions;
|
global $paths, $settings, $version, $help_sections, $actions;
|
||||||
|
|
||||||
// Sort the help sections by key
|
// Sort the help sections by key
|
||||||
ksort($help_sections, SORT_NATURAL);
|
ksort($help_sections, SORT_NATURAL);
|
||||||
|
@ -44,6 +44,7 @@ register_module([
|
||||||
$content .= "<p>" . implode(", ", array_keys(get_object_vars($actions))) . "</p>";
|
$content .= "<p>" . implode(", ", array_keys(get_object_vars($actions))) . "</p>";
|
||||||
$content .= "<h3>Environment</h3>\n";
|
$content .= "<h3>Environment</h3>\n";
|
||||||
$content .= "<p>$settings->sitename's root directory is " . (!is_writeable(__DIR__) ? "not " : "") . "writeable.</p>";
|
$content .= "<p>$settings->sitename's root directory is " . (!is_writeable(__DIR__) ? "not " : "") . "writeable.</p>";
|
||||||
|
$content .= "<p>The page index is currently " . human_filesize(filesize($paths->pageindex)) . " in size.</p>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -53,7 +54,7 @@ register_module([
|
||||||
<p>Welcome to $settings->sitename!</p>
|
<p>Welcome to $settings->sitename!</p>
|
||||||
<p>$settings->sitename is powered by Pepperminty Wiki, a complete wiki in a box you can drop into your server and expect it to just <em>work</em>.</p>";
|
<p>$settings->sitename is powered by Pepperminty Wiki, a complete wiki in a box you can drop into your server and expect it to just <em>work</em>.</p>";
|
||||||
|
|
||||||
// todo Insert a table of contents here?
|
// Todo Insert a table of contents here?
|
||||||
|
|
||||||
foreach($help_sections as $index => $section)
|
foreach($help_sections as $index => $section)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue