mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
@@ -54,7 +54,7 @@ class acp_extensions
|
||||
// If they've specified an extension, let's load the metadata manager and validate it.
|
||||
if ($ext_name)
|
||||
{
|
||||
$md_manager = new phpbb_extension_metadata_manager($ext_name, $db, $phpbb_extension_manager, $phpbb_root_path, ".$phpEx", $template, $config);
|
||||
$md_manager = new phpbb_extension_metadata_manager($ext_name, $db, $phpbb_extension_manager, $phpbb_root_path, $phpEx, $template, $config);
|
||||
|
||||
try
|
||||
{
|
||||
|
@@ -74,7 +74,7 @@ class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver
|
||||
|
||||
if (!function_exists('validate_data'))
|
||||
{
|
||||
require($this->phpbb_root_path . 'includes/functions_user' . $this->php_ext);
|
||||
require($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
|
||||
}
|
||||
|
||||
$validate_array = validate_data(
|
||||
|
@@ -63,7 +63,7 @@ class phpbb_avatar_driver_remote extends phpbb_avatar_driver
|
||||
|
||||
if (!function_exists('validate_data'))
|
||||
{
|
||||
require($this->phpbb_root_path . 'includes/functions_user' . $this->php_ext);
|
||||
require($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
|
||||
}
|
||||
|
||||
$validate_array = validate_data(
|
||||
@@ -117,7 +117,7 @@ class phpbb_avatar_driver_remote extends phpbb_avatar_driver
|
||||
|
||||
if (!class_exists('fileupload'))
|
||||
{
|
||||
include($this->phpbb_root_path . 'includes/functions_upload' . $this->php_ext);
|
||||
include($this->phpbb_root_path . 'includes/functions_upload.' . $this->php_ext);
|
||||
}
|
||||
|
||||
$types = fileupload::image_types();
|
||||
|
@@ -27,7 +27,7 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver
|
||||
public function get_data($row, $ignore_config = false)
|
||||
{
|
||||
return array(
|
||||
'src' => $this->phpbb_root_path . 'download/file' . $this->php_ext . '?avatar=' . $row['avatar'],
|
||||
'src' => $this->phpbb_root_path . 'download/file.' . $this->php_ext . '?avatar=' . $row['avatar'],
|
||||
'width' => $row['avatar_width'],
|
||||
'height' => $row['avatar_height'],
|
||||
);
|
||||
@@ -63,7 +63,7 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver
|
||||
|
||||
if (!class_exists('fileupload'))
|
||||
{
|
||||
include($this->phpbb_root_path . 'includes/functions_upload' . $this->php_ext);
|
||||
include($this->phpbb_root_path . 'includes/functions_upload.' . $this->php_ext);
|
||||
}
|
||||
|
||||
$upload = new fileupload('AVATAR_', $this->allowed_extensions, $this->config['avatar_filesize'], $this->config['avatar_min_width'], $this->config['avatar_min_height'], $this->config['avatar_max_width'], $this->config['avatar_max_height'], (isset($this->config['mime_triggers']) ? explode('|', $this->config['mime_triggers']) : false));
|
||||
|
@@ -52,7 +52,7 @@ class phpbb_class_loader
|
||||
* @param string $php_ext The file extension for PHP files
|
||||
* @param phpbb_cache_driver_interface $cache An implementation of the phpBB cache interface.
|
||||
*/
|
||||
public function __construct($prefix, $path, $php_ext = '.php', phpbb_cache_driver_interface $cache = null)
|
||||
public function __construct($prefix, $path, $php_ext = 'php', phpbb_cache_driver_interface $cache = null)
|
||||
{
|
||||
$this->prefix = $prefix;
|
||||
$this->path = $path;
|
||||
@@ -111,7 +111,7 @@ class phpbb_class_loader
|
||||
{
|
||||
if (isset($this->cached_paths[$class]))
|
||||
{
|
||||
return $this->path . $this->cached_paths[$class] . $this->php_ext;
|
||||
return $this->path . $this->cached_paths[$class] . '.' . $this->php_ext;
|
||||
}
|
||||
|
||||
if (!preg_match('/^' . $this->prefix . '[a-zA-Z0-9_]+$/', $class))
|
||||
@@ -136,7 +136,7 @@ class phpbb_class_loader
|
||||
|
||||
$relative_path = $dirs . implode(array_slice($parts, $i, sizeof($parts) - $i), '_');
|
||||
|
||||
if (!file_exists($this->path . $relative_path . $this->php_ext))
|
||||
if (!file_exists($this->path . $relative_path . '.' . $this->php_ext))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -147,7 +147,7 @@ class phpbb_class_loader
|
||||
$this->cache->put('class_loader_' . $this->prefix, $this->cached_paths);
|
||||
}
|
||||
|
||||
return $this->path . $relative_path . $this->php_ext;
|
||||
return $this->path . $relative_path . '.' . $this->php_ext;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -117,7 +117,7 @@ class phpbb_controller_helper
|
||||
$params = array('controller' => $route);
|
||||
}
|
||||
|
||||
return append_sid($this->phpbb_root_path . 'app' . $this->php_ext . $route_params, $params, $is_amp, $session_id);
|
||||
return append_sid($this->phpbb_root_path . 'app.' . $this->php_ext . $route_params, $params, $is_amp, $session_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -62,7 +62,7 @@ class phpbb_extension_finder
|
||||
* @param string $cache_name The name of the cache variable, defaults to
|
||||
* _ext_finder
|
||||
*/
|
||||
public function __construct(phpbb_extension_manager $extension_manager, phpbb_filesystem $filesystem, $phpbb_root_path = '', phpbb_cache_driver_interface $cache = null, $php_ext = '.php', $cache_name = '_ext_finder')
|
||||
public function __construct(phpbb_extension_manager $extension_manager, phpbb_filesystem $filesystem, $phpbb_root_path = '', phpbb_cache_driver_interface $cache = null, $php_ext = 'php', $cache_name = '_ext_finder')
|
||||
{
|
||||
$this->extension_manager = $extension_manager;
|
||||
$this->filesystem = $filesystem;
|
||||
@@ -256,8 +256,8 @@ class phpbb_extension_finder
|
||||
*/
|
||||
public function get_classes($cache = true, $use_all_available = false)
|
||||
{
|
||||
$this->query['extension_suffix'] .= $this->php_ext;
|
||||
$this->query['core_suffix'] .= $this->php_ext;
|
||||
$this->query['extension_suffix'] .= '.' . $this->php_ext;
|
||||
$this->query['core_suffix'] .= '.' . $this->php_ext;
|
||||
|
||||
$files = $this->find($cache, false, $use_all_available);
|
||||
|
||||
@@ -277,7 +277,7 @@ class phpbb_extension_finder
|
||||
{
|
||||
$file = preg_replace('#^includes/#', '', $file);
|
||||
|
||||
$classes[] = 'phpbb_' . str_replace('/', '_', substr($file, 0, -strlen($this->php_ext)));
|
||||
$classes[] = 'phpbb_' . str_replace('/', '_', substr($file, 0, -strlen('.' . $this->php_ext)));
|
||||
}
|
||||
return $classes;
|
||||
}
|
||||
|
@@ -51,7 +51,7 @@ class phpbb_extension_manager
|
||||
* @param phpbb_cache_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 $db, phpbb_config $config, phpbb_db_migrator $migrator, phpbb_filesystem $filesystem, $extension_table, $phpbb_root_path, $php_ext = '.php', phpbb_cache_driver_interface $cache = null, $cache_name = '_ext')
|
||||
public function __construct(ContainerInterface $container, phpbb_db_driver $db, phpbb_config $config, phpbb_db_migrator $migrator, phpbb_filesystem $filesystem, $extension_table, $phpbb_root_path, $php_ext = 'php', phpbb_cache_driver_interface $cache = null, $cache_name = '_ext')
|
||||
{
|
||||
$this->container = $container;
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
@@ -412,7 +412,7 @@ class phpbb_extension_manager
|
||||
RecursiveIteratorIterator::SELF_FIRST);
|
||||
foreach ($iterator as $file_info)
|
||||
{
|
||||
if ($file_info->isFile() && $file_info->getFilename() == 'ext' . $this->php_ext)
|
||||
if ($file_info->isFile() && $file_info->getFilename() == 'ext.' . $this->php_ext)
|
||||
{
|
||||
$ext_name = $iterator->getInnerIterator()->getSubPath();
|
||||
|
||||
|
@@ -39,7 +39,7 @@ class phpbb_extension_metadata_manager
|
||||
* @param string $phpbb_root_path Path to the phpbb includes directory.
|
||||
* @param string $phpEx php file extension
|
||||
*/
|
||||
public function __construct($ext_name, phpbb_db_driver $db, phpbb_extension_manager $extension_manager, $phpbb_root_path, $phpEx = '.php', phpbb_template $template, phpbb_config $config)
|
||||
public function __construct($ext_name, phpbb_db_driver $db, phpbb_extension_manager $extension_manager, $phpbb_root_path, $phpEx = 'php', phpbb_template $template, phpbb_config $config)
|
||||
{
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->db = $db;
|
||||
|
@@ -60,7 +60,7 @@ function phpbb_create_dumped_url_matcher(phpbb_extension_finder $finder, $root_p
|
||||
'class' => 'phpbb_url_matcher',
|
||||
));
|
||||
|
||||
file_put_contents($root_path . 'cache/url_matcher' . $php_ext, $cached_url_matcher_dump);
|
||||
file_put_contents($root_path . 'cache/url_matcher.' . $php_ext, $cached_url_matcher_dump);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -87,7 +87,7 @@ function phpbb_create_url_matcher(phpbb_extension_finder $finder, RequestContext
|
||||
*/
|
||||
function phpbb_load_url_matcher(RequestContext $context, $root_path, $php_ext)
|
||||
{
|
||||
require($root_path . 'cache/url_matcher' . $php_ext);
|
||||
require($root_path . 'cache/url_matcher.' . $php_ext);
|
||||
return new phpbb_url_matcher($context);
|
||||
}
|
||||
|
||||
@@ -102,5 +102,5 @@ function phpbb_load_url_matcher(RequestContext $context, $root_path, $php_ext)
|
||||
*/
|
||||
function phpbb_url_matcher_dumped($root_path, $php_ext)
|
||||
{
|
||||
return file_exists($root_path . 'cache/url_matcher' . $php_ext);
|
||||
return file_exists($root_path . 'cache/url_matcher.' . $php_ext);
|
||||
}
|
||||
|
@@ -66,7 +66,7 @@ class phpbb_hook_finder
|
||||
{
|
||||
while (($file = readdir($dh)) !== false)
|
||||
{
|
||||
if (strpos($file, 'hook_') === 0 && substr($file, -(strlen($this->php_ext) + 1)) === '.' . $this->php_ext)
|
||||
if (strpos($file, 'hook_') === 0 && substr($file, -strlen('.' . $this->php_ext)) === '.' . $this->php_ext)
|
||||
{
|
||||
$hook_files[] = substr($file, 0, -(strlen($this->php_ext) + 1));
|
||||
}
|
||||
|
Reference in New Issue
Block a user