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

unset_all_config_for_plugin() deletes too much!

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.1
    • Fix Version/s: 2.0.5, 2.1.2
    • Component/s: Administration
    • Labels:
    • Testing Instructions:
      Hide

      for developers:
      1/ create some fake report settings: set_config('report_haha_ddd', 1); set_config('report_hahaha_xxx', 1);
      2/ execute function with "report_haha" parameter and make sure only one is deleted

      Show
      for developers: 1/ create some fake report settings: set_config('report_haha_ddd', 1); set_config('report_hahaha_xxx', 1); 2/ execute function with "report_haha" parameter and make sure only one is deleted
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w37_MDL-29406_m22_configdelete

      Description

      the problem is that "_" is a special character in LIKE, it might delete settings from plugin with similar name
      unset_all_config_for_plugin('xxx_plugin') deletes config data of 'xxx_pluginator'

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            skodak Petr Skoda added a comment -

            to integrators: please cherry pick to all 2.x branches

            Show
            skodak Petr Skoda added a comment - to integrators: please cherry pick to all 2.x branches
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks Petr, this has been integrated now

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Petr, this has been integrated now
            Hide
            nebgor Aparup Banerjee added a comment -

            this works for me. (attached test script)

            Show
            nebgor Aparup Banerjee added a comment - this works for me. (attached test script)
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            And this code has been spread to all Moodle git and cvs repositories. Many thanks! Closing.

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - And this code has been spread to all Moodle git and cvs repositories. Many thanks! Closing. Ciao

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Oct/11