mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 16:33:00 +00:00
Enforce day separator on recent changes page mroe strongly. Fixes #110.
This commit is contained in:
parent
6476877c60
commit
6780ce18bb
3 changed files with 11 additions and 9 deletions
|
@ -2008,10 +2008,11 @@ function render_recent_changes($recent_changes)
|
||||||
if(date("dmY", $recent_changes[$i]->timestamp) !== date("dmY", $recent_changes[$s]->timestamp))
|
if(date("dmY", $recent_changes[$i]->timestamp) !== date("dmY", $recent_changes[$s]->timestamp))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// If we have found a change that has been made on the same page as
|
// If we have found a change that has been made on the same page and
|
||||||
// the one that we are scanning for, move it up next to the change
|
// on the same day as the one that we are scanning for, move it up
|
||||||
// we are scanning for.
|
// next to the change we are scanning for.
|
||||||
if($recent_changes[$i]->page == $recent_changes[$s]->page)
|
if($recent_changes[$i]->page == $recent_changes[$s]->page &&
|
||||||
|
date("j", $recent_changes[$i]->timestamp) === date("j", $recent_changes[$s]->timestamp))
|
||||||
{
|
{
|
||||||
// FUTURE: We may need to remove and insert instead of swapping changes around if this causes some changes to appear out of order.
|
// FUTURE: We may need to remove and insert instead of swapping changes around if this causes some changes to appear out of order.
|
||||||
$temp = $recent_changes[$i + 1];
|
$temp = $recent_changes[$i + 1];
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
"author": "Starbeamrainbowlabs",
|
"author": "Starbeamrainbowlabs",
|
||||||
"description": "Adds recent changes. Access through the 'recent-changes' action.",
|
"description": "Adds recent changes. Access through the 'recent-changes' action.",
|
||||||
"id": "feature-recent-changes",
|
"id": "feature-recent-changes",
|
||||||
"lastupdate": 1476813264,
|
"lastupdate": 1476813444,
|
||||||
"optional": false
|
"optional": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -117,10 +117,11 @@ function render_recent_changes($recent_changes)
|
||||||
if(date("dmY", $recent_changes[$i]->timestamp) !== date("dmY", $recent_changes[$s]->timestamp))
|
if(date("dmY", $recent_changes[$i]->timestamp) !== date("dmY", $recent_changes[$s]->timestamp))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// If we have found a change that has been made on the same page as
|
// If we have found a change that has been made on the same page and
|
||||||
// the one that we are scanning for, move it up next to the change
|
// on the same day as the one that we are scanning for, move it up
|
||||||
// we are scanning for.
|
// next to the change we are scanning for.
|
||||||
if($recent_changes[$i]->page == $recent_changes[$s]->page)
|
if($recent_changes[$i]->page == $recent_changes[$s]->page &&
|
||||||
|
date("j", $recent_changes[$i]->timestamp) === date("j", $recent_changes[$s]->timestamp))
|
||||||
{
|
{
|
||||||
// FUTURE: We may need to remove and insert instead of swapping changes around if this causes some changes to appear out of order.
|
// FUTURE: We may need to remove and insert instead of swapping changes around if this causes some changes to appear out of order.
|
||||||
$temp = $recent_changes[$i + 1];
|
$temp = $recent_changes[$i + 1];
|
||||||
|
|
Loading…
Reference in a new issue