Roll back of increasing the reference by more than one.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 16 Feb 2013 22:22:54 +0000 (23:22 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 16 Feb 2013 22:22:54 +0000 (23:22 +0100)
includes/references.inc

index c18bcd043c4ce7ec9b9cf037399f106a984e2c3e..7f79fbc7157901fc954712e5f7cf370bcf4060e9 100644 (file)
@@ -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 bigger or 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);
                }