diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2016-01-24 22:39:37 +0100 | 
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2016-01-24 22:39:37 +0100 | 
| commit | fac4672f3f2def54fb65e325e77dea14cbc4aa6a (patch) | |
| tree | d40397aa53bc5df171187071d9022428576930df /phpBB | |
| parent | a60935b99db712f8eec7b9ef3b9a00ac0d9a3d51 (diff) | |
| download | forums-fac4672f3f2def54fb65e325e77dea14cbc4aa6a.tar forums-fac4672f3f2def54fb65e325e77dea14cbc4aa6a.tar.gz forums-fac4672f3f2def54fb65e325e77dea14cbc4aa6a.tar.bz2 forums-fac4672f3f2def54fb65e325e77dea14cbc4aa6a.tar.xz forums-fac4672f3f2def54fb65e325e77dea14cbc4aa6a.zip  | |
[ticket/13733] Remove validate_classes method argument
PHPBB3-13733
Diffstat (limited to 'phpBB')
| -rw-r--r-- | phpBB/phpbb/extension/base.php | 26 | 
1 files changed, 10 insertions, 16 deletions
diff --git a/phpBB/phpbb/extension/base.php b/phpBB/phpbb/extension/base.php index d2c13e8270..b647242b98 100644 --- a/phpBB/phpbb/extension/base.php +++ b/phpBB/phpbb/extension/base.php @@ -121,11 +121,9 @@ class base implements \phpbb\extension\extension_interface  	/**  	* Get the list of migration files from this extension  	* -	* @var bool $validate_classes Whether or not to check that the migration -	*		class exists and extends the base migration class.  	* @return array  	*/ -	protected function get_migration_file_list($validate_classes = true) +	protected function get_migration_file_list()  	{  		if ($this->migrations !== false)  		{ @@ -139,24 +137,20 @@ class base implements \phpbb\extension\extension_interface  		$migrations = $this->extension_finder->get_classes_from_files($migrations); -		if ($validate_classes) +		// Unset classes that do not exist or do not extend the +		// abstract class phpbb\db\migration\migration +		foreach ($migrations as $key => $migration)  		{ -			// Unset classes that do not exist or do not extend the -			// abstract class phpbb\db\migration\migration -			foreach ($migrations as $key => $migration) +			if (class_exists($migration))  			{ -				if (class_exists($migration)) +				$reflector = new \ReflectionClass($migration); +				if ($reflector->implementsInterface('\phpbb\db\migration\migration_interface') && $reflector->isInstantiable())  				{ -					$reflector = new \ReflectionClass($migration); -					if ($reflector->implementsInterface('\phpbb\db\migration\migration_interface') && $reflector->isInstantiable()) -					{ -						continue; -					} - +					continue;  				} - -				unset($migrations[$key]);  			} + +			unset($migrations[$key]);  		}  		return $migrations;  | 
