#16 Delete/Duplicate Record Bug

Minor
closed
nobody
MRBS (195)
5
2012-07-20
2000-10-28
James Cardwell
No

mrbs - mrbs 0.9pre1
OS - Redhat 6.2
mysql - 3_22_32-1 (from source)
php - 4.0.3.pl1 (from source)
apache - 1.3.12
client - netscape 4.5/4.7, ms explorer 5

Release is very stable for most functions.

Missing line from help.php3: include "connect.inc";

Delete/Duplicate Record Bug:

The system will create a duplicate record in the mrbs_entry table if more than one edit is executed on the
orginal entry.

To create issue:

1) created entry on a day and entered bookers name and a description
2) edited the entry once - adding a line to the description
3) edited the entry a second time - adding a third line to the entry.

A second record is created in step 3.

Deletion of entry with duplicate records:

When the entry is deleted - it will only delete the most recent record. The first entry will re-appear on the
calendar screen. It as well must be deleted. This would confuse users.

  • James Cardwell

Discussion

  • Bo Kleve
    Bo Kleve
    2000-11-26

    That is fixed with this patch to edit_entry_handler.php3

    /BoK

    updated/edit_entry_handler.php3 Sun Nov 5 18:10:33 2000
    --- edit_entry_handler.php3 Sun Nov 26 13:25:22 2000
    ***
    133,146 ****
    else
    {
    $res = mysql_query("SELECT repeat_id FROM mrbs_entry WHERE id='$id'");
    if(mysql_num_rows($res) > 0)
    {
    ! $row = mysql_fetch_row($res);
    ! $repeat_id = $row[0];
    ! $entry_type = 2;
    }
    ! else
    ! $repeat_id = $entry_type = 0;

        // Create the entrys, ignoring any errors at the moment
        if(mrbsCreateSingleEntry($starttime, $endtime, $entry_type, $repeat_id, $room_id,
    

    --- 133,147 ----
    else
    {
    $res = mysql_query("SELECT repeat_id FROM mrbs_entry WHERE id='$id'");
    + $repeat_id = $entry_type = 0; // preset repeat_id and entry_type to 0
    if(mysql_num_rows($res) > 0)
    {
    ! $row = mysql_fetch_array($res);
    ! if (($repeat_id = $row["repeat_id"]) > 0)
    ! $entry_type = 2; // This is a changed repeat booking entry
    }
    ! // else
    ! // $repeat_id = $entry_type = 0;

        // Create the entrys, ignoring any errors at the moment
        if(mrbsCreateSingleEntry($starttime, $endtime, $entry_type, $repeat_id, $room_id,
    
     
  • lbayuk
    lbayuk
    2001-02-14

    Confirmed fixed in 0.9.2 (or before); closed.

     


Anonymous


Cancel   Add attachments