1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-22 04:23:01 +00:00

[recent-changes] Add new page size & size difference

This commit is contained in:
Starbeamrainbowlabs 2019-01-24 23:54:27 +00:00
parent 91a9c44b8f
commit 1765f410e6
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
3 changed files with 8 additions and 4 deletions

View file

@ -409,7 +409,7 @@ if($settings->sessionprefix == "auto")
/////////////////////////////////////////////////////////////////////////////
/** The version of Pepperminty Wiki currently running. */
$version = "v0.18-dev";
$commit = "c40d1a1016eb1c981a1d549fa40a15686ac807f9";
$commit = "91a9c44b8f714deb320805f127ff2953af24106d";
/// Environment ///
/** Holds information about the current request environment. */
$env = new stdClass();
@ -4092,7 +4092,7 @@ function render_recent_change_atom($recent_changes) {
<li><strong>Change type:</strong> $recent_change->type</li>
<li><strong>User:</strong> $recent_change->user</li>
<li><strong>Page name:</strong> $recent_change->page</li>
<li><strong>Timestamp:</strong> ".date(DateTime::RFC1123, $recent_change->timestamp)."</li>";
<li><strong>Timestamp:</strong> ".date(DateTime::RFC1123, $recent_change->timestamp)."</li>\n";
switch($type) {
case "revert":
@ -4101,6 +4101,8 @@ function render_recent_change_atom($recent_changes) {
$revision_id = find_revisionid_timestamp($recent_change->page, $recent_change->timestamp);
if(!empty($revision_id))
$url .= "&revision=$revision_id";
$content .= "<li><strong>New page size:</strong> ".human_filesize($recent_change->newsize)."</li>
<li><strong>Page size difference:</strong> ".($recent_change->sizediff > 0 ? "+" : "")."$recent_change->sizediff</li>\n";
break;
case "deletion": $type = "Deletion of"; break;
case "move": $type = "Movement of"; break;

View file

@ -95,7 +95,7 @@
"author": "Starbeamrainbowlabs",
"description": "Adds recent changes. Access through the 'recent-changes' action.",
"id": "feature-recent-changes",
"lastupdate": 1548364510,
"lastupdate": 1548373950,
"optional": false
},
{

View file

@ -404,7 +404,7 @@ function render_recent_change_atom($recent_changes) {
<li><strong>Change type:</strong> $recent_change->type</li>
<li><strong>User:</strong> $recent_change->user</li>
<li><strong>Page name:</strong> $recent_change->page</li>
<li><strong>Timestamp:</strong> ".date(DateTime::RFC1123, $recent_change->timestamp)."</li>";
<li><strong>Timestamp:</strong> ".date(DateTime::RFC1123, $recent_change->timestamp)."</li>\n";
switch($type) {
case "revert":
@ -413,6 +413,8 @@ function render_recent_change_atom($recent_changes) {
$revision_id = find_revisionid_timestamp($recent_change->page, $recent_change->timestamp);
if(!empty($revision_id))
$url .= "&revision=$revision_id";
$content .= "<li><strong>New page size:</strong> ".human_filesize($recent_change->newsize)."</li>
<li><strong>Page size difference:</strong> ".($recent_change->sizediff > 0 ? "+" : "")."$recent_change->sizediff</li>\n";
break;
case "deletion": $type = "Deletion of"; break;
case "move": $type = "Movement of"; break;