diff --git a/build/index.php b/build/index.php index d92a73f..b86e84e 100755 --- a/build/index.php +++ b/build/index.php @@ -1961,10 +1961,10 @@ function render_recent_changes($recent_changes) for($i = 0; $i < $rchange_count; $i++) { $rchange = $recent_changes[$i]; + if($last_time !== date("dmY", $rchange->timestamp)) $content .= "
  • " . date("jS F", $rchange->timestamp) . "

  • \n"; - $rchange_results = []; for($s = $i; $s < $rchange_count; $s++) { @@ -1974,9 +1974,13 @@ function render_recent_changes($recent_changes) $rchange_results[$s] = render_recent_change($recent_changes[$s]); $i++; } - //$content .= render_recent_change($rchange); + // Take one from i to account for when we tick over to the next + // iteration of the main loop + $i -= 1; $next_entry = implode("\n", $rchange_results); + // If the change count is greater than 1, then we should enclose it + // in a
    tag. if(count($rchange_results) > 1) { reset($rchange_results); @@ -1994,7 +1998,7 @@ function render_recent_changes($recent_changes) } $userDisplayHtml = render_editor(implode(", ", $users)); - // TODO: COllect up and render a list of participating users + // TODO: Collect up and render a list of participating users $next_entry = "
  • $pageDisplayHtml $userDisplayHtml $timeDisplayHtml
      $next_entry
  • "; $content .= "$next_entry\n"; diff --git a/module_index.json b/module_index.json index a2b3cc5..46be0ef 100755 --- a/module_index.json +++ b/module_index.json @@ -50,7 +50,7 @@ "author": "Starbeamrainbowlabs", "description": "Adds recent changes. Access through the 'recent-changes' action.", "id": "feature-recent-changes", - "lastupdate": 1472387876, + "lastupdate": 1473616598, "optional": false }, { diff --git a/modules/feature-recent-changes.php b/modules/feature-recent-changes.php index 94c3e73..4d96c7e 100644 --- a/modules/feature-recent-changes.php +++ b/modules/feature-recent-changes.php @@ -136,10 +136,10 @@ function render_recent_changes($recent_changes) for($i = 0; $i < $rchange_count; $i++) { $rchange = $recent_changes[$i]; + if($last_time !== date("dmY", $rchange->timestamp)) $content .= "
  • " . date("jS F", $rchange->timestamp) . "

  • \n"; - $rchange_results = []; for($s = $i; $s < $rchange_count; $s++) { @@ -149,9 +149,13 @@ function render_recent_changes($recent_changes) $rchange_results[$s] = render_recent_change($recent_changes[$s]); $i++; } - //$content .= render_recent_change($rchange); + // Take one from i to account for when we tick over to the next + // iteration of the main loop + $i -= 1; $next_entry = implode("\n", $rchange_results); + // If the change count is greater than 1, then we should enclose it + // in a
    tag. if(count($rchange_results) > 1) { reset($rchange_results); @@ -169,7 +173,7 @@ function render_recent_changes($recent_changes) } $userDisplayHtml = render_editor(implode(", ", $users)); - // TODO: COllect up and render a list of participating users + // TODO: Collect up and render a list of participating users $next_entry = "
  • $pageDisplayHtml $userDisplayHtml $timeDisplayHtml
      $next_entry
  • "; $content .= "$next_entry\n";