diff options
Diffstat (limited to 'phpBB/phpbb/extension')
| -rw-r--r-- | phpBB/phpbb/extension/finder.php | 15 | ||||
| -rw-r--r-- | phpBB/phpbb/extension/manager.php | 18 | ||||
| -rw-r--r-- | phpBB/phpbb/extension/metadata_manager.php | 4 | 
3 files changed, 26 insertions, 11 deletions
diff --git a/phpBB/phpbb/extension/finder.php b/phpBB/phpbb/extension/finder.php index c9c16ae6d5..6cc6e1808a 100644 --- a/phpBB/phpbb/extension/finder.php +++ b/phpBB/phpbb/extension/finder.php @@ -475,14 +475,19 @@ class finder  			}  			$directory_pattern = '#' . $directory_pattern . '#'; -			$iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path), \RecursiveIteratorIterator::SELF_FIRST); +			$iterator = new \RecursiveIteratorIterator( +				new \phpbb\recursive_dot_prefix_filter_iterator( +					new \RecursiveDirectoryIterator( +						$path, +						\FilesystemIterator::SKIP_DOTS +					) +				), +				\RecursiveIteratorIterator::SELF_FIRST +			); +  			foreach ($iterator as $file_info)  			{  				$filename = $file_info->getFilename(); -				if ($filename == '.' || $filename == '..') -				{ -					continue; -				}  				if ($file_info->isDir() == $is_dir)  				{ diff --git a/phpBB/phpbb/extension/manager.php b/phpBB/phpbb/extension/manager.php index 23b281deaa..604f680af2 100644 --- a/phpBB/phpbb/extension/manager.php +++ b/phpBB/phpbb/extension/manager.php @@ -34,7 +34,7 @@ class manager  	* Creates a manager and loads information from database  	*  	* @param ContainerInterface $container A container -	* @param \phpbb\db\driver\driver $db A database connection +	* @param \phpbb\db\driver\driver_interface $db A database connection  	* @param \phpbb\config\config $config \phpbb\config\config  	* @param \phpbb\filesystem $filesystem  	* @param string $extension_table The name of the table holding extensions @@ -43,7 +43,7 @@ class manager  	* @param \phpbb\cache\driver\driver_interface $cache A cache instance or null  	* @param string $cache_name The name of the cache variable, defaults to _ext  	*/ -	public function __construct(ContainerInterface $container, \phpbb\db\driver\driver $db, \phpbb\config\config $config, \phpbb\filesystem $filesystem, $extension_table, $phpbb_root_path, $php_ext = 'php', \phpbb\cache\driver\driver_interface $cache = null, $cache_name = '_ext') +	public function __construct(ContainerInterface $container, \phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\filesystem $filesystem, $extension_table, $phpbb_root_path, $php_ext = 'php', \phpbb\cache\driver\driver_interface $cache = null, $cache_name = '_ext')  	{  		$this->container = $container;  		$this->phpbb_root_path = $phpbb_root_path; @@ -212,6 +212,11 @@ class manager  			$this->cache->purge();  		} +		if ($active) +		{ +			$this->config->increment('assets_version', 1); +		} +  		return !$active;  	} @@ -404,8 +409,13 @@ class manager  		}  		$iterator = new \RecursiveIteratorIterator( -			new \RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/', \FilesystemIterator::NEW_CURRENT_AND_KEY | \FilesystemIterator::FOLLOW_SYMLINKS), -			\RecursiveIteratorIterator::SELF_FIRST); +			new \phpbb\recursive_dot_prefix_filter_iterator( +				new \RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/', \FilesystemIterator::NEW_CURRENT_AND_KEY | \FilesystemIterator::FOLLOW_SYMLINKS) +			), +			\RecursiveIteratorIterator::SELF_FIRST +		); +		$iterator->setMaxDepth(2); +  		foreach ($iterator as $file_info)  		{  			if ($file_info->isFile() && $file_info->getFilename() == 'ext.' . $this->php_ext) diff --git a/phpBB/phpbb/extension/metadata_manager.php b/phpBB/phpbb/extension/metadata_manager.php index 66cdb86513..c90445ee09 100644 --- a/phpBB/phpbb/extension/metadata_manager.php +++ b/phpBB/phpbb/extension/metadata_manager.php @@ -196,7 +196,7 @@ class metadata_manager  		$fields = array(  			'name'		=> '#^[a-zA-Z0-9_\x7f-\xff]{2,}/[a-zA-Z0-9_\x7f-\xff]{2,}$#',  			'type'		=> '#^phpbb-extension$#', -			'licence'	=> '#.+#', +			'license'	=> '#.+#',  			'version'	=> '#.+#',  		); @@ -351,7 +351,7 @@ class metadata_manager  			'META_HOMEPAGE'		=> (isset($this->metadata['homepage'])) ? $this->metadata['homepage'] : '',  			'META_VERSION'		=> (isset($this->metadata['version'])) ? htmlspecialchars($this->metadata['version']) : '',  			'META_TIME'			=> (isset($this->metadata['time'])) ? htmlspecialchars($this->metadata['time']) : '', -			'META_LICENCE'		=> htmlspecialchars($this->metadata['licence']), +			'META_LICENSE'		=> htmlspecialchars($this->metadata['license']),  			'META_REQUIRE_PHP'		=> (isset($this->metadata['require']['php'])) ? htmlspecialchars($this->metadata['require']['php']) : '',  			'META_REQUIRE_PHP_FAIL'	=> !$this->validate_require_php(),  | 
