mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-18 14:31:19 +02:00
Merge branch 'develop' of github.com:phpbb/phpbb3 into ticket/11850
# By Nils Adermann (68) and others # Via Andreas Fischer (12) and others * 'develop' of github.com:phpbb/phpbb3: (102 commits) [ticket/11876] Replace MD5 with SHA256. [ticket/11876] Move checksum generation from build PHP files to phing build.xml [develop-olympus] Build against 3.0.12 instead of 3.0.12-RC3. Tag exists now. [prep-release-3.0.12] Update changelog for 3.0.12 release. [ticket/11873] Add unit test for large password input. [ticket/11873] Do not hash very large passwords in order to safe resources. [ticket/11862] Correct var names in user_delete() events due to prune-users [develop-olympus] Use 3.0.13-dev as build version. Use latest 3.0.12 RC tag. [prep-release-3.0.12] Bumping version number for 3.0.12 final. [ticket/11852] Add class file [ticket/11852] Move tests to folder with new class name [ticket/11852] Split filesystem and path_helper into 2 classes [ticket/11868] Add @depends to test [ticket/11868] Add functional test for registration [ticket/11868] Replace phpbb_request_interface references [ticket/11866] Only single backslash in .md files [ticket/11866] Remove outdated and broken develop script [ticket/11866] More namespaces [ticket/11866] Update some occurances of phpbb_db_ to new Namespace [ticket/11865] Convert old class name to namespaced version ... Conflicts: tests/security/extract_current_page_test.php tests/session/testable_facade.php
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\auth;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
* Permission/Auth class
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_auth
|
||||
class auth
|
||||
{
|
||||
var $acl = array();
|
||||
var $cache = array();
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\auth\provider;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -20,19 +22,19 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package auth
|
||||
*/
|
||||
class phpbb_auth_provider_apache extends phpbb_auth_provider_base
|
||||
class apache extends \phpbb\auth\provider\base
|
||||
{
|
||||
/**
|
||||
* Apache Authentication Constructor
|
||||
*
|
||||
* @param phpbb_db_driver $db
|
||||
* @param phpbb_config $config
|
||||
* @param phpbb_request $request
|
||||
* @param phpbb_user $user
|
||||
* @param \phpbb\db\driver\driver $db
|
||||
* @param \phpbb\config\config $config
|
||||
* @param \phpbb\request\request $request
|
||||
* @param \phpbb\user $user
|
||||
* @param string $phpbb_root_path
|
||||
* @param string $php_ext
|
||||
*/
|
||||
public function __construct(phpbb_db_driver $db, phpbb_config $config, phpbb_request $request, phpbb_user $user, $phpbb_root_path, $php_ext)
|
||||
public function __construct(\phpbb\db\driver\driver $db, \phpbb\config\config $config, \phpbb\request\request $request, \phpbb\user $user, $phpbb_root_path, $php_ext)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->config = $config;
|
||||
@@ -47,7 +49,7 @@ class phpbb_auth_provider_apache extends phpbb_auth_provider_base
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
if (!$this->request->is_set('PHP_AUTH_USER', phpbb_request_interface::SERVER) || $this->user->data['username'] !== htmlspecialchars_decode($this->request->server('PHP_AUTH_USER')))
|
||||
if (!$this->request->is_set('PHP_AUTH_USER', \phpbb\request\request_interface::SERVER) || $this->user->data['username'] !== htmlspecialchars_decode($this->request->server('PHP_AUTH_USER')))
|
||||
{
|
||||
return $this->user->lang['APACHE_SETUP_BEFORE_USE'];
|
||||
}
|
||||
@@ -78,7 +80,7 @@ class phpbb_auth_provider_apache extends phpbb_auth_provider_base
|
||||
);
|
||||
}
|
||||
|
||||
if (!$this->request->is_set('PHP_AUTH_USER', phpbb_request_interface::SERVER))
|
||||
if (!$this->request->is_set('PHP_AUTH_USER', \phpbb\request\request_interface::SERVER))
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_EXTERNAL_AUTH,
|
||||
@@ -149,7 +151,7 @@ class phpbb_auth_provider_apache extends phpbb_auth_provider_base
|
||||
*/
|
||||
public function autologin()
|
||||
{
|
||||
if (!$this->request->is_set('PHP_AUTH_USER', phpbb_request_interface::SERVER))
|
||||
if (!$this->request->is_set('PHP_AUTH_USER', \phpbb\request\request_interface::SERVER))
|
||||
{
|
||||
return array();
|
||||
}
|
||||
@@ -241,7 +243,7 @@ class phpbb_auth_provider_apache extends phpbb_auth_provider_base
|
||||
public function validate_session($user)
|
||||
{
|
||||
// Check if PHP_AUTH_USER is set and handle this case
|
||||
if ($this->request->is_set('PHP_AUTH_USER', phpbb_request_interface::SERVER))
|
||||
if ($this->request->is_set('PHP_AUTH_USER', \phpbb\request\request_interface::SERVER))
|
||||
{
|
||||
$php_auth_user = $this->request->server('PHP_AUTH_USER');
|
||||
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\auth\provider;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package auth
|
||||
*/
|
||||
abstract class phpbb_auth_provider_base implements phpbb_auth_provider_interface
|
||||
abstract class base implements \phpbb\auth\provider\provider_interface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\auth\provider;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -22,20 +24,20 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package auth
|
||||
*/
|
||||
class phpbb_auth_provider_db extends phpbb_auth_provider_base
|
||||
class db extends \phpbb\auth\provider\base
|
||||
{
|
||||
|
||||
/**
|
||||
* Database Authentication Constructor
|
||||
*
|
||||
* @param phpbb_db_driver $db
|
||||
* @param phpbb_config $config
|
||||
* @param phpbb_request $request
|
||||
* @param phpbb_user $user
|
||||
* @param \phpbb\db\driver\driver $db
|
||||
* @param \phpbb\config\config $config
|
||||
* @param \phpbb\request\request $request
|
||||
* @param \phpbb\user $user
|
||||
* @param string $phpbb_root_path
|
||||
* @param string $php_ext
|
||||
*/
|
||||
public function __construct(phpbb_db_driver $db, phpbb_config $config, phpbb_request $request, phpbb_user $user, $phpbb_root_path, $php_ext)
|
||||
public function __construct(\phpbb\db\driver\driver $db, \phpbb\config\config $config, \phpbb\request\request $request, \phpbb\user $user, $phpbb_root_path, $php_ext)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->config = $config;
|
||||
@@ -149,7 +151,7 @@ class phpbb_auth_provider_db extends phpbb_auth_provider_base
|
||||
include ($this->phpbb_root_path . 'includes/captcha/captcha_factory.' . $this->php_ext);
|
||||
}
|
||||
|
||||
$captcha = phpbb_captcha_factory::get_instance($this->config['captcha_plugin']);
|
||||
$captcha = \phpbb_captcha_factory::get_instance($this->config['captcha_plugin']);
|
||||
$captcha->init(CONFIRM_LOGIN);
|
||||
$vc_response = $captcha->validate($row);
|
||||
if ($vc_response)
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\auth\provider;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -22,16 +24,16 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package auth
|
||||
*/
|
||||
class phpbb_auth_provider_ldap extends phpbb_auth_provider_base
|
||||
class ldap extends \phpbb\auth\provider\base
|
||||
{
|
||||
/**
|
||||
* LDAP Authentication Constructor
|
||||
*
|
||||
* @param phpbb_db_driver $db
|
||||
* @param phpbb_config $config
|
||||
* @param phpbb_user $user
|
||||
* @param \phpbb\db\driver\driver $db
|
||||
* @param \phpbb\config\config $config
|
||||
* @param \phpbb\user $user
|
||||
*/
|
||||
public function __construct(phpbb_db_driver $db, phpbb_config $config, phpbb_user $user)
|
||||
public function __construct(\phpbb\db\driver\driver $db, \phpbb\config\config $config, \phpbb\user $user)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->config = $config;
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\auth\provider\oauth;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -23,33 +25,33 @@ use OAuth\Common\Http\Uri\Uri;
|
||||
*
|
||||
* @package auth
|
||||
*/
|
||||
class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||
class oauth extends \phpbb\auth\provider\base
|
||||
{
|
||||
/**
|
||||
* Database driver
|
||||
*
|
||||
* @var phpbb_db_driver
|
||||
* @var \phpbb\db\driver\driver
|
||||
*/
|
||||
protected $db;
|
||||
|
||||
/**
|
||||
* phpBB config
|
||||
*
|
||||
* @var phpbb_config
|
||||
* @var \phpbb\config\config
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* phpBB request object
|
||||
*
|
||||
* @var phpbb_request
|
||||
* @var \phpbb\request\request_interface
|
||||
*/
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* phpBB user
|
||||
*
|
||||
* @var phpbb_user
|
||||
* @var \phpbb\user
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
@@ -70,7 +72,7 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||
/**
|
||||
* All OAuth service providers
|
||||
*
|
||||
* @var phpbb_di_service_collection Contains phpbb_auth_provider_oauth_service_interface
|
||||
* @var \phpbb\di\service_collection Contains \phpbb\auth\provider\oauth\service_interface
|
||||
*/
|
||||
protected $service_providers;
|
||||
|
||||
@@ -105,18 +107,18 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||
/**
|
||||
* OAuth Authentication Constructor
|
||||
*
|
||||
* @param phpbb_db_driver $db
|
||||
* @param phpbb_config $config
|
||||
* @param phpbb_request $request
|
||||
* @param phpbb_user $user
|
||||
* @param \phpbb\db\driver\driver $db
|
||||
* @param \phpbb\config\config $config
|
||||
* @param \phpbb\request\request_interface $request
|
||||
* @param \phpbb\user $user
|
||||
* @param string $auth_provider_oauth_token_storage_table
|
||||
* @param string $auth_provider_oauth_token_account_assoc
|
||||
* @param phpbb_di_service_collection $service_providers Contains phpbb_auth_provider_oauth_service_interface
|
||||
* @param \phpbb\di\service_collection $service_providers Contains \phpbb\auth\provider\oauth\service_interface
|
||||
* @param string $users_table
|
||||
* @param string $phpbb_root_path
|
||||
* @param string $php_ext
|
||||
*/
|
||||
public function __construct(phpbb_db_driver $db, phpbb_config $config, phpbb_request $request, phpbb_user $user, $auth_provider_oauth_token_storage_table, $auth_provider_oauth_token_account_assoc, phpbb_di_service_collection $service_providers, $users_table, $phpbb_root_path, $php_ext)
|
||||
public function __construct(\phpbb\db\driver\driver $db, \phpbb\config\config $config, \phpbb\request\request_interface $request, \phpbb\user $user, $auth_provider_oauth_token_storage_table, $auth_provider_oauth_token_account_assoc, \phpbb\di\service_collection $service_providers, $users_table, $phpbb_root_path, $php_ext)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->config = $config;
|
||||
@@ -156,7 +158,7 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||
// Temporary workaround for only having one authentication provider available
|
||||
if (!$this->request->is_set('oauth_service'))
|
||||
{
|
||||
$provider = new phpbb_auth_provider_db($this->db, $this->config, $this->request, $this->user, $this->phpbb_root_path, $this->php_ext);
|
||||
$provider = new \phpbb\auth\provider\db($this->db, $this->config, $this->request, $this->user, $this->phpbb_root_path, $this->php_ext);
|
||||
return $provider->login($username, $password);
|
||||
}
|
||||
|
||||
@@ -175,11 +177,11 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||
// Get the service credentials for the given service
|
||||
$service_credentials = $this->service_providers[$service_name]->get_service_credentials();
|
||||
|
||||
$storage = new phpbb_auth_provider_oauth_token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table);
|
||||
$storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table);
|
||||
$query = 'mode=login&login=external&oauth_service=' . $service_name_original;
|
||||
$service = $this->get_service($service_name_original, $storage, $service_credentials, $this->service_providers[$service_name]->get_auth_scope(), $query);
|
||||
|
||||
if ($this->request->is_set('code', phpbb_request_interface::GET))
|
||||
if ($this->request->is_set('code', \phpbb\request\request_interface::GET))
|
||||
{
|
||||
$this->service_providers[$service_name]->set_external_service_provider($service);
|
||||
$unique_id = $this->service_providers[$service_name]->perform_auth_login();
|
||||
@@ -258,7 +260,7 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||
}
|
||||
|
||||
$uri_factory = new \OAuth\Common\Http\Uri\UriFactory();
|
||||
$current_uri = $uri_factory->createFromSuperGlobalArray($this->request->get_super_global(phpbb_request_interface::SERVER));
|
||||
$current_uri = $uri_factory->createFromSuperGlobalArray($this->request->get_super_global(\phpbb\request\request_interface::SERVER));
|
||||
$current_uri->setQuery($query);
|
||||
|
||||
$this->current_uri = $current_uri;
|
||||
@@ -269,15 +271,15 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||
* Returns a new service object
|
||||
*
|
||||
* @param string $service_name The name of the service
|
||||
* @param phpbb_auth_oauth_token_storage $storage
|
||||
* @param array $service_credentials {@see phpbb_auth_provider_oauth::get_service_credentials}
|
||||
* @param \phpbb\auth\provider\oauth\token_storage $storage
|
||||
* @param array $service_credentials {@see \phpbb\auth\provider\oauth\oauth::get_service_credentials}
|
||||
* @param array $scope The scope of the request against
|
||||
* the api.
|
||||
* @param string $query The query string of the
|
||||
* current_uri used in redirection
|
||||
* @return \OAuth\Common\Service\ServiceInterface
|
||||
*/
|
||||
protected function get_service($service_name, phpbb_auth_provider_oauth_token_storage $storage, array $service_credentials, array $scopes = array(), $query)
|
||||
protected function get_service($service_name, \phpbb\auth\provider\oauth\token_storage $storage, array $service_credentials, array $scopes = array(), $query)
|
||||
{
|
||||
$current_uri = $this->get_current_uri($service_name, $query);
|
||||
|
||||
@@ -434,7 +436,7 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||
/**
|
||||
* Performs the account linking for login_link
|
||||
*
|
||||
* @param array $link_data The same variable given to {@see phpbb_auth_provider_interface::link_account}
|
||||
* @param array $link_data The same variable given to {@see \phpbb\auth\provider\provider_interface::link_account}
|
||||
* @param string $service_name The name of the service being used in
|
||||
* linking.
|
||||
* @return string|null Returns a language constant (string) if an error is
|
||||
@@ -442,7 +444,7 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||
*/
|
||||
protected function link_account_login_link(array $link_data, $service_name)
|
||||
{
|
||||
$storage = new phpbb_auth_provider_oauth_token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table);
|
||||
$storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table);
|
||||
|
||||
// Check for an access token, they should have one
|
||||
if (!$storage->has_access_token_by_session($service_name))
|
||||
@@ -477,7 +479,7 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||
/**
|
||||
* Performs the account linking for auth_link
|
||||
*
|
||||
* @param array $link_data The same variable given to {@see phpbb_auth_provider_interface::link_account}
|
||||
* @param array $link_data The same variable given to {@see \phpbb\auth\provider\provider_interface::link_account}
|
||||
* @param string $service_name The name of the service being used in
|
||||
* linking.
|
||||
* @return string|null Returns a language constant (string) if an error is
|
||||
@@ -485,13 +487,13 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||
*/
|
||||
protected function link_account_auth_link(array $link_data, $service_name)
|
||||
{
|
||||
$storage = new phpbb_auth_provider_oauth_token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table);
|
||||
$storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table);
|
||||
$query = 'i=ucp_auth_link&mode=auth_link&link=1&oauth_service=' . strtolower($link_data['oauth_service']);
|
||||
$service_credentials = $this->service_providers[$service_name]->get_service_credentials();
|
||||
$scopes = $this->service_providers[$service_name]->get_auth_scope();
|
||||
$service = $this->get_service(strtolower($link_data['oauth_service']), $storage, $service_credentials, $scopes, $query);
|
||||
|
||||
if ($this->request->is_set('code', phpbb_request_interface::GET))
|
||||
if ($this->request->is_set('code', \phpbb\request\request_interface::GET))
|
||||
{
|
||||
$this->service_providers[$service_name]->set_external_service_provider($service);
|
||||
$unique_id = $this->service_providers[$service_name]->perform_auth_login();
|
||||
@@ -530,7 +532,7 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||
public function logout($data, $new_session)
|
||||
{
|
||||
// Clear all tokens belonging to the user
|
||||
$storage = new phpbb_auth_provider_oauth_token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table);
|
||||
$storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table);
|
||||
$storage->clearAllTokens();
|
||||
|
||||
return;
|
||||
@@ -610,7 +612,7 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||
|
||||
// Clear all tokens belonging to the user on this servce
|
||||
$service_name = 'auth.provider.oauth.service.' . strtolower($link_data['oauth_service']);
|
||||
$storage = new phpbb_auth_provider_oauth_token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table);
|
||||
$storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table);
|
||||
$storage->clearToken($service_name);
|
||||
|
||||
return;
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\auth\provider\oauth\service;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package auth
|
||||
*/
|
||||
abstract class phpbb_auth_provider_oauth_service_base implements phpbb_auth_provider_oauth_service_interface
|
||||
abstract class base implements \phpbb\auth\provider\oauth\service\service_interface
|
||||
{
|
||||
/**
|
||||
* External OAuth service provider
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\auth\provider\oauth\service;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -20,29 +22,29 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package auth
|
||||
*/
|
||||
class phpbb_auth_provider_oauth_service_bitly extends phpbb_auth_provider_oauth_service_base
|
||||
class bitly extends \phpbb\auth\provider\oauth\service\base
|
||||
{
|
||||
/**
|
||||
* phpBB config
|
||||
*
|
||||
* @var phpbb_config
|
||||
* @var \phpbb\config\config
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* phpBB request
|
||||
*
|
||||
* @var phpbb_request
|
||||
* @var \phpbb\request\request_interface
|
||||
*/
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param phpbb_config $config
|
||||
* @param phpbb_request $request
|
||||
* @param \phpbb\config\config $config
|
||||
* @param \phpbb\request\request_interface $request
|
||||
*/
|
||||
public function __construct(phpbb_config $config, phpbb_request $request)
|
||||
public function __construct(\phpbb\config\config $config, \phpbb\request\request_interface $request)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->request = $request;
|
||||
@@ -66,7 +68,7 @@ class phpbb_auth_provider_oauth_service_bitly extends phpbb_auth_provider_oauth_
|
||||
{
|
||||
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Bitly))
|
||||
{
|
||||
throw new phpbb_auth_provider_oauth_service_exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||
throw new \phpbb\auth\provider\oauth\service\exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||
}
|
||||
|
||||
// This was a callback request from bitly, get the token
|
||||
@@ -86,7 +88,7 @@ class phpbb_auth_provider_oauth_service_bitly extends phpbb_auth_provider_oauth_
|
||||
{
|
||||
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Bitly))
|
||||
{
|
||||
throw new phpbb_auth_provider_oauth_service_exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||
throw new \phpbb\auth\provider\oauth\service\exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||
}
|
||||
|
||||
// Send a request with it
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\auth\provider\oauth\service;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -20,29 +22,29 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package auth
|
||||
*/
|
||||
class phpbb_auth_provider_oauth_service_facebook extends phpbb_auth_provider_oauth_service_base
|
||||
class facebook extends base
|
||||
{
|
||||
/**
|
||||
* phpBB config
|
||||
*
|
||||
* @var phpbb_config
|
||||
* @var phpbb\config\config
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* phpBB request
|
||||
*
|
||||
* @var phpbb_request
|
||||
* @var phpbb\request\request_interface
|
||||
*/
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param phpbb_config $config
|
||||
* @param phpbb_request $request
|
||||
* @param phpbb\config\config $config
|
||||
* @param phpbb\request\request_interface $request
|
||||
*/
|
||||
public function __construct(phpbb_config $config, phpbb_request $request)
|
||||
public function __construct(\phpbb\config\config $config, \phpbb\request\request_interface $request)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->request = $request;
|
||||
@@ -66,7 +68,7 @@ class phpbb_auth_provider_oauth_service_facebook extends phpbb_auth_provider_oau
|
||||
{
|
||||
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Facebook))
|
||||
{
|
||||
throw new phpbb_auth_provider_oauth_service_exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||
throw new exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||
}
|
||||
|
||||
// This was a callback request, get the token
|
||||
@@ -86,7 +88,7 @@ class phpbb_auth_provider_oauth_service_facebook extends phpbb_auth_provider_oau
|
||||
{
|
||||
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Facebook))
|
||||
{
|
||||
throw new phpbb_auth_provider_oauth_service_exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||
throw new exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||
}
|
||||
|
||||
// Send a request with it
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\auth\provider\oauth\service;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -20,29 +22,29 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package auth
|
||||
*/
|
||||
class phpbb_auth_provider_oauth_service_google extends phpbb_auth_provider_oauth_service_base
|
||||
class google extends base
|
||||
{
|
||||
/**
|
||||
* phpBB config
|
||||
*
|
||||
* @var phpbb_config
|
||||
* @var phpbb\config\config
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* phpBB request
|
||||
*
|
||||
* @var phpbb_request
|
||||
* @var phpbb\request\request_interface
|
||||
*/
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param phpbb_config $config
|
||||
* @param phpbb_request $request
|
||||
* @param phpbb\config\config $config
|
||||
* @param phpbb\request\request_interface $request
|
||||
*/
|
||||
public function __construct(phpbb_config $config, phpbb_request $request)
|
||||
public function __construct(\phpbb\config\config $config, \phpbb\request\request_interface $request)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->request = $request;
|
||||
@@ -77,7 +79,7 @@ class phpbb_auth_provider_oauth_service_google extends phpbb_auth_provider_oauth
|
||||
{
|
||||
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Google))
|
||||
{
|
||||
throw new phpbb_auth_provider_oauth_service_exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||
throw new exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||
}
|
||||
|
||||
// This was a callback request, get the token
|
||||
@@ -97,7 +99,7 @@ class phpbb_auth_provider_oauth_service_google extends phpbb_auth_provider_oauth
|
||||
{
|
||||
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Google))
|
||||
{
|
||||
throw new phpbb_auth_provider_oauth_service_exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||
throw new exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||
}
|
||||
|
||||
// Send a request with it
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\auth\provider\oauth\service;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package auth
|
||||
*/
|
||||
interface phpbb_auth_provider_oauth_service_interface
|
||||
interface service_interface
|
||||
{
|
||||
/**
|
||||
* Returns an array of the scopes necessary for auth
|
||||
@@ -52,7 +54,7 @@ interface phpbb_auth_provider_oauth_service_interface
|
||||
/**
|
||||
* Returns the results of the authentication in json format
|
||||
*
|
||||
* @throws phpbb_auth_provider_oauth_service_exception
|
||||
* @throws \phpbb\auth\provider\oauth\service\exception
|
||||
* @return string The unique identifier returned by the service provider
|
||||
* that is used to authenticate the user with phpBB.
|
||||
*/
|
||||
@@ -62,7 +64,7 @@ interface phpbb_auth_provider_oauth_service_interface
|
||||
* Returns the results of the authentication in json format
|
||||
* Use this function when the user already has an access token
|
||||
*
|
||||
* @throws phpbb_auth_provider_oauth_service_exception
|
||||
* @throws \phpbb\auth\provider\oauth\service\exception
|
||||
* @return string The unique identifier returned by the service provider
|
||||
* that is used to authenticate the user with phpBB.
|
||||
*/
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\auth\provider\oauth;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -27,19 +29,19 @@ use OAuth\Common\Storage\Exception\TokenNotFoundException;
|
||||
*
|
||||
* @package auth
|
||||
*/
|
||||
class phpbb_auth_provider_oauth_token_storage implements TokenStorageInterface
|
||||
class token_storage implements TokenStorageInterface
|
||||
{
|
||||
/**
|
||||
* Cache driver.
|
||||
*
|
||||
* @var phpbb_db_driver
|
||||
* @var \phpbb\db\driver\driver
|
||||
*/
|
||||
protected $db;
|
||||
|
||||
/**
|
||||
* phpBB user
|
||||
*
|
||||
* @var phpbb_user
|
||||
* @var \phpbb\user
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
@@ -58,11 +60,11 @@ class phpbb_auth_provider_oauth_token_storage implements TokenStorageInterface
|
||||
/**
|
||||
* Creates token storage for phpBB.
|
||||
*
|
||||
* @param phpbb_db_driver $db
|
||||
* @param phpbb_user $user
|
||||
* @param \phpbb\db\driver\driver $db
|
||||
* @param \phpbb\user $user
|
||||
* @param string $auth_provider_oauth_table
|
||||
*/
|
||||
public function __construct(phpbb_db_driver $db, phpbb_user $user, $auth_provider_oauth_table)
|
||||
public function __construct(\phpbb\db\driver\driver $db, \phpbb\user $user, $auth_provider_oauth_table)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->user = $user;
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\auth\provider;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package auth
|
||||
*/
|
||||
interface phpbb_auth_provider_interface
|
||||
interface provider_interface
|
||||
{
|
||||
/**
|
||||
* Checks whether the user is currently identified to the authentication
|
||||
@@ -131,7 +133,7 @@ interface phpbb_auth_provider_interface
|
||||
* Performs additional actions during logout.
|
||||
*
|
||||
* @param array $data An array corresponding to
|
||||
* phpbb_session::data
|
||||
* \phpbb\session::data
|
||||
* @param boolean $new_session True for a new session, false for no new
|
||||
* session.
|
||||
*/
|
||||
@@ -142,7 +144,7 @@ interface phpbb_auth_provider_interface
|
||||
* into phpBB.
|
||||
*
|
||||
* @param array $user
|
||||
* @return boolean true if the given user is authenticated, false if the
|
||||
* @return boolean true if the given user is authenticated, false if the
|
||||
* session should be closed, or null if not implemented.
|
||||
*/
|
||||
public function validate_session($user);
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\avatar\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
* Base class for avatar drivers
|
||||
* @package phpBB3
|
||||
*/
|
||||
abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
abstract class driver implements \phpbb\avatar\driver\driver_interface
|
||||
{
|
||||
/**
|
||||
* Avatar driver name
|
||||
@@ -29,7 +31,7 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
|
||||
/**
|
||||
* Current board configuration
|
||||
* @var phpbb_config
|
||||
* @var \phpbb\config\config
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
@@ -47,7 +49,7 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
|
||||
/**
|
||||
* Cache driver
|
||||
* @var phpbb_cache_driver_interface
|
||||
* @var \phpbb\cache\driver\driver_interface
|
||||
*/
|
||||
protected $cache;
|
||||
|
||||
@@ -69,13 +71,13 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
/**
|
||||
* Construct a driver object
|
||||
*
|
||||
* @param phpbb_config $config phpBB configuration
|
||||
* @param phpbb_request $request Request object
|
||||
* @param \phpbb\config\config $config phpBB configuration
|
||||
* @param \phpbb\request\request $request Request object
|
||||
* @param string $phpbb_root_path Path to the phpBB root
|
||||
* @param string $php_ext PHP file extension
|
||||
* @param phpbb_cache_driver_interface $cache Cache driver
|
||||
* @param \phpbb\cache\driver\driver_interface $cache Cache driver
|
||||
*/
|
||||
public function __construct(phpbb_config $config, $phpbb_root_path, $php_ext, phpbb_cache_driver_interface $cache = null)
|
||||
public function __construct(\phpbb\config\config $config, $phpbb_root_path, $php_ext, \phpbb\cache\driver\driver_interface $cache = null)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
@@ -112,7 +114,7 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
*/
|
||||
public function get_template_name()
|
||||
{
|
||||
$driver = preg_replace('#^phpbb_avatar_driver_#', '', get_class($this));
|
||||
$driver = preg_replace('#^phpbb\\\\avatar\\\\driver\\\\#', '', get_class($this));
|
||||
$template = "ucp_avatar_options_$driver.html";
|
||||
|
||||
return $template;
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\avatar\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
* Interface for avatar drivers
|
||||
* @package phpBB3
|
||||
*/
|
||||
interface phpbb_avatar_driver_interface
|
||||
interface driver_interface
|
||||
{
|
||||
/**
|
||||
* Returns the name of the driver.
|
||||
@@ -32,7 +34,7 @@ interface phpbb_avatar_driver_interface
|
||||
* Get the avatar url and dimensions
|
||||
*
|
||||
* @param array $row User data or group data that has been cleaned with
|
||||
* phpbb_avatar_manager::clean_row
|
||||
* \phpbb\avatar\manager::clean_row
|
||||
* @return array Avatar data, must have keys src, width and height, e.g.
|
||||
* ['src' => '', 'width' => 0, 'height' => 0]
|
||||
*/
|
||||
@@ -41,9 +43,9 @@ interface phpbb_avatar_driver_interface
|
||||
/**
|
||||
* Returns custom html if it is needed for displaying this avatar
|
||||
*
|
||||
* @param phpbb_user $user phpBB user object
|
||||
* @param \phpbb\user $user phpBB user object
|
||||
* @param array $row User data or group data that has been cleaned with
|
||||
* phpbb_avatar_manager::clean_row
|
||||
* \phpbb\avatar\manager::clean_row
|
||||
* @param string $alt Alternate text for avatar image
|
||||
*
|
||||
* @return string HTML
|
||||
@@ -53,11 +55,11 @@ interface phpbb_avatar_driver_interface
|
||||
/**
|
||||
* Prepare form for changing the settings of this avatar
|
||||
*
|
||||
* @param phpbb_request $request Request object
|
||||
* @param phpbb_template $template Template object
|
||||
* @param phpbb_user $user User object
|
||||
* @param \phpbb\request\request $request Request object
|
||||
* @param \phpbb\template\template $template Template object
|
||||
* @param \phpbb\user $user User object
|
||||
* @param array $row User data or group data that has been cleaned with
|
||||
* phpbb_avatar_manager::clean_row
|
||||
* \phpbb\avatar\manager::clean_row
|
||||
* @param array &$error Reference to an error array that is filled by this
|
||||
* function. Key values can either be a string with a language key or
|
||||
* an array that will be passed to vsprintf() with the language key in
|
||||
@@ -70,7 +72,7 @@ interface phpbb_avatar_driver_interface
|
||||
/**
|
||||
* Prepare form for changing the acp settings of this avatar
|
||||
*
|
||||
* @param phpbb_user $user phpBB user object
|
||||
* @param \phpbb\user $user phpBB user object
|
||||
*
|
||||
* @return array Array of configuration options as consumed by acp_board.
|
||||
* The setting for enabling/disabling the avatar will be handled by
|
||||
@@ -81,11 +83,11 @@ interface phpbb_avatar_driver_interface
|
||||
/**
|
||||
* Process form data
|
||||
*
|
||||
* @param phpbb_request $request Request object
|
||||
* @param phpbb_template $template Template object
|
||||
* @param phpbb_user $user User object
|
||||
* @param \phpbb\request\request $request Request object
|
||||
* @param \phpbb\template\template $template Template object
|
||||
* @param \phpbb\user $user User object
|
||||
* @param array $row User data or group data that has been cleaned with
|
||||
* phpbb_avatar_manager::clean_row
|
||||
* \phpbb\avatar\manager::clean_row
|
||||
* @param array &$error Reference to an error array that is filled by this
|
||||
* function. Key values can either be a string with a language key or
|
||||
* an array that will be passed to vsprintf() with the language key in
|
||||
@@ -100,7 +102,7 @@ interface phpbb_avatar_driver_interface
|
||||
* Delete avatar
|
||||
*
|
||||
* @param array $row User data or group data that has been cleaned with
|
||||
* phpbb_avatar_manager::clean_row
|
||||
* \phpbb\avatar\manager::clean_row
|
||||
*
|
||||
* @return bool True if avatar has been deleted or there is no need to delete,
|
||||
* i.e. when the avatar is not hosted locally.
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\avatar\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
* Handles avatars hosted at gravatar.com
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver
|
||||
class gravatar extends \phpbb\avatar\driver\driver
|
||||
{
|
||||
/**
|
||||
* The URL for the gravatar service
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\avatar\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
* Handles avatars selected from the board gallery
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_avatar_driver_local extends phpbb_avatar_driver
|
||||
class local extends \phpbb\avatar\driver\driver
|
||||
{
|
||||
/**
|
||||
* @inheritdoc
|
||||
@@ -144,7 +146,7 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver
|
||||
* Get a list of avatars that are locally available
|
||||
* Results get cached for 24 hours (86400 seconds)
|
||||
*
|
||||
* @param phpbb_user $user User object
|
||||
* @param \phpbb\user $user User object
|
||||
*
|
||||
* @return array Array containing the locally available avatars
|
||||
*/
|
||||
@@ -157,7 +159,7 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver
|
||||
$avatar_list = array();
|
||||
$path = $this->phpbb_root_path . $this->config['avatar_gallery_path'];
|
||||
|
||||
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS | FilesystemIterator::UNIX_PATHS), RecursiveIteratorIterator::SELF_FIRST);
|
||||
$iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::UNIX_PATHS), \RecursiveIteratorIterator::SELF_FIRST);
|
||||
foreach ($iterator as $file_info)
|
||||
{
|
||||
$file_path = $file_info->getPath();
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\avatar\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
* Handles avatars hosted remotely
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_avatar_driver_remote extends phpbb_avatar_driver
|
||||
class remote extends \phpbb\avatar\driver\driver
|
||||
{
|
||||
/**
|
||||
* @inheritdoc
|
||||
@@ -120,8 +122,8 @@ class phpbb_avatar_driver_remote extends phpbb_avatar_driver
|
||||
include($this->phpbb_root_path . 'includes/functions_upload.' . $this->php_ext);
|
||||
}
|
||||
|
||||
$types = fileupload::image_types();
|
||||
$extension = strtolower(filespec::get_extension($url));
|
||||
$types = \fileupload::image_types();
|
||||
$extension = strtolower(\filespec::get_extension($url));
|
||||
|
||||
if (!empty($image_data) && (!isset($types[$image_data[2]]) || !in_array($extension, $types[$image_data[2]])))
|
||||
{
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\avatar\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
* Handles avatars uploaded to the board
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_avatar_driver_upload extends phpbb_avatar_driver
|
||||
class upload extends \phpbb\avatar\driver\driver
|
||||
{
|
||||
/**
|
||||
* @inheritdoc
|
||||
@@ -66,7 +68,7 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver
|
||||
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));
|
||||
$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));
|
||||
|
||||
$url = $request->variable('avatar_upload_url', '');
|
||||
$upload_file = $request->file('avatar_upload_file');
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\avatar;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -18,11 +20,11 @@ if (!defined('IN_PHPBB'))
|
||||
/**
|
||||
* @package avatar
|
||||
*/
|
||||
class phpbb_avatar_manager
|
||||
class manager
|
||||
{
|
||||
/**
|
||||
* phpBB configuration
|
||||
* @var phpbb_config
|
||||
* @var \phpbb\config\config
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
@@ -59,11 +61,11 @@ class phpbb_avatar_manager
|
||||
/**
|
||||
* Construct an avatar manager object
|
||||
*
|
||||
* @param phpbb_config $config phpBB configuration
|
||||
* @param \phpbb\config\config $config phpBB configuration
|
||||
* @param array $avatar_drivers Avatar drivers passed via the service container
|
||||
* @param object $container Container object
|
||||
*/
|
||||
public function __construct(phpbb_config $config, $avatar_drivers, $container)
|
||||
public function __construct(\phpbb\config\config $config, $avatar_drivers, $container)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->avatar_drivers = $avatar_drivers;
|
||||
@@ -194,7 +196,7 @@ class phpbb_avatar_manager
|
||||
$keys = array_keys($row);
|
||||
$values = array_values($row);
|
||||
|
||||
$keys = array_map(array('phpbb_avatar_manager', 'strip_prefix'), $keys);
|
||||
$keys = array_map(array('\phpbb\avatar\manager', 'strip_prefix'), $keys);
|
||||
|
||||
return array_combine($keys, $values);
|
||||
}
|
||||
@@ -220,7 +222,7 @@ class phpbb_avatar_manager
|
||||
*/
|
||||
static public function clean_driver_name($name)
|
||||
{
|
||||
return str_replace('_', '.', $name);
|
||||
return str_replace(array('\\', '_'), '.', $name);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -262,7 +264,7 @@ class phpbb_avatar_manager
|
||||
$config_name = $this->get_driver_config_name($driver);
|
||||
|
||||
return array(
|
||||
'allow_avatar_' . $config_name => array('lang' => 'ALLOW_' . strtoupper($config_name), 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'allow_avatar_' . $config_name => array('lang' => 'ALLOW_' . strtoupper(str_replace('\\', '_', $config_name)), 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -275,13 +277,13 @@ class phpbb_avatar_manager
|
||||
*/
|
||||
public function get_driver_config_name($driver)
|
||||
{
|
||||
return preg_replace('#^phpbb_avatar_driver_#', '', get_class($driver));
|
||||
return preg_replace('#^phpbb\\\\avatar\\\\driver\\\\#', '', get_class($driver));
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace "error" strings with their real, localized form
|
||||
*
|
||||
* @param phpbb_user phpBB User object
|
||||
* @param \phpbb\user phpBB User object
|
||||
* @param array $error Array containing error strings
|
||||
* Key values can either be a string with a language key or an array
|
||||
* that will be passed to vsprintf() with the language key in the
|
||||
@@ -289,7 +291,7 @@ class phpbb_avatar_manager
|
||||
*
|
||||
* @return array Array containing the localized error strings
|
||||
*/
|
||||
public function localize_errors(phpbb_user $user, $error)
|
||||
public function localize_errors(\phpbb\user $user, $error)
|
||||
{
|
||||
foreach ($error as $key => $lang)
|
||||
{
|
||||
|
4
phpBB/phpbb/cache/driver/apc.php
vendored
4
phpBB/phpbb/cache/driver/apc.php
vendored
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cache\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
* ACM for APC
|
||||
* @package acm
|
||||
*/
|
||||
class phpbb_cache_driver_apc extends phpbb_cache_driver_memory
|
||||
class apc extends \phpbb\cache\driver\memory
|
||||
{
|
||||
var $extension = 'apc';
|
||||
|
||||
|
4
phpBB/phpbb/cache/driver/base.php
vendored
4
phpBB/phpbb/cache/driver/base.php
vendored
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cache\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -18,6 +20,6 @@ if (!defined('IN_PHPBB'))
|
||||
/**
|
||||
* @package acm
|
||||
*/
|
||||
abstract class phpbb_cache_driver_base implements phpbb_cache_driver_interface
|
||||
abstract class base implements \phpbb\cache\driver\driver_interface
|
||||
{
|
||||
}
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cache\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package acm
|
||||
*/
|
||||
interface phpbb_cache_driver_interface
|
||||
interface driver_interface
|
||||
{
|
||||
/**
|
||||
* Load global cache
|
||||
@@ -85,10 +87,10 @@ interface phpbb_cache_driver_interface
|
||||
* result to persistent storage. In other words, there is no need
|
||||
* to call save() afterwards.
|
||||
*
|
||||
* @param phpbb_db_driver $db Database connection
|
||||
* @param \phpbb\db\driver\driver $db Database connection
|
||||
* @param string $query SQL query, should be used for generating storage key
|
||||
* @param mixed $query_result The result from dbal::sql_query, to be passed to
|
||||
* dbal::sql_fetchrow to get all rows and store them
|
||||
* @param mixed $query_result The result from \dbal::sql_query, to be passed to
|
||||
* \dbal::sql_fetchrow to get all rows and store them
|
||||
* in cache.
|
||||
* @param int $ttl Time to live, after this timeout the query should
|
||||
* expire from the cache.
|
||||
@@ -96,7 +98,7 @@ interface phpbb_cache_driver_interface
|
||||
* representing the query should be returned. Otherwise
|
||||
* the original $query_result should be returned.
|
||||
*/
|
||||
public function sql_save(phpbb_db_driver $db, $query, $query_result, $ttl);
|
||||
public function sql_save(\phpbb\db\driver\driver $db, $query, $query_result, $ttl);
|
||||
|
||||
/**
|
||||
* Check if result for a given SQL query exists in cache.
|
4
phpBB/phpbb/cache/driver/eaccelerator.php
vendored
4
phpBB/phpbb/cache/driver/eaccelerator.php
vendored
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cache\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
|
||||
* @package acm
|
||||
* @todo Missing locks from destroy() talk with David
|
||||
*/
|
||||
class phpbb_cache_driver_eaccelerator extends phpbb_cache_driver_memory
|
||||
class eaccelerator extends \phpbb\cache\driver\memory
|
||||
{
|
||||
var $extension = 'eaccelerator';
|
||||
var $function = 'eaccelerator_get';
|
||||
|
16
phpBB/phpbb/cache/driver/file.php
vendored
16
phpBB/phpbb/cache/driver/file.php
vendored
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cache\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
* ACM File Based Caching
|
||||
* @package acm
|
||||
*/
|
||||
class phpbb_cache_driver_file extends phpbb_cache_driver_base
|
||||
class file extends \phpbb\cache\driver\base
|
||||
{
|
||||
var $vars = array();
|
||||
var $var_expires = array();
|
||||
@@ -205,9 +207,9 @@ class phpbb_cache_driver_file extends phpbb_cache_driver_base
|
||||
function purge()
|
||||
{
|
||||
// Purge all phpbb cache files
|
||||
try
|
||||
try
|
||||
{
|
||||
$iterator = new DirectoryIterator($this->cache_dir);
|
||||
$iterator = new \DirectoryIterator($this->cache_dir);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
@@ -256,9 +258,9 @@ class phpbb_cache_driver_file extends phpbb_cache_driver_base
|
||||
*/
|
||||
protected function remove_dir($dir)
|
||||
{
|
||||
try
|
||||
try
|
||||
{
|
||||
$iterator = new DirectoryIterator($dir);
|
||||
$iterator = new \DirectoryIterator($dir);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
@@ -413,7 +415,7 @@ class phpbb_cache_driver_file extends phpbb_cache_driver_base
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
function sql_save(phpbb_db_driver $db, $query, $query_result, $ttl)
|
||||
function sql_save(\phpbb\db\driver\driver $db, $query, $query_result, $ttl)
|
||||
{
|
||||
// Remove extra spaces and tabs
|
||||
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
|
||||
@@ -695,7 +697,7 @@ class phpbb_cache_driver_file extends phpbb_cache_driver_base
|
||||
|
||||
$file = "{$this->cache_dir}$filename.$phpEx";
|
||||
|
||||
$lock = new phpbb_lock_flock($file);
|
||||
$lock = new \phpbb\lock\flock($file);
|
||||
$lock->acquire();
|
||||
|
||||
if ($handle = @fopen($file, 'wb'))
|
||||
|
6
phpBB/phpbb/cache/driver/memcache.php
vendored
6
phpBB/phpbb/cache/driver/memcache.php
vendored
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cache\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -40,7 +42,7 @@ if (!defined('PHPBB_ACM_MEMCACHE'))
|
||||
* ACM for Memcached
|
||||
* @package acm
|
||||
*/
|
||||
class phpbb_cache_driver_memcache extends phpbb_cache_driver_memory
|
||||
class memcache extends \phpbb\cache\driver\memory
|
||||
{
|
||||
var $extension = 'memcache';
|
||||
|
||||
@@ -52,7 +54,7 @@ class phpbb_cache_driver_memcache extends phpbb_cache_driver_memory
|
||||
// Call the parent constructor
|
||||
parent::__construct();
|
||||
|
||||
$this->memcache = new Memcache;
|
||||
$this->memcache = new \Memcache;
|
||||
foreach(explode(',', PHPBB_ACM_MEMCACHE) as $u)
|
||||
{
|
||||
$parts = explode('/', $u);
|
||||
|
6
phpBB/phpbb/cache/driver/memory.php
vendored
6
phpBB/phpbb/cache/driver/memory.php
vendored
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cache\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
* ACM Abstract Memory Class
|
||||
* @package acm
|
||||
*/
|
||||
abstract class phpbb_cache_driver_memory extends phpbb_cache_driver_base
|
||||
abstract class memory extends \phpbb\cache\driver\base
|
||||
{
|
||||
var $key_prefix;
|
||||
|
||||
@@ -285,7 +287,7 @@ abstract class phpbb_cache_driver_memory extends phpbb_cache_driver_base
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
function sql_save(phpbb_db_driver $db, $query, $query_result, $ttl)
|
||||
function sql_save(\phpbb\db\driver\driver $db, $query, $query_result, $ttl)
|
||||
{
|
||||
// Remove extra spaces and tabs
|
||||
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
|
||||
|
6
phpBB/phpbb/cache/driver/null.php
vendored
6
phpBB/phpbb/cache/driver/null.php
vendored
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cache\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
* ACM Null Caching
|
||||
* @package acm
|
||||
*/
|
||||
class phpbb_cache_driver_null extends phpbb_cache_driver_base
|
||||
class null extends \phpbb\cache\driver\base
|
||||
{
|
||||
/**
|
||||
* Set cache path
|
||||
@@ -107,7 +109,7 @@ class phpbb_cache_driver_null extends phpbb_cache_driver_base
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
function sql_save(phpbb_db_driver $db, $query, $query_result, $ttl)
|
||||
function sql_save(\phpbb\db\driver\driver $db, $query, $query_result, $ttl)
|
||||
{
|
||||
return $query_result;
|
||||
}
|
||||
|
10
phpBB/phpbb/cache/driver/redis.php
vendored
10
phpBB/phpbb/cache/driver/redis.php
vendored
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cache\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -33,7 +35,7 @@ if (!defined('PHPBB_ACM_REDIS_HOST'))
|
||||
*
|
||||
* @package acm
|
||||
*/
|
||||
class phpbb_cache_driver_redis extends phpbb_cache_driver_memory
|
||||
class redis extends \phpbb\cache\driver\memory
|
||||
{
|
||||
var $extension = 'redis';
|
||||
|
||||
@@ -56,7 +58,7 @@ class phpbb_cache_driver_redis extends phpbb_cache_driver_memory
|
||||
// Call the parent constructor
|
||||
parent::__construct();
|
||||
|
||||
$this->redis = new Redis();
|
||||
$this->redis = new \Redis();
|
||||
|
||||
$args = func_get_args();
|
||||
if (!empty($args))
|
||||
@@ -83,8 +85,8 @@ class phpbb_cache_driver_redis extends phpbb_cache_driver_memory
|
||||
}
|
||||
}
|
||||
|
||||
$this->redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP);
|
||||
$this->redis->setOption(Redis::OPT_PREFIX, $this->key_prefix);
|
||||
$this->redis->setOption(\Redis::OPT_SERIALIZER, \Redis::SERIALIZER_PHP);
|
||||
$this->redis->setOption(\Redis::OPT_PREFIX, $this->key_prefix);
|
||||
|
||||
if (defined('PHPBB_ACM_REDIS_DB'))
|
||||
{
|
||||
|
4
phpBB/phpbb/cache/driver/wincache.php
vendored
4
phpBB/phpbb/cache/driver/wincache.php
vendored
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cache\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
* ACM for WinCache
|
||||
* @package acm
|
||||
*/
|
||||
class phpbb_cache_driver_wincache extends phpbb_cache_driver_memory
|
||||
class wincache extends \phpbb\cache\driver\memory
|
||||
{
|
||||
var $extension = 'wincache';
|
||||
|
||||
|
4
phpBB/phpbb/cache/driver/xcache.php
vendored
4
phpBB/phpbb/cache/driver/xcache.php
vendored
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cache\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -24,7 +26,7 @@ if (!defined('IN_PHPBB'))
|
||||
* - xcache.admin.enable_auth = off (or xcache.admin.user and xcache.admin.password set)
|
||||
*
|
||||
*/
|
||||
class phpbb_cache_driver_xcache extends phpbb_cache_driver_memory
|
||||
class xcache extends \phpbb\cache\driver\memory
|
||||
{
|
||||
var $extension = 'XCache';
|
||||
|
||||
|
24
phpBB/phpbb/cache/service.php
vendored
24
phpBB/phpbb/cache/service.php
vendored
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cache;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,26 +21,26 @@ if (!defined('IN_PHPBB'))
|
||||
* Class for grabbing/handling cached entries
|
||||
* @package acm
|
||||
*/
|
||||
class phpbb_cache_service
|
||||
class service
|
||||
{
|
||||
/**
|
||||
* Cache driver.
|
||||
*
|
||||
* @var phpbb_cache_driver_interface
|
||||
* @var \phpbb\cache\driver\driver_interface
|
||||
*/
|
||||
protected $driver;
|
||||
|
||||
/**
|
||||
* The config.
|
||||
*
|
||||
* @var phpbb_config
|
||||
* @var \phpbb\config\config
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* Database connection.
|
||||
*
|
||||
* @var phpbb_db_driver
|
||||
* @var \phpbb\db\driver\driver
|
||||
*/
|
||||
protected $db;
|
||||
|
||||
@@ -59,13 +61,13 @@ class phpbb_cache_service
|
||||
/**
|
||||
* Creates a cache service around a cache driver
|
||||
*
|
||||
* @param phpbb_cache_driver_interface $driver The cache driver
|
||||
* @param phpbb_config $config The config
|
||||
* @param phpbb_db_driver $db Database connection
|
||||
* @param \phpbb\cache\driver\driver_interface $driver The cache driver
|
||||
* @param \phpbb\config\config $config The config
|
||||
* @param \phpbb\db\driver\driver $db Database connection
|
||||
* @param string $phpbb_root_path Root path
|
||||
* @param string $php_ext PHP extension
|
||||
*/
|
||||
public function __construct(phpbb_cache_driver_interface $driver, phpbb_config $config, phpbb_db_driver $db, $phpbb_root_path, $php_ext)
|
||||
public function __construct(\phpbb\cache\driver\driver_interface $driver, \phpbb\config\config $config, \phpbb\db\driver\driver $db, $phpbb_root_path, $php_ext)
|
||||
{
|
||||
$this->set_driver($driver);
|
||||
$this->config = $config;
|
||||
@@ -77,7 +79,7 @@ class phpbb_cache_service
|
||||
/**
|
||||
* Returns the cache driver used by this cache service.
|
||||
*
|
||||
* @return phpbb_cache_driver_interface The cache driver
|
||||
* @return \phpbb\cache\driver\driver_interface The cache driver
|
||||
*/
|
||||
public function get_driver()
|
||||
{
|
||||
@@ -87,9 +89,9 @@ class phpbb_cache_service
|
||||
/**
|
||||
* Replaces the cache driver used by this cache service.
|
||||
*
|
||||
* @param phpbb_cache_driver_interface $driver The cache driver
|
||||
* @param \phpbb\cache\driver\driver_interface $driver The cache driver
|
||||
*/
|
||||
public function set_driver(phpbb_cache_driver_interface $driver)
|
||||
public function set_driver(\phpbb\cache\driver\driver_interface $driver)
|
||||
{
|
||||
$this->driver = $driver;
|
||||
}
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -28,9 +30,9 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_class_loader
|
||||
class class_loader
|
||||
{
|
||||
private $prefix;
|
||||
private $namespace;
|
||||
private $path;
|
||||
private $php_ext;
|
||||
private $cache;
|
||||
@@ -44,17 +46,22 @@ class phpbb_class_loader
|
||||
private $cached_paths = array();
|
||||
|
||||
/**
|
||||
* Creates a new phpbb_class_loader, which loads files with the given
|
||||
* Creates a new \phpbb\class_loader, which loads files with the given
|
||||
* file extension from the given path.
|
||||
*
|
||||
* @param string $prefix Required class name prefix for files to be loaded
|
||||
* @param string $namespace Required namespace for files to be loaded
|
||||
* @param string $path Directory to load files from
|
||||
* @param string $php_ext The file extension for PHP files
|
||||
* @param phpbb_cache_driver_interface $cache An implementation of the phpBB cache interface.
|
||||
* @param \phpbb\cache\driver\driver_interface $cache An implementation of the phpBB cache interface.
|
||||
*/
|
||||
public function __construct($prefix, $path, $php_ext = 'php', phpbb_cache_driver_interface $cache = null)
|
||||
{
|
||||
$this->prefix = $prefix;
|
||||
public function __construct($namespace, $path, $php_ext = 'php', \phpbb\cache\driver\driver_interface $cache = null)
|
||||
{
|
||||
if ($namespace[0] !== '\\')
|
||||
{
|
||||
$namespace = '\\' . $namespace;
|
||||
}
|
||||
|
||||
$this->namespace = $namespace;
|
||||
$this->path = $path;
|
||||
$this->php_ext = $php_ext;
|
||||
|
||||
@@ -66,13 +73,13 @@ class phpbb_class_loader
|
||||
* the class loader will resolve paths by checking for the existance of every
|
||||
* directory in the class name every time.
|
||||
*
|
||||
* @param phpbb_cache_driver_interface $cache An implementation of the phpBB cache interface.
|
||||
* @param \phpbb\cache\driver\driver_interface $cache An implementation of the phpBB cache interface.
|
||||
*/
|
||||
public function set_cache(phpbb_cache_driver_interface $cache = null)
|
||||
public function set_cache(\phpbb\cache\driver\driver_interface $cache = null)
|
||||
{
|
||||
if ($cache)
|
||||
{
|
||||
$this->cached_paths = $cache->get('class_loader_' . $this->prefix);
|
||||
$this->cached_paths = $cache->get('class_loader_' . str_replace('\\', '__', $this->namespace));
|
||||
|
||||
if ($this->cached_paths === false)
|
||||
{
|
||||
@@ -102,8 +109,9 @@ class phpbb_class_loader
|
||||
/**
|
||||
* Resolves a phpBB class name to a relative path which can be included.
|
||||
*
|
||||
* @param string $class The class name to resolve, must have a phpbb_
|
||||
* prefix
|
||||
* @param string $class The class name to resolve, must be in the
|
||||
* namespace the loader was constructed with.
|
||||
* Has to begin with \
|
||||
* @return string|bool A relative path to the file containing the
|
||||
* class or false if looking it up failed.
|
||||
*/
|
||||
@@ -114,27 +122,12 @@ class phpbb_class_loader
|
||||
return $this->path . $this->cached_paths[$class] . '.' . $this->php_ext;
|
||||
}
|
||||
|
||||
if (!preg_match('/^' . $this->prefix . '[a-zA-Z0-9_]+$/', $class))
|
||||
if (!preg_match('/^' . preg_quote($this->namespace, '/') . '[a-zA-Z0-9_\\\\]+$/', $class))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$parts = explode('_', substr($class, strlen($this->prefix)));
|
||||
|
||||
$dirs = '';
|
||||
|
||||
for ($i = 0, $n = sizeof($parts); $i < $n && is_dir($this->path . $dirs . $parts[$i]); $i++)
|
||||
{
|
||||
$dirs .= $parts[$i] . '/';
|
||||
}
|
||||
|
||||
// no file name left => use last dir name as file name
|
||||
if ($i == sizeof($parts))
|
||||
{
|
||||
$parts[] = $parts[$i - 1];
|
||||
}
|
||||
|
||||
$relative_path = $dirs . implode(array_slice($parts, $i, sizeof($parts) - $i), '_');
|
||||
$relative_path = str_replace('\\', '/', substr($class, strlen($this->namespace)));
|
||||
|
||||
if (!file_exists($this->path . $relative_path . '.' . $this->php_ext))
|
||||
{
|
||||
@@ -144,7 +137,7 @@ class phpbb_class_loader
|
||||
if ($this->cache)
|
||||
{
|
||||
$this->cached_paths[$class] = $relative_path;
|
||||
$this->cache->put('class_loader_' . $this->prefix, $this->cached_paths);
|
||||
$this->cache->put('class_loader_' . str_replace('\\', '__', $this->namespace), $this->cached_paths);
|
||||
}
|
||||
|
||||
return $this->path . $relative_path . '.' . $this->php_ext;
|
||||
@@ -157,7 +150,8 @@ class phpbb_class_loader
|
||||
*/
|
||||
public function load_class($class)
|
||||
{
|
||||
if (substr($class, 0, strlen($this->prefix)) === $this->prefix)
|
||||
$class = '\\' . $class;
|
||||
if (substr($class, 0, strlen($this->namespace)) === $this->namespace)
|
||||
{
|
||||
$path = $this->resolve_path($class);
|
||||
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\config;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
* Configuration container class
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_config implements ArrayAccess, IteratorAggregate, Countable
|
||||
class config implements \ArrayAccess, \IteratorAggregate, \Countable
|
||||
{
|
||||
/**
|
||||
* The configuration data
|
||||
@@ -44,7 +46,7 @@ class phpbb_config implements ArrayAccess, IteratorAggregate, Countable
|
||||
*/
|
||||
public function getIterator()
|
||||
{
|
||||
return new ArrayIterator($this->config);
|
||||
return new \ArrayIterator($this->config);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -90,7 +92,7 @@ class phpbb_config implements ArrayAccess, IteratorAggregate, Countable
|
||||
*/
|
||||
public function offsetUnset($key)
|
||||
{
|
||||
trigger_error('Config values have to be deleted explicitly with the phpbb_config::delete($key) method.', E_USER_ERROR);
|
||||
trigger_error('Config values have to be deleted explicitly with the \phpbb\config\config::delete($key) method.', E_USER_ERROR);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\config;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,17 +21,17 @@ if (!defined('IN_PHPBB'))
|
||||
* Configuration container class
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_config_db extends phpbb_config
|
||||
class db extends \phpbb\config\config
|
||||
{
|
||||
/**
|
||||
* Cache instance
|
||||
* @var phpbb_cache_driver_interface
|
||||
* @var \phpbb\cache\driver\driver_interface
|
||||
*/
|
||||
protected $cache;
|
||||
|
||||
/**
|
||||
* Database connection
|
||||
* @var phpbb_db_driver
|
||||
* @var \phpbb\db\driver\driver
|
||||
*/
|
||||
protected $db;
|
||||
|
||||
@@ -42,11 +44,11 @@ class phpbb_config_db extends phpbb_config
|
||||
/**
|
||||
* Creates a configuration container with a default set of values
|
||||
*
|
||||
* @param phpbb_db_driver $db Database connection
|
||||
* @param phpbb_cache_driver_interface $cache Cache instance
|
||||
* @param \phpbb\db\driver\driver $db Database connection
|
||||
* @param \phpbb\cache\driver\driver_interface $cache Cache instance
|
||||
* @param string $table Configuration table name
|
||||
*/
|
||||
public function __construct(phpbb_db_driver $db, phpbb_cache_driver_interface $cache, $table)
|
||||
public function __construct(\phpbb\db\driver\driver $db, \phpbb\cache\driver\driver_interface $cache, $table)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->cache = $cache;
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\config;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -17,16 +19,16 @@ if (!defined('IN_PHPBB'))
|
||||
|
||||
/**
|
||||
* Manages configuration options with an arbitrary length value stored in a TEXT
|
||||
* column. In constrast to class phpbb_config_db, values are never cached and
|
||||
* column. In constrast to class \phpbb\config\db, values are never cached and
|
||||
* prefetched, but every get operation sends a query to the database.
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_config_db_text
|
||||
class db_text
|
||||
{
|
||||
/**
|
||||
* Database connection
|
||||
* @var phpbb_db_driver
|
||||
* @var \phpbb\db\driver\driver
|
||||
*/
|
||||
protected $db;
|
||||
|
||||
@@ -37,10 +39,10 @@ class phpbb_config_db_text
|
||||
protected $table;
|
||||
|
||||
/**
|
||||
* @param phpbb_db_driver $db Database connection
|
||||
* @param \phpbb\db\driver\driver $db Database connection
|
||||
* @param string $table Table name
|
||||
*/
|
||||
public function __construct(phpbb_db_driver $db, $table)
|
||||
public function __construct(\phpbb\db\driver\driver $db, $table)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->table = $this->db->sql_escape($table);
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -20,23 +22,23 @@ if (!defined('IN_PHPBB'))
|
||||
* Handle fetching and setting the visibility for topics and posts
|
||||
* @package phpbb
|
||||
*/
|
||||
class phpbb_content_visibility
|
||||
class content_visibility
|
||||
{
|
||||
/**
|
||||
* Database object
|
||||
* @var phpbb_db_driver
|
||||
* @var \phpbb\db\driver\driver
|
||||
*/
|
||||
protected $db;
|
||||
|
||||
/**
|
||||
* User object
|
||||
* @var phpbb_user
|
||||
* @var \phpbb\user
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
/**
|
||||
* Auth object
|
||||
* @var phpbb_auth
|
||||
* @var \phpbb\auth\auth
|
||||
*/
|
||||
protected $auth;
|
||||
|
||||
@@ -55,14 +57,14 @@ class phpbb_content_visibility
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param phpbb_auth $auth Auth object
|
||||
* @param phpbb_db_driver $db Database object
|
||||
* @param phpbb_user $user User object
|
||||
* @param \phpbb\auth\auth $auth Auth object
|
||||
* @param \phpbb\db\driver\driver $db Database object
|
||||
* @param \phpbb\user $user User object
|
||||
* @param string $phpbb_root_path Root path
|
||||
* @param string $php_ext PHP Extension
|
||||
* @return null
|
||||
*/
|
||||
public function __construct(phpbb_auth $auth, phpbb_db_driver $db, phpbb_user $user, $phpbb_root_path, $php_ext, $forums_table, $posts_table, $topics_table, $users_table)
|
||||
public function __construct(\phpbb\auth\auth $auth, \phpbb\db\driver\driver $db, \phpbb\user $user, $phpbb_root_path, $php_ext, $forums_table, $posts_table, $topics_table, $users_table)
|
||||
{
|
||||
$this->auth = $auth;
|
||||
$this->db = $db;
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\controller;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,6 +21,6 @@ if (!defined('IN_PHPBB'))
|
||||
* Controller exception class
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_controller_exception extends RuntimeException
|
||||
class exception extends \RuntimeException
|
||||
{
|
||||
}
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\controller;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -21,23 +23,23 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
* Controller helper class, contains methods that do things for controllers
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_controller_helper
|
||||
class helper
|
||||
{
|
||||
/**
|
||||
* Template object
|
||||
* @var phpbb_template
|
||||
* @var \phpbb\template\template
|
||||
*/
|
||||
protected $template;
|
||||
|
||||
/**
|
||||
* User object
|
||||
* @var phpbb_user
|
||||
* @var \phpbb\user
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
/**
|
||||
* config object
|
||||
* @var phpbb_config
|
||||
* @var \phpbb\config\config
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
@@ -56,12 +58,13 @@ class phpbb_controller_helper
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param phpbb_template $template Template object
|
||||
* @param phpbb_user $user User object
|
||||
* @param \phpbb\template\template $template Template object
|
||||
* @param \phpbb\user $user User object
|
||||
* @param \phpbb\config\config $config Config object
|
||||
* @param string $phpbb_root_path phpBB root path
|
||||
* @param string $php_ext PHP extension
|
||||
*/
|
||||
public function __construct(phpbb_template $template, phpbb_user $user, phpbb_config $config, $phpbb_root_path, $php_ext)
|
||||
public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\config\config $config, $phpbb_root_path, $php_ext)
|
||||
{
|
||||
$this->template = $template;
|
||||
$this->user = $user;
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\controller;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -23,7 +25,7 @@ use Symfony\Component\Config\FileLocator;
|
||||
* Controller interface
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_controller_provider
|
||||
class provider
|
||||
{
|
||||
/**
|
||||
* YAML file(s) containing route information
|
||||
@@ -48,7 +50,7 @@ class phpbb_controller_provider
|
||||
*
|
||||
* @return The current instance of this object for method chaining
|
||||
*/
|
||||
public function import_paths_from_finder(phpbb_extension_finder $finder)
|
||||
public function import_paths_from_finder(\phpbb\extension\finder $finder)
|
||||
{
|
||||
// We hardcode the path to the core config directory
|
||||
// because the finder cannot find it
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\controller;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -23,11 +25,11 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
* Controller manager class
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_controller_resolver implements ControllerResolverInterface
|
||||
class resolver implements ControllerResolverInterface
|
||||
{
|
||||
/**
|
||||
* User object
|
||||
* @var phpbb_user
|
||||
* @var \phpbb\user
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
@@ -38,19 +40,19 @@ class phpbb_controller_resolver implements ControllerResolverInterface
|
||||
protected $container;
|
||||
|
||||
/**
|
||||
* phpbb_template object
|
||||
* @var phpbb_template
|
||||
* phpbb\template\template object
|
||||
* @var phpbb\template\template
|
||||
*/
|
||||
protected $template;
|
||||
|
||||
/**
|
||||
* Construct method
|
||||
*
|
||||
* @param phpbb_user $user User Object
|
||||
* @param \phpbb\user $user User Object
|
||||
* @param ContainerInterface $container ContainerInterface object
|
||||
* @param phpbb_template $template
|
||||
* @param \phpbb\template\template $template
|
||||
*/
|
||||
public function __construct(phpbb_user $user, ContainerInterface $container, phpbb_template $template = null)
|
||||
public function __construct(\phpbb\user $user, ContainerInterface $container, \phpbb\template\template $template = null)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->container = $container;
|
||||
@@ -62,7 +64,7 @@ class phpbb_controller_resolver implements ControllerResolverInterface
|
||||
*
|
||||
* @param Symfony\Component\HttpFoundation\Request $request Symfony Request object
|
||||
* @return bool|Callable Callable or false
|
||||
* @throws phpbb_controller_exception
|
||||
* @throws \phpbb\controller\exception
|
||||
*/
|
||||
public function getController(Request $request)
|
||||
{
|
||||
@@ -70,20 +72,20 @@ class phpbb_controller_resolver implements ControllerResolverInterface
|
||||
|
||||
if (!$controller)
|
||||
{
|
||||
throw new phpbb_controller_exception($this->user->lang['CONTROLLER_NOT_SPECIFIED']);
|
||||
throw new \phpbb\controller\exception($this->user->lang['CONTROLLER_NOT_SPECIFIED']);
|
||||
}
|
||||
|
||||
// Require a method name along with the service name
|
||||
if (stripos($controller, ':') === false)
|
||||
{
|
||||
throw new phpbb_controller_exception($this->user->lang['CONTROLLER_METHOD_NOT_SPECIFIED']);
|
||||
throw new \phpbb\controller\exception($this->user->lang['CONTROLLER_METHOD_NOT_SPECIFIED']);
|
||||
}
|
||||
|
||||
list($service, $method) = explode(':', $controller);
|
||||
|
||||
if (!$this->container->has($service))
|
||||
{
|
||||
throw new phpbb_controller_exception($this->user->lang('CONTROLLER_SERVICE_UNDEFINED', $service));
|
||||
throw new \phpbb\controller\exception($this->user->lang('CONTROLLER_SERVICE_UNDEFINED', $service));
|
||||
}
|
||||
|
||||
$controller_object = $this->container->get($service);
|
||||
@@ -93,12 +95,12 @@ class phpbb_controller_resolver implements ControllerResolverInterface
|
||||
* the style paths for the extension (the ext author can change them
|
||||
* if necessary).
|
||||
*/
|
||||
$controller_dir = explode('_', get_class($controller_object));
|
||||
$controller_dir = explode('\\', get_class($controller_object));
|
||||
|
||||
// 0 phpbb, 1 ext, 2 vendor, 3 extension name, ...
|
||||
if (!is_null($this->template) && isset($controller_dir[3]) && $controller_dir[1] === 'ext')
|
||||
// 0 vendor, 1 extension name, ...
|
||||
if (!is_null($this->template) && isset($controller_dir[1]))
|
||||
{
|
||||
$controller_style_dir = 'ext/' . $controller_dir[2] . '/' . $controller_dir[3] . '/styles';
|
||||
$controller_style_dir = 'ext/' . $controller_dir[0] . '/' . $controller_dir[1] . '/styles';
|
||||
|
||||
if (is_dir($controller_style_dir))
|
||||
{
|
||||
@@ -118,13 +120,13 @@ class phpbb_controller_resolver implements ControllerResolverInterface
|
||||
* @param Symfony\Component\HttpFoundation\Request $request Symfony Request object
|
||||
* @param mixed $controller A callable (controller class, method)
|
||||
* @return bool False
|
||||
* @throws phpbb_controller_exception
|
||||
* @throws \phpbb\controller\exception
|
||||
*/
|
||||
public function getArguments(Request $request, $controller)
|
||||
{
|
||||
// At this point, $controller contains the object and method name
|
||||
list($object, $method) = $controller;
|
||||
$mirror = new ReflectionMethod($object, $method);
|
||||
$mirror = new \ReflectionMethod($object, $method);
|
||||
|
||||
$arguments = array();
|
||||
$parameters = $mirror->getParameters();
|
||||
@@ -145,7 +147,7 @@ class phpbb_controller_resolver implements ControllerResolverInterface
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new phpbb_controller_exception($this->user->lang('CONTROLLER_ARGUMENT_VALUE_MISSING', $param->getPosition() + 1, get_class($object) . ':' . $method, $param->name));
|
||||
throw new \phpbb\controller\exception($this->user->lang('CONTROLLER_ARGUMENT_VALUE_MISSING', $param->getPosition() + 1, get_class($object) . ':' . $method, $param->name));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cron;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -22,10 +24,10 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_cron_manager
|
||||
class manager
|
||||
{
|
||||
/**
|
||||
* Set of phpbb_cron_task_wrapper objects.
|
||||
* Set of \phpbb\cron\task\wrapper objects.
|
||||
* Array holding all tasks that have been found.
|
||||
*
|
||||
* @var array
|
||||
@@ -52,7 +54,7 @@ class phpbb_cron_manager
|
||||
* Loads tasks given by name, wraps them
|
||||
* and puts them into $this->tasks.
|
||||
*
|
||||
* @param array|Traversable $tasks Array of instances of phpbb_cron_task
|
||||
* @param array|Traversable $tasks Array of instances of \phpbb\cron\task\task
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
@@ -71,7 +73,7 @@ class phpbb_cron_manager
|
||||
*
|
||||
* If no tasks are ready, null is returned.
|
||||
*
|
||||
* @return phpbb_cron_task_wrapper|null
|
||||
* @return \phpbb\cron\task\wrapper|null
|
||||
*/
|
||||
public function find_one_ready_task()
|
||||
{
|
||||
@@ -88,7 +90,7 @@ class phpbb_cron_manager
|
||||
/**
|
||||
* Finds all tasks that are ready to run.
|
||||
*
|
||||
* @return array List of tasks which are ready to run (wrapped in phpbb_cron_task_wrapper).
|
||||
* @return array List of tasks which are ready to run (wrapped in \phpbb\cron\task\wrapper).
|
||||
*/
|
||||
public function find_all_ready_tasks()
|
||||
{
|
||||
@@ -111,7 +113,7 @@ class phpbb_cron_manager
|
||||
* Web runner uses this method to resolve names to tasks.
|
||||
*
|
||||
* @param string $name Name of the task to look up.
|
||||
* @return phpbb_cron_task A task corresponding to the given name, or null.
|
||||
* @return \phpbb\cron\task\task A task corresponding to the given name, or null.
|
||||
*/
|
||||
public function find_task($name)
|
||||
{
|
||||
@@ -126,13 +128,13 @@ class phpbb_cron_manager
|
||||
}
|
||||
|
||||
/**
|
||||
* Wraps a task inside an instance of phpbb_cron_task_wrapper.
|
||||
* Wraps a task inside an instance of \phpbb\cron\task\wrapper.
|
||||
*
|
||||
* @param phpbb_cron_task $task The task.
|
||||
* @return phpbb_cron_task_wrapper The wrapped task.
|
||||
* @param \phpbb\cron\task\task $task The task.
|
||||
* @return \phpbb\cron\task\wrapper The wrapped task.
|
||||
*/
|
||||
public function wrap_task(phpbb_cron_task $task)
|
||||
public function wrap_task(\phpbb\cron\task\task $task)
|
||||
{
|
||||
return new phpbb_cron_task_wrapper($task, $this->phpbb_root_path, $this->php_ext);
|
||||
return new \phpbb\cron\task\wrapper($task, $this->phpbb_root_path, $this->php_ext);
|
||||
}
|
||||
}
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cron\task;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -26,7 +28,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
abstract class phpbb_cron_task_base implements phpbb_cron_task
|
||||
abstract class base implements \phpbb\cron\task\task
|
||||
{
|
||||
private $name;
|
||||
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cron\task\core;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -24,7 +26,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_cron_task_core_prune_all_forums extends phpbb_cron_task_base
|
||||
class prune_all_forums extends \phpbb\cron\task\base
|
||||
{
|
||||
protected $phpbb_root_path;
|
||||
protected $php_ext;
|
||||
@@ -36,10 +38,10 @@ class phpbb_cron_task_core_prune_all_forums extends phpbb_cron_task_base
|
||||
*
|
||||
* @param string $phpbb_root_path The root path
|
||||
* @param string $php_ext The PHP extension
|
||||
* @param phpbb_config $config The config
|
||||
* @param phpbb_db_driver $db The db connection
|
||||
* @param \phpbb\config\config $config The config
|
||||
* @param \phpbb\db\driver\driver $db The db connection
|
||||
*/
|
||||
public function __construct($phpbb_root_path, $php_ext, phpbb_config $config, phpbb_db_driver $db)
|
||||
public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config, \phpbb\db\driver\driver $db)
|
||||
{
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cron\task\core;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -24,7 +26,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_cron_task_core_prune_forum extends phpbb_cron_task_base implements phpbb_cron_task_parametrized
|
||||
class prune_forum extends \phpbb\cron\task\base implements \phpbb\cron\task\parametrized
|
||||
{
|
||||
protected $phpbb_root_path;
|
||||
protected $php_ext;
|
||||
@@ -46,10 +48,10 @@ class phpbb_cron_task_core_prune_forum extends phpbb_cron_task_base implements p
|
||||
*
|
||||
* @param string $phpbb_root_path The root path
|
||||
* @param string $php_ext The PHP extension
|
||||
* @param phpbb_config $config The config
|
||||
* @param phpbb_db_driver $db The db connection
|
||||
* @param \phpbb\config\config $config The config
|
||||
* @param \phpbb\db\driver\driver $db The db connection
|
||||
*/
|
||||
public function __construct($phpbb_root_path, $php_ext, phpbb_config $config, phpbb_db_driver $db)
|
||||
public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config, \phpbb\db\driver\driver $db)
|
||||
{
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
@@ -132,15 +134,15 @@ class phpbb_cron_task_core_prune_forum extends phpbb_cron_task_base implements p
|
||||
|
||||
/**
|
||||
* Parses parameters found in $request, which is an instance of
|
||||
* phpbb_request_interface.
|
||||
* \phpbb\request\request_interface.
|
||||
*
|
||||
* It is expected to have a key f whose value is id of the forum to be pruned.
|
||||
*
|
||||
* @param phpbb_request_interface $request Request object.
|
||||
* @param \phpbb\request\request_interface $request Request object.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
public function parse_parameters(phpbb_request_interface $request)
|
||||
public function parse_parameters(\phpbb\request\request_interface $request)
|
||||
{
|
||||
$this->forum_data = null;
|
||||
if ($request->is_set('f'))
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cron\task\core;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_cron_task_core_queue extends phpbb_cron_task_base
|
||||
class queue extends \phpbb\cron\task\base
|
||||
{
|
||||
protected $phpbb_root_path;
|
||||
protected $php_ext;
|
||||
@@ -31,9 +33,9 @@ class phpbb_cron_task_core_queue extends phpbb_cron_task_base
|
||||
*
|
||||
* @param string $phpbb_root_path The root path
|
||||
* @param string $php_ext The PHP extension
|
||||
* @param phpbb_config $config The config
|
||||
* @param \phpbb\config\config $config The config
|
||||
*/
|
||||
public function __construct($phpbb_root_path, $php_ext, phpbb_config $config)
|
||||
public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config)
|
||||
{
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
@@ -51,7 +53,7 @@ class phpbb_cron_task_core_queue extends phpbb_cron_task_base
|
||||
{
|
||||
include($this->phpbb_root_path . 'includes/functions_messenger.' . $this->php_ext);
|
||||
}
|
||||
$queue = new queue();
|
||||
$queue = new \queue();
|
||||
$queue->process();
|
||||
}
|
||||
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cron\task\core;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_cron_task_core_tidy_cache extends phpbb_cron_task_base
|
||||
class tidy_cache extends \phpbb\cron\task\base
|
||||
{
|
||||
protected $config;
|
||||
protected $cache;
|
||||
@@ -28,10 +30,10 @@ class phpbb_cron_task_core_tidy_cache extends phpbb_cron_task_base
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param phpbb_config $config The config
|
||||
* @param phpbb_cache_driver_interface $cache The cache driver
|
||||
* @param \phpbb\config\config $config The config
|
||||
* @param \phpbb\cache\driver\driver_interface $cache The cache driver
|
||||
*/
|
||||
public function __construct(phpbb_config $config, phpbb_cache_driver_interface $cache)
|
||||
public function __construct(\phpbb\config\config $config, \phpbb\cache\driver\driver_interface $cache)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->cache = $cache;
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cron\task\core;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_cron_task_core_tidy_database extends phpbb_cron_task_base
|
||||
class tidy_database extends \phpbb\cron\task\base
|
||||
{
|
||||
protected $phpbb_root_path;
|
||||
protected $php_ext;
|
||||
@@ -31,9 +33,9 @@ class phpbb_cron_task_core_tidy_database extends phpbb_cron_task_base
|
||||
*
|
||||
* @param string $phpbb_root_path The root path
|
||||
* @param string $php_ext The PHP extension
|
||||
* @param phpbb_config $config The config
|
||||
* @param \phpbb\config\config $config The config
|
||||
*/
|
||||
public function __construct($phpbb_root_path, $php_ext, phpbb_config $config)
|
||||
public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config)
|
||||
{
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cron\task\core;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -22,7 +24,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_cron_task_core_tidy_search extends phpbb_cron_task_base
|
||||
class tidy_search extends \phpbb\cron\task\base
|
||||
{
|
||||
protected $phpbb_root_path;
|
||||
protected $php_ext;
|
||||
@@ -36,12 +38,12 @@ class phpbb_cron_task_core_tidy_search extends phpbb_cron_task_base
|
||||
*
|
||||
* @param string $phpbb_root_path The root path
|
||||
* @param string $php_ext The PHP extension
|
||||
* @param phpbb_auth $auth The auth
|
||||
* @param phpbb_config $config The config
|
||||
* @param phpbb_db_driver $db The db connection
|
||||
* @param phpbb_user $user The user
|
||||
* @param \phpbb\auth\auth $auth The auth
|
||||
* @param \phpbb\config\config $config The config
|
||||
* @param \phpbb\db\driver\driver $db The db connection
|
||||
* @param \phpbb\user $user The user
|
||||
*/
|
||||
public function __construct($phpbb_root_path, $php_ext, phpbb_auth $auth, phpbb_config $config, phpbb_db_driver $db, phpbb_user $user)
|
||||
public function __construct($phpbb_root_path, $php_ext, \phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\db\driver\driver $db, \phpbb\user $user)
|
||||
{
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cron\task\core;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_cron_task_core_tidy_sessions extends phpbb_cron_task_base
|
||||
class tidy_sessions extends \phpbb\cron\task\base
|
||||
{
|
||||
protected $config;
|
||||
protected $user;
|
||||
@@ -28,10 +30,10 @@ class phpbb_cron_task_core_tidy_sessions extends phpbb_cron_task_base
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param phpbb_config $config The config
|
||||
* @param phpbb_user $user The user
|
||||
* @param \phpbb\config\config $config The config
|
||||
* @param \phpbb\user $user The user
|
||||
*/
|
||||
public function __construct(phpbb_config $config, phpbb_user $user)
|
||||
public function __construct(\phpbb\config\config $config, \phpbb\user $user)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->user = $user;
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cron\task\core;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -22,7 +24,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_cron_task_core_tidy_warnings extends phpbb_cron_task_base
|
||||
class tidy_warnings extends \phpbb\cron\task\base
|
||||
{
|
||||
protected $phpbb_root_path;
|
||||
protected $php_ext;
|
||||
@@ -33,9 +35,9 @@ class phpbb_cron_task_core_tidy_warnings extends phpbb_cron_task_base
|
||||
*
|
||||
* @param string $phpbb_root_path The root path
|
||||
* @param string $php_ext The PHP extension
|
||||
* @param phpbb_config $config The config
|
||||
* @param \phpbb\config\config $config The config
|
||||
*/
|
||||
public function __construct($phpbb_root_path, $php_ext, phpbb_config $config)
|
||||
public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config)
|
||||
{
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cron\task;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -26,7 +28,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
interface phpbb_cron_task_parametrized extends phpbb_cron_task
|
||||
interface parametrized extends \phpbb\cron\task\task
|
||||
{
|
||||
/**
|
||||
* Returns parameters of this cron task as an array.
|
||||
@@ -39,14 +41,14 @@ interface phpbb_cron_task_parametrized extends phpbb_cron_task
|
||||
|
||||
/**
|
||||
* Parses parameters found in $request, which is an instance of
|
||||
* phpbb_request_interface.
|
||||
* \phpbb\request\request_interface.
|
||||
*
|
||||
* $request contains user input and must not be trusted.
|
||||
* Cron task must validate all data before using it.
|
||||
*
|
||||
* @param phpbb_request_interface $request Request object.
|
||||
* @param \phpbb\request\request_interface $request Request object.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
public function parse_parameters(phpbb_request_interface $request);
|
||||
public function parse_parameters(\phpbb\request\request_interface $request);
|
||||
}
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cron\task;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
* Cron task interface
|
||||
* @package phpBB3
|
||||
*/
|
||||
interface phpbb_cron_task
|
||||
interface task
|
||||
{
|
||||
/**
|
||||
* Returns the name of the task.
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\cron\task;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -21,7 +23,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_cron_task_wrapper
|
||||
class wrapper
|
||||
{
|
||||
protected $task;
|
||||
protected $phpbb_root_path;
|
||||
@@ -32,9 +34,9 @@ class phpbb_cron_task_wrapper
|
||||
*
|
||||
* Wraps a task $task, which must implement cron_task interface.
|
||||
*
|
||||
* @param phpbb_cron_task $task The cron task to wrap.
|
||||
* @param \phpbb\cron\task\task $task The cron task to wrap.
|
||||
*/
|
||||
public function __construct(phpbb_cron_task $task, $phpbb_root_path, $php_ext)
|
||||
public function __construct(\phpbb\cron\task\task $task, $phpbb_root_path, $php_ext)
|
||||
{
|
||||
$this->task = $task;
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
@@ -51,7 +53,7 @@ class phpbb_cron_task_wrapper
|
||||
*/
|
||||
public function is_parametrized()
|
||||
{
|
||||
return $this->task instanceof phpbb_cron_task_parametrized;
|
||||
return $this->task instanceof \phpbb\cron\task\parametrized;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -6,11 +6,13 @@
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*/
|
||||
|
||||
namespace phpbb;
|
||||
|
||||
/**
|
||||
* phpBB custom extensions to the PHP DateTime class
|
||||
* This handles the relative formats phpBB employs
|
||||
*/
|
||||
class phpbb_datetime extends DateTime
|
||||
class datetime extends \DateTime
|
||||
{
|
||||
/**
|
||||
* String used to wrap the date segment which should be replaced by today/tomorrow/yesterday
|
||||
@@ -28,14 +30,14 @@ class phpbb_datetime extends DateTime
|
||||
static protected $format_cache = array();
|
||||
|
||||
/**
|
||||
* Constructs a new instance of phpbb_datetime, expanded to include an argument to inject
|
||||
* Constructs a new instance of \phpbb\datetime, expanded to include an argument to inject
|
||||
* the user context and modify the timezone to the users selected timezone if one is not set.
|
||||
*
|
||||
* @param string $time String in a format accepted by strtotime().
|
||||
* @param DateTimeZone $timezone Time zone of the time.
|
||||
* @param user User object for context.
|
||||
*/
|
||||
public function __construct($user, $time = 'now', DateTimeZone $timezone = null)
|
||||
public function __construct($user, $time = 'now', \DateTimeZone $timezone = null)
|
||||
{
|
||||
$this->user = $user;
|
||||
$timezone = $timezone ?: $this->user->timezone;
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
* Database Abstraction Layer
|
||||
* @package dbal
|
||||
*/
|
||||
class phpbb_db_driver
|
||||
class driver
|
||||
{
|
||||
var $db_connect_id;
|
||||
var $query_result;
|
||||
@@ -82,7 +84,7 @@ class phpbb_db_driver
|
||||
|
||||
// Fill default sql layer based on the class being called.
|
||||
// This can be changed by the specified layer itself later if needed.
|
||||
$this->sql_layer = substr(get_class($this), strlen('phpbb_db_driver_'));
|
||||
$this->sql_layer = substr(get_class($this), strlen('phpbb\db\driver\\'));
|
||||
|
||||
// Do not change this please! This variable is used to easy the use of it - and is hardcoded.
|
||||
$this->any_char = chr(0) . '%';
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
|
||||
* Minimum Requirement is Firebird 2.1
|
||||
* @package dbal
|
||||
*/
|
||||
class phpbb_db_driver_firebird extends phpbb_db_driver
|
||||
class firebird extends \phpbb\db\driver\driver
|
||||
{
|
||||
var $last_query_text = '';
|
||||
var $service_handle = false;
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
|
||||
* Minimum Requirement is MSSQL 2000+
|
||||
* @package dbal
|
||||
*/
|
||||
class phpbb_db_driver_mssql extends phpbb_db_driver
|
||||
class mssql extends \phpbb\db\driver\driver
|
||||
{
|
||||
var $connect_error = '';
|
||||
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
* MSSQL Database Base Abstraction Layer
|
||||
* @package dbal
|
||||
*/
|
||||
abstract class phpbb_db_driver_mssql_base extends phpbb_db_driver
|
||||
abstract class mssql_base extends \phpbb\db\driver\driver
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -26,7 +28,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package dbal
|
||||
*/
|
||||
class phpbb_db_driver_mssql_odbc extends phpbb_db_driver_mssql_base
|
||||
class mssql_odbc extends \phpbb\db\driver\mssql_base
|
||||
{
|
||||
var $last_query_text = '';
|
||||
var $connect_error = '';
|
||||
|
@@ -11,6 +11,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -56,7 +58,7 @@ class result_mssqlnative
|
||||
{
|
||||
if (is_array($value))
|
||||
{
|
||||
$obj->$key = new stdClass();
|
||||
$obj->$key = new \stdClass();
|
||||
array_to_obj($value, $obj->$key);
|
||||
}
|
||||
else
|
||||
@@ -191,7 +193,7 @@ class result_mssqlnative
|
||||
/**
|
||||
* @package dbal
|
||||
*/
|
||||
class phpbb_db_driver_mssqlnative extends phpbb_db_driver_mssql_base
|
||||
class mssqlnative extends \phpbb\db\driver\mssql_base
|
||||
{
|
||||
var $m_insert_id = NULL;
|
||||
var $last_query_text = '';
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -24,7 +26,7 @@ if (!defined('IN_PHPBB'))
|
||||
* MySQL 5.0+
|
||||
* @package dbal
|
||||
*/
|
||||
class phpbb_db_driver_mysql extends phpbb_db_driver_mysql_base
|
||||
class mysql extends \phpbb\db\driver\mysql_base
|
||||
{
|
||||
var $multi_insert = true;
|
||||
var $connect_error = '';
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
* Abstract MySQL Database Base Abstraction Layer
|
||||
* @package dbal
|
||||
*/
|
||||
abstract class phpbb_db_driver_mysql_base extends phpbb_db_driver
|
||||
abstract class mysql_base extends \phpbb\db\driver\driver
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -21,7 +23,7 @@ if (!defined('IN_PHPBB'))
|
||||
* MySQL 4.1+ or MySQL 5.0+
|
||||
* @package dbal
|
||||
*/
|
||||
class phpbb_db_driver_mysqli extends phpbb_db_driver_mysql_base
|
||||
class mysqli extends \phpbb\db\driver\mysql_base
|
||||
{
|
||||
var $multi_insert = true;
|
||||
var $connect_error = '';
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
* Oracle Database Abstraction Layer
|
||||
* @package dbal
|
||||
*/
|
||||
class phpbb_db_driver_oracle extends phpbb_db_driver
|
||||
class oracle extends \phpbb\db\driver\driver
|
||||
{
|
||||
var $last_query_text = '';
|
||||
var $connect_error = '';
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
|
||||
* Minimum Requirement is Version 7.3+
|
||||
* @package dbal
|
||||
*/
|
||||
class phpbb_db_driver_postgres extends phpbb_db_driver
|
||||
class postgres extends \phpbb\db\driver\driver
|
||||
{
|
||||
var $last_query_text = '';
|
||||
var $connect_error = '';
|
||||
@@ -84,7 +86,7 @@ class phpbb_db_driver_postgres extends phpbb_db_driver
|
||||
$this->connect_error = 'pg_pconnect function does not exist, is pgsql extension installed?';
|
||||
return $this->sql_error('');
|
||||
}
|
||||
$collector = new phpbb_error_collector;
|
||||
$collector = new \phpbb\error_collector;
|
||||
$collector->install();
|
||||
$this->db_connect_id = (!$new_link) ? @pg_pconnect($connect_string) : @pg_pconnect($connect_string, PGSQL_CONNECT_FORCE_NEW);
|
||||
}
|
||||
@@ -95,7 +97,7 @@ class phpbb_db_driver_postgres extends phpbb_db_driver
|
||||
$this->connect_error = 'pg_connect function does not exist, is pgsql extension installed?';
|
||||
return $this->sql_error('');
|
||||
}
|
||||
$collector = new phpbb_error_collector;
|
||||
$collector = new \phpbb\error_collector;
|
||||
$collector->install();
|
||||
$this->db_connect_id = (!$new_link) ? @pg_connect($connect_string) : @pg_connect($connect_string, PGSQL_CONNECT_FORCE_NEW);
|
||||
}
|
||||
|
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\driver;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
|
||||
* Minimum Requirement: 2.8.2+
|
||||
* @package dbal
|
||||
*/
|
||||
class phpbb_db_driver_sqlite extends phpbb_db_driver
|
||||
class sqlite extends \phpbb\db\driver\driver
|
||||
{
|
||||
var $connect_error = '';
|
||||
|
||||
|
@@ -7,11 +7,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_local_url_bbcode extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class local_url_bbcode extends \phpbb\db\migration\migration
|
||||
{
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_12_rc1');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_12_rc1');
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
@@ -44,7 +46,7 @@ class phpbb_db_migration_data_30x_local_url_bbcode extends phpbb_db_migration
|
||||
$bbcode_match = $row['bbcode_match'];
|
||||
$bbcode_tpl = $row['bbcode_tpl'];
|
||||
|
||||
$acp_bbcodes = new acp_bbcodes();
|
||||
$acp_bbcodes = new \acp_bbcodes();
|
||||
$sql_ary = $acp_bbcodes->build_regexp($bbcode_match, $bbcode_tpl);
|
||||
|
||||
$sql = 'UPDATE ' . BBCODES_TABLE . '
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_1 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_1 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_1 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_1_rc1');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_1_rc1');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_10 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_10 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_10 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_10_rc3');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_10_rc3');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_10_rc1 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_10_rc1 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_10_rc1 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_9');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_9');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_10_rc2 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_10_rc2 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_10_rc2 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_10_rc1');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_10_rc1');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_10_rc3 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_10_rc3 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_10_rc3 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_10_rc2');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_10_rc2');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_11 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_11 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_11 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_11_rc2');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_11_rc2');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_11_rc1 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_11_rc1 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_11_rc1 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_10');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_10');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_11_rc2 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_11_rc2 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_11_rc2 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_11_rc1');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_11_rc1');
|
||||
}
|
||||
|
||||
public function update_schema()
|
@@ -7,18 +7,20 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
/** @todo DROP LOGIN_ATTEMPT_TABLE.attempt_id in 3.0.12-RC1 **/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_12_rc1 extends phpbb_db_migration
|
||||
class release_3_0_12_rc1 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
return phpbb_version_compare($this->config['version'], '3.0.12-RC1', '>=');
|
||||
}
|
||||
|
||||
static public function depends_on()
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_11');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_11');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_1_rc1 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_1_rc1 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_2 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_2 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_2 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_2_rc2');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_2_rc2');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_2_rc1 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_2_rc1 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_2_rc1 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_1');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_1');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_2_rc2 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_2_rc2 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_2_rc2 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_2_rc1');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_2_rc1');
|
||||
}
|
||||
|
||||
public function update_schema()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_3 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_3 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_3 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_3_rc1');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_3_rc1');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_3_rc1 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_3_rc1 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_3_rc1 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_2');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_2');
|
||||
}
|
||||
|
||||
public function update_schema()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_4 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_4 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_4 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_4_rc1');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_4_rc1');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_4_rc1 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_4_rc1 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_4_rc1 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_3');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_3');
|
||||
}
|
||||
|
||||
public function update_schema()
|
||||
@@ -82,7 +84,7 @@ class phpbb_db_migration_data_30x_3_0_4_rc1 extends phpbb_db_migration
|
||||
|
||||
public function update_custom_profile_fields()
|
||||
{
|
||||
// Update the Custom Profile Fields based on previous settings to the new format
|
||||
// Update the Custom Profile Fields based on previous settings to the new \format
|
||||
$sql = 'SELECT field_id, field_required, field_show_on_reg, field_hide
|
||||
FROM ' . PROFILE_FIELDS_TABLE;
|
||||
$result = $this->db->sql_query($sql);
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_5 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_5 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_5 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_5_rc1part2');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_5_rc1part2');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_5_rc1 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_5_rc1 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_5_rc1 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_4');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_4');
|
||||
}
|
||||
|
||||
public function update_schema()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_5_rc1part2 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_5_rc1part2 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_5_rc1part2 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_5_rc1');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_5_rc1');
|
||||
}
|
||||
|
||||
public function update_schema()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_6 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_6 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_6 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_6_rc4');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_6_rc4');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_6_rc1 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_6_rc1 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc1 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_5');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_5');
|
||||
}
|
||||
|
||||
public function update_schema()
|
||||
@@ -318,7 +320,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc1 extends phpbb_db_migration
|
||||
|
||||
// Clear permissions...
|
||||
include_once($this->phpbb_root_path . 'includes/acp/auth.' . $this->php_ext);
|
||||
$auth_admin = new auth_admin();
|
||||
$auth_admin = new \auth_admin();
|
||||
$auth_admin->acl_clear_prefetch();
|
||||
}
|
||||
}
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_6_rc2 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_6_rc2 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc2 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_6_rc1');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_6_rc1');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_6_rc3 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_6_rc3 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc3 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_6_rc2');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_6_rc2');
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
@@ -30,7 +32,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc3 extends phpbb_db_migration
|
||||
|
||||
public function update_cp_fields()
|
||||
{
|
||||
// Update the Custom Profile Fields based on previous settings to the new format
|
||||
// Update the Custom Profile Fields based on previous settings to the new \format
|
||||
$sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . '
|
||||
SET field_show_on_vt = 1
|
||||
WHERE field_hide = 0
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_6_rc4 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_6_rc4 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc4 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_6_rc3');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_6_rc3');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_7 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_7 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_7 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_7_rc2');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_7_rc2');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_7_pl1 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_7_pl1 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_7_pl1 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_7');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_7');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_7_rc1 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_7_rc1 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_7_rc1 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_6');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_6');
|
||||
}
|
||||
|
||||
public function update_schema()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_7_rc2 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_7_rc2 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_7_rc2 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_7_rc1');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_7_rc1');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_8 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_8 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_8 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_8_rc1');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_8_rc1');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_8_rc1 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_8_rc1 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_8_rc1 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_7_pl1');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_7_pl1');
|
||||
}
|
||||
|
||||
public function update_data()
|
@@ -7,7 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_30x_3_0_9 extends phpbb_db_migration
|
||||
namespace phpbb\db\migration\data\v30x;
|
||||
|
||||
class release_3_0_9 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_30x_3_0_9 extends phpbb_db_migration
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_9_rc4');
|
||||
return array('\phpbb\db\migration\data\v30x\release_3_0_9_rc4');
|
||||
}
|
||||
|
||||
public function update_data()
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user