mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-12-22 13:45:02 +00:00
Bugfix: Revision counters for new pages didn't tick upwards
This commit is contained in:
parent
b2f50f7af8
commit
c8aa3b8692
2 changed files with 5 additions and 5 deletions
|
@ -75,7 +75,7 @@
|
|||
"version": "0.1",
|
||||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Displays a special page to aid in setting up a new wiki for the first time.",
|
||||
"lastupdate": 1568296731,
|
||||
"lastupdate": 1568802471,
|
||||
"optional": false,
|
||||
"extra_data": []
|
||||
},
|
||||
|
@ -95,7 +95,7 @@
|
|||
"version": "0.4.2",
|
||||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Adds the ability to keep unlimited page history, limited only by your disk space. Note that this doesn't store file history (yet). Currently depends on feature-recent-changes for rendering of the history page.",
|
||||
"lastupdate": 1568296731,
|
||||
"lastupdate": 1568879874,
|
||||
"optional": false,
|
||||
"extra_data": []
|
||||
},
|
||||
|
|
|
@ -209,7 +209,7 @@ register_module([
|
|||
|
||||
/**
|
||||
* Adds a history revision against a page.
|
||||
* Note: Does not updaate the current page content! This function _only_
|
||||
* Note: Does not update the current page content! This function _only_
|
||||
* records a new revision against a page name. Thus it is possible to have a
|
||||
* disparity between the history revisions and the actual content displayed in
|
||||
* the current revision if you're not careful!
|
||||
|
@ -234,8 +234,8 @@ function history_add_revision(&$pageinfo, &$newsource, &$oldsource, $save_pagein
|
|||
// this point
|
||||
|
||||
// TODO Store tag changes here
|
||||
end($pageinfo->history); // Calculate the next revision id - we can't just count the revisions here because we might have a revision limit
|
||||
$nextRid = !empty($pageindex->history) ? $pageinfo->history[key($pageinfo->history)]->rid + 1 : 0;
|
||||
// Calculate the next revision id - we can't just count the revisions here because we might have a revision limit
|
||||
$nextRid = !empty($pageinfo->history) ? end($pageinfo->history)->rid + 1 : 0;
|
||||
$ridFilename = "$pageinfo->filename.r$nextRid";
|
||||
// Insert a new entry into the history
|
||||
$pageinfo->history[] = [
|
||||
|
|
Loading…
Reference in a new issue