From 7d4687a00e3ee61cd628d5c74ceb7251fc11a7ac Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Sat, 16 Feb 2013 13:45:45 +0100 Subject: [PATCH] If reference was increased by more than one when entering documents, the next reference was not updated. --- includes/references.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/references.inc b/includes/references.inc index 16781175..c18bcd04 100644 --- a/includes/references.inc +++ b/includes/references.inc @@ -57,7 +57,7 @@ class references function save($type, $id, $reference) { update_reference($type, $id, $reference); // store in refs table - if ($reference == $this->get_next($type)) { // if reference was not changed from default + if ($reference >= $this->get_next($type)) { // if reference was bigger or not changed from default $next = $this->_increment($reference); // increment default save_next_reference($type, $next); } -- 2.30.2