diff --git a/build/index.php b/build/index.php index fab2b3c..f668263 100755 --- a/build/index.php +++ b/build/index.php @@ -1320,14 +1320,15 @@ if(isset($_GET["revision"]) and is_numeric($_GET["revision"])) // We have a revision number! $env->is_history_revision = true; $env->history->revision_number = intval($_GET["revision"]); - $env->history->revision_data = $pageindex->{$env->page}->history[$revisionNumber]; // Make sure that the revision exists for later on - if(!isset($pageindex->{$env->page}->history[$revisionNumber])) + if(!isset($pageindex->{$env->page}->history[$env->history->revision_number])) { http_response_code(404); exit(page_renderer::render_main("404: Revision Not Found - $env->page - $settings->sitename", "
Revision #{$env->history->revision_number} of $env->page doesn't appear to exist. Try viewing the list of revisions for $env->page, or viewing the latest revision instead.
")); } + + $env->history->revision_data = $pageindex->{$env->page}->history[$env->history->revision_number]; } // Construct the page's filename $env->page_filename = $env->storage_prefix; @@ -4688,7 +4689,7 @@ register_module([ register_module([ "name" => "Page viewer", - "version" => "0.16", + "version" => "0.16.1", "author" => "Starbeamrainbowlabs", "description" => "Allows you to view pages. You really should include this one.", "id" => "page-view", @@ -4780,7 +4781,7 @@ register_module([ else { $content .= "(Revision saved by $revisionData->editor " . render_timestamp($env->history->revision_data->timestamp) . ". Jump to the current revision or see a list of all revisions for this page.)
\n"; + $content .= "(Revision saved by {$env->history->revision_data->editor} " . render_timestamp($env->history->revision_data->timestamp) . ". Jump to the current revision or see a list of all revisions for this page.)
\n"; } // Add an extra message if the requester was redirected from another page diff --git a/core.php b/core.php index 45998e2..3989f72 100644 --- a/core.php +++ b/core.php @@ -1019,14 +1019,15 @@ if(isset($_GET["revision"]) and is_numeric($_GET["revision"])) // We have a revision number! $env->is_history_revision = true; $env->history->revision_number = intval($_GET["revision"]); - $env->history->revision_data = $pageindex->{$env->page}->history[$revisionNumber]; // Make sure that the revision exists for later on - if(!isset($pageindex->{$env->page}->history[$revisionNumber])) + if(!isset($pageindex->{$env->page}->history[$env->history->revision_number])) { http_response_code(404); exit(page_renderer::render_main("404: Revision Not Found - $env->page - $settings->sitename", "Revision #{$env->history->revision_number} of $env->page doesn't appear to exist. Try viewing the list of revisions for $env->page, or viewing the latest revision instead.
")); } + + $env->history->revision_data = $pageindex->{$env->page}->history[$env->history->revision_number]; } // Construct the page's filename $env->page_filename = $env->storage_prefix; diff --git a/module_index.json b/module_index.json index 5f581f2..68ce7e2 100755 --- a/module_index.json +++ b/module_index.json @@ -23,7 +23,7 @@ "author": "Starbeamrainbowlabs", "description": "Adds a 'raw' action that shows you the raw source of a page.", "id": "action-raw", - "lastupdate": 1476812239, + "lastupdate": 1476812652, "optional": false }, { @@ -181,11 +181,11 @@ }, { "name": "Page viewer", - "version": "0.16", + "version": "0.16.1", "author": "Starbeamrainbowlabs", "description": "Allows you to view pages. You really should include this one.", "id": "page-view", - "lastupdate": 1476812218, + "lastupdate": 1476812765, "optional": false }, { diff --git a/modules/page-view.php b/modules/page-view.php index ff69e80..1c934b7 100644 --- a/modules/page-view.php +++ b/modules/page-view.php @@ -1,7 +1,7 @@ "Page viewer", - "version" => "0.16", + "version" => "0.16.1", "author" => "Starbeamrainbowlabs", "description" => "Allows you to view pages. You really should include this one.", "id" => "page-view", @@ -93,7 +93,7 @@ register_module([ else { $content .= "(Revision saved by $revisionData->editor " . render_timestamp($env->history->revision_data->timestamp) . ". Jump to the current revision or see a list of all revisions for this page.)
\n"; + $content .= "(Revision saved by {$env->history->revision_data->editor} " . render_timestamp($env->history->revision_data->timestamp) . ". Jump to the current revision or see a list of all revisions for this page.)
\n"; } // Add an extra message if the requester was redirected from another page