1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-12-22 01:35:02 +00:00

Bugfix: Revision counters for new pages didn't tick upwards

This commit is contained in:
Starbeamrainbowlabs 2019-09-19 08:59:29 +01:00
parent f34e5819e1
commit 3276cd5ecc
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 15 additions and 15 deletions

View file

@ -55,7 +55,7 @@
"version": "0.3.1",
"author": "Starbeamrainbowlabs",
"description": "Adds a sidebar to the left hand side of every page. Add '$settings->sidebar_show = true;' to your configuration, or append '&sidebar=yes' to the url to enable. Adding to the url sets a cookie to remember your setting.",
"lastupdate": 1568295635,
"lastupdate": 1568296731,
"optional": false,
"extra_data": []
},
@ -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": 1568295635,
"lastupdate": 1568802471,
"optional": false,
"extra_data": []
},
@ -85,7 +85,7 @@
"version": "0.1.4",
"author": "Starbeamrainbowlabs",
"description": "The module everyone has been waiting for! Adds a web based gui that lets mods change the wiki settings.",
"lastupdate": 1568295635,
"lastupdate": 1568296731,
"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": 1568295635,
"lastupdate": 1568879874,
"optional": false,
"extra_data": []
},
@ -135,7 +135,7 @@
"version": "0.7.1",
"author": "Starbeamrainbowlabs",
"description": "Adds proper search functionality to Pepperminty Wiki using an inverted index to provide a full text search engine. If pages don't show up, then you might have hit a stop word. If not, try requesting the `invindex-rebuild` action to rebuild the inverted index from scratch.",
"lastupdate": 1568295635,
"lastupdate": 1568296731,
"optional": false,
"extra_data": []
},
@ -155,7 +155,7 @@
"version": "0.6",
"author": "Starbeamrainbowlabs",
"description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File\/' prefix.",
"lastupdate": 1568295635,
"lastupdate": 1568296731,
"optional": false,
"extra_data": []
},
@ -195,7 +195,7 @@
"version": "0.1.1",
"author": "Starbeamrainbowlabs",
"description": "Adds a debug action for administrator use only that collects a load of useful information to make reporting bugs easier.",
"lastupdate": 1568295635,
"lastupdate": 1568296731,
"optional": false,
"extra_data": []
},
@ -205,7 +205,7 @@
"version": "0.10.1",
"author": "Starbeamrainbowlabs",
"description": "Adds an action to allow administrators to delete pages.",
"lastupdate": 1568295635,
"lastupdate": 1568296731,
"optional": false,
"extra_data": []
},
@ -215,7 +215,7 @@
"version": "0.17.4",
"author": "Starbeamrainbowlabs",
"description": "Allows you to edit pages by adding the edit and save actions. You should probably include this one.",
"lastupdate": 1568295635,
"lastupdate": 1568296731,
"optional": false,
"extra_data": {
"diff.min.js": "https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/jsdiff\/2.2.2\/diff.min.js"
@ -237,7 +237,7 @@
"version": "0.9.3",
"author": "Starbeamrainbowlabs",
"description": "Adds a rather useful help page. Access through the 'help' action. This module also exposes help content added to Pepperminty Wiki's inbuilt invisible help section system.",
"lastupdate": 1568295635,
"lastupdate": 1568296731,
"optional": false,
"extra_data": []
},
@ -247,7 +247,7 @@
"version": "0.11.1",
"author": "Starbeamrainbowlabs",
"description": "Adds a page that lists all the pages in the index along with their metadata.",
"lastupdate": 1568295635,
"lastupdate": 1568296731,
"optional": false,
"extra_data": []
},
@ -334,4 +334,4 @@
"ParsedownExtra.php": "https:\/\/raw.githubusercontent.com\/erusev\/parsedown-extra\/f21b40a1973b6674903a6da9857ee215e8839f96\/ParsedownExtra.php"
}
}
]
]

View file

@ -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
* disparaty 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[] = [