mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 04:23:01 +00:00
Bugfix: Set the history revision number 0 if no previous revisions exist
(Thanks again, @tspivey!)
This commit is contained in:
parent
7e77412099
commit
3a2d74227d
1 changed files with 2 additions and 2 deletions
|
@ -233,8 +233,8 @@ function history_add_revision(&$pageinfo, &$newsource, &$oldsource, $save_pagein
|
||||||
// this point
|
// this point
|
||||||
|
|
||||||
// TODO Store tag changes here
|
// TODO Store tag changes here
|
||||||
end($pageinfo->history); // Calculate the next revision id - we can't jsut count the reivisions here because we might have a revision limit
|
end($pageinfo->history); // Calculate the next revision id - we can't just count the reivisions here because we might have a revision limit
|
||||||
$nextRid = $pageinfo->history[key($pageinfo->history)]->rid + 1;
|
$nextRid = !empty($pageindex->history) ? $pageinfo->history[key($pageinfo->history)]->rid + 1 : 0;
|
||||||
$ridFilename = "$pageinfo->filename.r$nextRid";
|
$ridFilename = "$pageinfo->filename.r$nextRid";
|
||||||
// Insert a new entry into the history
|
// Insert a new entry into the history
|
||||||
$pageinfo->history[] = [
|
$pageinfo->history[] = [
|
||||||
|
|
Loading…
Reference in a new issue