Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-5956

race condition in calendar

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.6.6, 1.7.4, 1.8.4, 1.9
    • Component/s: Calendar
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_16_STABLE
    • Fixed Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      I've just realised there's quite a serious race condition for how repeat events are handled in the calendar. I thought the repeatid column just pointed to the id of the original event.

      But, no:

      if ($form->repeat) {
      $fetch = get_record_sql('SELECT 1, MAX(repeatid) AS repeatid FROM '.$CFG->prefix.'event');
      $form->repeatid = empty($fetch) ? 1 : $fetch->repeatid + 1;
      }

      cvs:/calendar/edit.php

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Jan/08