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

Is @include for plugin version.php files a good idea?

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.7, 2.8.5
    • Fix Version/s: 2.9
    • Component/s: Administration
    • Labels:
    • Testing Instructions:
      Hide

      Regression test: visit the Plugins overview page and make sure no warnings are raised.
      Behaviour test: try to install additional theme with version.php missing. The behaviour is not really defined (as all plugins are supposed to have the file) but you should probably see some PHP warnings about the missing file, which is a good thing.

      Show
      Regression test: visit the Plugins overview page and make sure no warnings are raised. Behaviour test: try to install additional theme with version.php missing. The behaviour is not really defined (as all plugins are supposed to have the file) but you should probably see some PHP warnings about the missing file, which is a good thing.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      In lib/classes/plugin_manager.php in the function load_present_plugins(), the actual include of the version.php file is done with a 'stfu' @ prefix.

      I don't think this is a terribly good idea. If the version.php file is corrupt or has weird permissions then the admin never gets to hear about it. You just get the 'missing plugin' message on the plugins screen.

      Personally I think it would be much less bother if it simply failed if something was wrong. I can't think of a situation where you wouldn't want to actually fix the problem.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mikegrant Michael Grant
              Reporter:
              howardsmiller Howard Miller
              Peer reviewer:
              David Mudrák (@mudrd8mz) David Mudrák (@mudrd8mz)
              Integrator:
              David Monllaó David Monllaó
              Tester:
              Adrian Greeve Adrian Greeve
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/May/15