Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10663

Extension manager: finder class adds directories that should not match the query

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-dev
    • Fix Version/s: 3.1.0-a1
    • Component/s: Extensions
    • Labels:
      None

      Description

      I'm not sure where exactly error is, I suspect its in finder class. When searching for templates, for some reason in addition to matching directories, it adds inner directories of those directories to list.

      How to test it: install extension that has directory styles/prosilver/template
      Open includes/template/locator.php, find function set_paths() and at the end of function write this:

      echo '<pre>', print_r($this->roots, true), '</pre>';

      Open forum page, it will show this result:

      Array
      (
      [0] => ./ext/example/styles/prosilver/template
      [1] => ./styles/prosilver/template
      )

      That result is correct. Now create a directory inside extension's template directory, for example, ext/example/styles/prosilver/template/test1, clear cache and open page in browser. Result will be this:

      Array
      (
      [0] => ./ext/example/styles/prosilver/template
      [1] => ./ext/example/styles/prosilver/template/test1
      [2] => ./styles/prosilver/template
      )

      Item #1 should not be there. If you create more directories inside template directory, all directories will appear in that list.

      That item is being added to roots array 2 lines above that debug output, variable $template_paths is instance of phpbb_template_extension_path_provider class, incorrect directories seems to be retrieved in function find() in includes/template/extension_path_provider.php that uses finder class to find them.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            naderman Nils Adermann
            Reporter:
            Arty Vjacheslav Trushkin
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development