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

Checking for filetype=='dir' won't confirm symlinks pointing to a directory

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 1.9.1
    • None
    • Language
    • None
    • SLES10, php5, mySQL5
    • MySQL
    • MOODLE_19_STABLE

    Description

      Retrieving a directory listing with function "get_list_of_plugins()" will fail on symlinks.

      We have a huge installation with a large number of separated datadirs (but one moodle installation, forced to use different databases, depending on _SERVER[HTTP_HOST]). In order to keep language files out of the www-dir, we use the lang-directories within the different moodledata-dirs. All the Installations should share one language-dir, so we set up symlinks wich point to the master-datadir.

      retrieving installed langpacks with moodlelib.php, line 6026:

      if (file_exists($basedir) && filetype($basedir) == 'dir') {

      will fail in this case. We changed this to

      if (file_exists($basedir) && is_dir($basedir)) {

      which (for us) works fine.

      Attachments

        Issue Links

          Activity

            People

              skodak Petr Skoda
              siefer Christoph Siefer
              Nobody Nobody
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: