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

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

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.9
    • 2.7.7, 2.8.5
    • Administration
    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • MOODLE_29_STABLE
    • Easy
    • 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.

      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.

            mikegrant Michael Grant
            howardsmiller Howard Miller
            David Mudrák (@mudrd8mz) David Mudrák (@mudrd8mz)
            David Monllaó David Monllaó
            Adrian Greeve Adrian Greeve
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.