diff options
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/db/migration/data/v310/style_update_p2.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/extension/finder.php | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/phpBB/phpbb/db/migration/data/v310/style_update_p2.php b/phpBB/phpbb/db/migration/data/v310/style_update_p2.php index 3f6477b7cb..6c3b0de2a1 100644 --- a/phpBB/phpbb/db/migration/data/v310/style_update_p2.php +++ b/phpBB/phpbb/db/migration/data/v310/style_update_p2.php @@ -7,7 +7,7 @@ * */ -namespace phpbb\db\migration\data0; +namespace phpbb\db\migration\data\v310; class style_update_p2 extends \phpbb\db\migration\migration { diff --git a/phpBB/phpbb/extension/finder.php b/phpBB/phpbb/extension/finder.php index 0ecae7a13f..bf84728f05 100644 --- a/phpBB/phpbb/extension/finder.php +++ b/phpBB/phpbb/extension/finder.php @@ -277,9 +277,16 @@ class finder $classes = array(); foreach ($files as $file => $ext_name) { - $file = preg_replace('#^(phpbb|includes)/#', '', $file); - - $classes[] = 'phpbb_' . str_replace('/', '_', substr($file, 0, -strlen('.' . $this->php_ext))); + if (preg_match('#^includes/#', $file)) + { + $file = preg_replace('#^includes/#', '', $file); + $classes[] = 'phpbb_' . str_replace('/', '_', substr($file, 0, -strlen('.' . $this->php_ext))); + } + else + { + $file = preg_replace('#^phpbb/#', '', $file); + $classes[] = 'phpbb\\' . str_replace('/', '\\', substr($file, 0, -strlen('.' . $this->php_ext))); + } } return $classes; } |