mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/11698] Moving all autoloadable files to phpbb/
PHPBB3-11698
This commit is contained in:
parent
4186c05bb4
commit
7030578bbe
273 changed files with 37 additions and 52 deletions
|
@ -46,7 +46,7 @@ if (!defined('PHPBB_INSTALLED'))
|
||||||
$script_path = preg_replace('#[\\\\/]{2,}#', '/', $script_path);
|
$script_path = preg_replace('#[\\\\/]{2,}#', '/', $script_path);
|
||||||
|
|
||||||
// Eliminate . and .. from the path
|
// Eliminate . and .. from the path
|
||||||
require($phpbb_root_path . 'includes/filesystem.' . $phpEx);
|
require($phpbb_root_path . 'phpbb/filesystem.' . $phpEx);
|
||||||
$phpbb_filesystem = new phpbb_filesystem();
|
$phpbb_filesystem = new phpbb_filesystem();
|
||||||
$script_path = $phpbb_filesystem->clean_path($script_path);
|
$script_path = $phpbb_filesystem->clean_path($script_path);
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ $phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relati
|
||||||
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
|
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
|
||||||
|
|
||||||
// Include files
|
// Include files
|
||||||
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
|
require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
|
||||||
|
|
||||||
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
||||||
require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
|
require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
|
||||||
|
@ -85,7 +85,7 @@ require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
||||||
set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
|
set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
|
||||||
|
|
||||||
// Setup class loader first
|
// Setup class loader first
|
||||||
$phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}includes/", $phpEx);
|
$phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}phpbb/", $phpEx);
|
||||||
$phpbb_class_loader->register();
|
$phpbb_class_loader->register();
|
||||||
$phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', "{$phpbb_root_path}ext/", $phpEx);
|
$phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', "{$phpbb_root_path}ext/", $phpEx);
|
||||||
$phpbb_class_loader_ext->register();
|
$phpbb_class_loader_ext->register();
|
||||||
|
|
|
@ -560,7 +560,7 @@ class acp_search
|
||||||
return $finder
|
return $finder
|
||||||
->extension_suffix('_backend')
|
->extension_suffix('_backend')
|
||||||
->extension_directory('/search')
|
->extension_directory('/search')
|
||||||
->core_path('includes/search/')
|
->core_path('phpbb/search/')
|
||||||
->get_classes();
|
->get_classes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ $phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relati
|
||||||
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
|
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
|
||||||
|
|
||||||
// Include files
|
// Include files
|
||||||
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
|
require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
|
||||||
|
|
||||||
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
||||||
require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
|
require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
|
||||||
|
@ -95,7 +95,7 @@ require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
||||||
set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
|
set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
|
||||||
|
|
||||||
// Setup class loader first
|
// Setup class loader first
|
||||||
$phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}includes/", $phpEx);
|
$phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}phpbb/", $phpEx);
|
||||||
$phpbb_class_loader->register();
|
$phpbb_class_loader->register();
|
||||||
|
|
||||||
// Set up container (must be done here because extensions table may not exist)
|
// Set up container (must be done here because extensions table may not exist)
|
||||||
|
@ -217,7 +217,7 @@ $phpbb_extension_manager = $phpbb_container->get('ext.manager');
|
||||||
$finder = $phpbb_extension_manager->get_finder();
|
$finder = $phpbb_extension_manager->get_finder();
|
||||||
|
|
||||||
$migrations = $finder
|
$migrations = $finder
|
||||||
->core_path('includes/db/migration/data/')
|
->core_path('phpbb/db/migration/data/')
|
||||||
->get_classes();
|
->get_classes();
|
||||||
$migrator->set_migrations($migrations);
|
$migrator->set_migrations($migrations);
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ $phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relati
|
||||||
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
|
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
|
||||||
|
|
||||||
// Include essential scripts
|
// Include essential scripts
|
||||||
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
|
require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
|
||||||
|
|
||||||
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
||||||
require($phpbb_root_path . 'includes/functions_container.' . $phpEx);
|
require($phpbb_root_path . 'includes/functions_container.' . $phpEx);
|
||||||
|
@ -90,7 +90,7 @@ include($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
||||||
require($phpbb_root_path . 'includes/functions_install.' . $phpEx);
|
require($phpbb_root_path . 'includes/functions_install.' . $phpEx);
|
||||||
|
|
||||||
// Setup class loader first
|
// Setup class loader first
|
||||||
$phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}includes/", $phpEx);
|
$phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}phpbb/", $phpEx);
|
||||||
$phpbb_class_loader->register();
|
$phpbb_class_loader->register();
|
||||||
$phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', "{$phpbb_root_path}ext/", $phpEx);
|
$phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', "{$phpbb_root_path}ext/", $phpEx);
|
||||||
$phpbb_class_loader_ext->register();
|
$phpbb_class_loader_ext->register();
|
||||||
|
|
|
@ -1435,7 +1435,7 @@ class install_install extends module
|
||||||
$db->sql_return_on_error(true);
|
$db->sql_return_on_error(true);
|
||||||
|
|
||||||
include_once($phpbb_root_path . 'includes/constants.' . $phpEx);
|
include_once($phpbb_root_path . 'includes/constants.' . $phpEx);
|
||||||
include_once($phpbb_root_path . 'includes/search/fulltext_native.' . $phpEx);
|
include_once($phpbb_root_path . 'phpbb/search/fulltext_native.' . $phpEx);
|
||||||
|
|
||||||
// We need to fill the config to let internal functions correctly work
|
// We need to fill the config to let internal functions correctly work
|
||||||
$config = new phpbb_config_db($db, new phpbb_cache_driver_null, CONFIG_TABLE);
|
$config = new phpbb_config_db($db, new phpbb_cache_driver_null, CONFIG_TABLE);
|
||||||
|
@ -1888,7 +1888,7 @@ class install_install extends module
|
||||||
/**
|
/**
|
||||||
* Populate migrations for the installation
|
* Populate migrations for the installation
|
||||||
*
|
*
|
||||||
* This "installs" all migrations from (root path)/includes/db/migrations/data.
|
* This "installs" all migrations from (root path)/phpbb/db/migrations/data.
|
||||||
* "installs" means it adds all migrations to the migrations table, but does not
|
* "installs" means it adds all migrations to the migrations table, but does not
|
||||||
* perform any of the actions in the migrations.
|
* perform any of the actions in the migrations.
|
||||||
*
|
*
|
||||||
|
@ -1900,7 +1900,7 @@ class install_install extends module
|
||||||
$finder = $extension_manager->get_finder();
|
$finder = $extension_manager->get_finder();
|
||||||
|
|
||||||
$migrations = $finder
|
$migrations = $finder
|
||||||
->core_path('includes/db/migration/data/')
|
->core_path('phpbb/db/migration/data/')
|
||||||
->get_classes();
|
->get_classes();
|
||||||
$migrator->populate_migrations($migrations);
|
$migrator->populate_migrations($migrations);
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,11 +61,6 @@ class phpbb_cron_task_core_tidy_search extends phpbb_cron_task_base
|
||||||
// Select the search method
|
// Select the search method
|
||||||
$search_type = basename($this->config['search_type']);
|
$search_type = basename($this->config['search_type']);
|
||||||
|
|
||||||
if (!class_exists($search_type))
|
|
||||||
{
|
|
||||||
include($this->phpbb_root_path . "includes/search/$search_type." . $this->php_ext);
|
|
||||||
}
|
|
||||||
|
|
||||||
// We do some additional checks in the module to ensure it can actually be utilised
|
// We do some additional checks in the module to ensure it can actually be utilised
|
||||||
$error = false;
|
$error = false;
|
||||||
$search = new $search_type($error, $this->phpbb_root_path, $this->php_ext, $this->auth, $this->config, $this->db, $this->user);
|
$search = new $search_type($error, $this->phpbb_root_path, $this->php_ext, $this->auth, $this->config, $this->db, $this->user);
|
||||||
|
@ -90,7 +85,7 @@ class phpbb_cron_task_core_tidy_search extends phpbb_cron_task_base
|
||||||
// Select the search method
|
// Select the search method
|
||||||
$search_type = basename($this->config['search_type']);
|
$search_type = basename($this->config['search_type']);
|
||||||
|
|
||||||
return file_exists($this->phpbb_root_path . 'includes/search/' . $search_type . '.' . $this->php_ext);
|
return class_exists($search_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue