diff options
| author | Nils Adermann <naderman@naderman.de> | 2013-09-10 17:13:29 +0200 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2013-09-16 00:41:38 +0200 |
| commit | d297eb4aecc6e658987c9647d76fed4210ef77f5 (patch) | |
| tree | a4db94268e69a8713b6bb2da3c9bffec14fec2d2 /phpBB/phpbb | |
| parent | 9a2c29a175085a424e4c638853da22f2cb83f12d (diff) | |
| download | forums-d297eb4aecc6e658987c9647d76fed4210ef77f5.tar forums-d297eb4aecc6e658987c9647d76fed4210ef77f5.tar.gz forums-d297eb4aecc6e658987c9647d76fed4210ef77f5.tar.bz2 forums-d297eb4aecc6e658987c9647d76fed4210ef77f5.tar.xz forums-d297eb4aecc6e658987c9647d76fed4210ef77f5.zip | |
[ticket/11700] Get the installer to run with namespaces
PHPBB3-11700
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; } |
