From ad992c9439a61e80baed7a50c599da4b9391f7a2 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 21 Mar 2016 16:21:09 +0000 Subject: [PATCH] Fill in help section for recent-changes, and make redirect pages italics. --- build/index.php | 11 ++++++++--- module_index.json | 2 +- modules/feature-recent-changes.php | 11 ++++++++--- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/build/index.php b/build/index.php index eb90910..7d307b3 100644 --- a/build/index.php +++ b/build/index.php @@ -1566,7 +1566,7 @@ register_module([ * ██████ ██ ██ ██ ██ ██ ████ ██████ ███████ ███████ */ add_action("recent-changes", function() { - global $settings, $paths; + global $settings, $paths, $pageindex; $content = "\t\t

Recent Changes

\n"; @@ -1586,7 +1586,11 @@ register_module([ $title_display = human_filesize($rchange->newsize - $rchange->sizediff) . " -> " . human_filesize($rchange->newsize); - $content .= "\t\t\t
  • $rchange->page ✎ $rchange->user ($size_display)
  • \n"; + $pageDisplayName = $rchange->page; + if(isset($pageindex->$pageDisplayName) and $pageindex->$pageDisplayName->redirect) + $pageDisplayName = "$pageDisplayName"; + + $content .= "\t\t\t
  • $pageDisplayName ✎ $rchange->user ($size_display)
  • \n"; } $content .= "\t\t"; } @@ -1626,7 +1630,8 @@ register_module([ file_put_contents($paths->recentchanges, json_encode($recentchanges, JSON_PRETTY_PRINT)); }); - add_help_section("800-raw-page-content", "Recent Changes", "

    "); + add_help_section("800-raw-page-content", "Recent Changes", "

    The recent changes page displays a list of all the most recent changes that have happened around $settings->sitename, arranged in chronological order. It can be found in the \"More...\" menu in the top right by default.

    +

    Each entry displays the name of the page in question, who edited it, how long ago they did so, and the number of characters added or removed. Pages that currently redirect to another page are shown in italics, and hovering over the time since the edit wil show the exact time that the edit was made.

    "); } ]); diff --git a/module_index.json b/module_index.json index fea1872..bc9eff1 100644 --- a/module_index.json +++ b/module_index.json @@ -41,7 +41,7 @@ "author": "Starbeamrainbowlabs", "description": "Adds recent changes. Access through the 'recent-changes' action.", "id": "feature-recent-changes", - "lastupdate": 1452953620, + "lastupdate": 1458577217, "optional": false }, { diff --git a/modules/feature-recent-changes.php b/modules/feature-recent-changes.php index 4dfb996..8601f98 100644 --- a/modules/feature-recent-changes.php +++ b/modules/feature-recent-changes.php @@ -27,7 +27,7 @@ register_module([ * ██████ ██ ██ ██ ██ ██ ████ ██████ ███████ ███████ */ add_action("recent-changes", function() { - global $settings, $paths; + global $settings, $paths, $pageindex; $content = "\t\t

    Recent Changes

    \n"; @@ -47,7 +47,11 @@ register_module([ $title_display = human_filesize($rchange->newsize - $rchange->sizediff) . " -> " . human_filesize($rchange->newsize); - $content .= "\t\t\t
  • $rchange->page ✎ $rchange->user ($size_display)
  • \n"; + $pageDisplayName = $rchange->page; + if(isset($pageindex->$pageDisplayName) and $pageindex->$pageDisplayName->redirect) + $pageDisplayName = "$pageDisplayName"; + + $content .= "\t\t\t
  • $pageDisplayName ✎ $rchange->user ($size_display)
  • \n"; } $content .= "\t\t"; } @@ -87,7 +91,8 @@ register_module([ file_put_contents($paths->recentchanges, json_encode($recentchanges, JSON_PRETTY_PRINT)); }); - add_help_section("800-raw-page-content", "Recent Changes", "

    "); + add_help_section("800-raw-page-content", "Recent Changes", "

    The recent changes page displays a list of all the most recent changes that have happened around $settings->sitename, arranged in chronological order. It can be found in the \"More...\" menu in the top right by default.

    +

    Each entry displays the name of the page in question, who edited it, how long ago they did so, and the number of characters added or removed. Pages that currently redirect to another page are shown in italics, and hovering over the time since the edit wil show the exact time that the edit was made.

    "); } ]);