mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge branch 'develop' of github.com:phpbb/phpbb3 into ticket/11373
# By Joseph Warner (188) and others # Via Andreas Fischer (41) and others * 'develop' of github.com:phpbb/phpbb3: (435 commits) [ticket/11745] Correct language, coding guidelines [ticket/11828] Fix greedy operators in lexer [ticket/11835] Fix ucp_auth_link adding in migration [prep-release-3.0.12] Remove changelog entry for ticket that was not resolved. [ticket/develop/11832] Fix path detection [ticket/11833] Prevent Twig errors from invalid template loops using BEGINELSE [ticket/11833] Fix bad template loop [feature/oauth] Fix tabindex [ticket/11816] !$DOESNT_EXIST test [ticket/9550] Add the core.viewtopic_post_rowset_data event to viewtopic.php [ticket/11829] Use report_closed to determine status in MCP report_details [ticket/11825] Move schema_data.php into includes/ instead of phpbb/ [ticket/11215] Remove unnecessary comment [ticket/11755] MySQL upgrader out of date [prep-release-3.0.12] Update Changelog for 3.0.12-RC3 release. [prep-release-3.0.12] Bumping version number for 3.0.12-RC3. [ticket/11823] Set up nginx server to match PHP files with characters after .php [ticket/11812] Fix empty define [ticket/11818] Update Symfony dependencies to 2.3.* [feature/oauth] Fix bug on ucp_auth_link related to error display ...
This commit is contained in:
commit
f723491527
263 changed files with 7406 additions and 5522 deletions
|
@ -121,6 +121,7 @@ if (sizeof($package->old_packages))
|
||||||
|
|
||||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/docs ' . $dest_filename_dir);
|
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/docs ' . $dest_filename_dir);
|
||||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/install ' . $dest_filename_dir);
|
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/install ' . $dest_filename_dir);
|
||||||
|
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/vendor ' . $dest_filename_dir);
|
||||||
|
|
||||||
$package->run_command('mkdir ' . $dest_filename_dir . '/install/update');
|
$package->run_command('mkdir ' . $dest_filename_dir . '/install/update');
|
||||||
$package->run_command('mkdir ' . $dest_filename_dir . '/install/update/old');
|
$package->run_command('mkdir ' . $dest_filename_dir . '/install/update/old');
|
||||||
|
@ -256,6 +257,7 @@ $update_info = array(
|
||||||
// Copy the install files to their respective locations
|
// Copy the install files to their respective locations
|
||||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/docs ' . $package->get('patch_directory'));
|
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/docs ' . $package->get('patch_directory'));
|
||||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/install ' . $package->get('patch_directory'));
|
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/install ' . $package->get('patch_directory'));
|
||||||
|
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/vendor ' . $package->get('patch_directory'));
|
||||||
|
|
||||||
// Remove some files
|
// Remove some files
|
||||||
chdir($package->get('patch_directory') . '/install');
|
chdir($package->get('patch_directory') . '/install');
|
||||||
|
|
|
@ -1,12 +1,30 @@
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine on
|
||||||
|
|
||||||
#
|
#
|
||||||
# Uncomment the statement below if you want to make use of
|
# Uncomment the statement below if you want to make use of
|
||||||
# HTTP authentication and it does not already work.
|
# HTTP authentication and it does not already work.
|
||||||
# This could be required if you are for example using PHP via Apache CGI.
|
# This could be required if you are for example using PHP via Apache CGI.
|
||||||
#
|
#
|
||||||
#<IfModule mod_rewrite.c>
|
|
||||||
#RewriteEngine on
|
|
||||||
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
|
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
|
||||||
#</IfModule>
|
|
||||||
|
#
|
||||||
|
# The following 3 lines will rewrite URLs passed through the front controller
|
||||||
|
# to not require app.php in the actual URL. In other words, a controller is
|
||||||
|
# by default accessed at /app.php/my/controller, but can also be accessed at
|
||||||
|
# /my/controller
|
||||||
|
#
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule ^(.*)$ app.php [QSA,L]
|
||||||
|
|
||||||
|
#
|
||||||
|
# If symbolic links are not already being followed,
|
||||||
|
# uncomment the line below.
|
||||||
|
# http://anothersysadmin.wordpress.com/2008/06/10/mod_rewrite-forbidden-403-with-apache-228/
|
||||||
|
#
|
||||||
|
#Options +FollowSymLinks
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
<Files "config.php">
|
<Files "config.php">
|
||||||
Order Allow,Deny
|
Order Allow,Deny
|
||||||
|
|
|
@ -50,7 +50,7 @@ $module_id = request_var('i', '');
|
||||||
$mode = request_var('mode', '');
|
$mode = request_var('mode', '');
|
||||||
|
|
||||||
// Set custom style for admin area
|
// Set custom style for admin area
|
||||||
$phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', array(), '');
|
$template->set_custom_style('adm', $phpbb_admin_path . 'style');
|
||||||
$template->assign_var('T_ASSETS_PATH', $phpbb_root_path . 'assets');
|
$template->assign_var('T_ASSETS_PATH', $phpbb_root_path . 'assets');
|
||||||
$template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');
|
$template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');
|
||||||
|
|
||||||
|
|
17
phpBB/adm/style/auth_provider_oauth.html
Normal file
17
phpBB/adm/style/auth_provider_oauth.html
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<h2>{L_AUTH_PROVIDER_OAUTH_TITLE}</h2>
|
||||||
|
|
||||||
|
<p>{L_AUTH_PROVIDER_OAUTH_EXPLAIN}</p>
|
||||||
|
|
||||||
|
<!-- BEGIN oauth_services -->
|
||||||
|
<fieldset>
|
||||||
|
<legend>{oauth_services.ACTUAL_NAME}</legend>
|
||||||
|
<dl>
|
||||||
|
<dt><label for="oauth_service_{oauth_services.NAME}_key">{L_AUTH_PROVIDER_OAUTH_KEY}{L_COLON}</label></dt>
|
||||||
|
<dd><input type="text" id="oauth_service_{oauth_services.NAME}_key" size="40" name="config[auth_oauth_{oauth_services.NAME}_key]" value="{oauth_services.KEY}" /></dd>
|
||||||
|
</dl>
|
||||||
|
<dl>
|
||||||
|
<dt><label for="oauth_service_{oauth_services.NAME}_secret">{L_AUTH_PROVIDER_OAUTH_SECRET}{L_COLON}</label></dt>
|
||||||
|
<dd><input type="text" id="oauth_service_{oauth_services.NAME}_secret" size="40" name="config[auth_oauth_{oauth_services.NAME}_secret]" value="{oauth_services.SECRET}" /></dd>
|
||||||
|
</dl>
|
||||||
|
</fieldset>
|
||||||
|
<!-- END oauth_services -->
|
|
@ -109,27 +109,14 @@
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<!-- IF not S_UP_TO_DATE -->
|
|
||||||
|
|
||||||
<form id="install_dbupdate" method="post" action="{U_DB_UPDATE_ACTION}">
|
|
||||||
|
|
||||||
<fieldset class="submit-buttons">
|
|
||||||
<p>{L_UPDATE_DATABASE_EXPLAIN}</p>
|
|
||||||
<input class="button1" type="submit" name="db_update" value="{L_UPDATE_DATABASE}" />
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<!-- ELSE -->
|
|
||||||
<form id="install_update" method="post" action="{U_ACTION}">
|
<form id="install_update" method="post" action="{U_ACTION}">
|
||||||
|
|
||||||
<fieldset class="submit-buttons">
|
<fieldset class="submit-buttons">
|
||||||
<p>{L_CHECK_FILES_UP_TO_DATE}</p>
|
<p>{L_CHECK_FILES_EXPLAIN}</p>
|
||||||
<input class="button1" type="submit" name="submit" value="{L_CHECK_FILES}" />
|
<input class="button1" type="submit" name="submit" value="{L_CHECK_FILES}" />
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
<!-- ENDIF -->
|
|
||||||
|
|
||||||
<!-- ELSEIF S_DB_UPDATE -->
|
<!-- ELSEIF S_DB_UPDATE -->
|
||||||
|
|
||||||
|
@ -155,18 +142,10 @@
|
||||||
|
|
||||||
<!-- ELSE -->
|
<!-- ELSE -->
|
||||||
|
|
||||||
<h1>{L_UPDATE_DB_SUCCESS}</h1>
|
<div class="successbox">
|
||||||
|
<h3>{L_UPDATE_SUCCESS}</h3>
|
||||||
<br /><br />
|
<p>{L_EVERYTHING_UP_TO_DATE}</p>
|
||||||
|
</div>
|
||||||
<form id="install_update" method="post" action="{U_ACTION}">
|
|
||||||
|
|
||||||
<fieldset class="submit-buttons">
|
|
||||||
<p>{L_CHECK_FILES_EXPLAIN}</p>
|
|
||||||
<input class="button1" type="submit" name="submit" value="{L_CHECK_FILES}" />
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
@ -174,10 +153,18 @@
|
||||||
|
|
||||||
<!-- IF S_ALL_UP_TO_DATE -->
|
<!-- IF S_ALL_UP_TO_DATE -->
|
||||||
|
|
||||||
<div class="successbox">
|
<h1>{L_UPDATE_FILE_SUCCESS}</h1>
|
||||||
<h3>{L_UPDATE_SUCCESS}</h3>
|
|
||||||
<p>{L_ALL_FILES_UP_TO_DATE}</p>
|
<p>{L_ALL_FILES_UP_TO_DATE}</p>
|
||||||
</div>
|
|
||||||
|
<p>{L_UPDATE_DATABASE_EXPLAIN}</p>
|
||||||
|
|
||||||
|
<form id="install_dbupdate" method="post" action="{U_DB_UPDATE_ACTION}">
|
||||||
|
|
||||||
|
<fieldset class="submit-buttons">
|
||||||
|
<input class="button1" type="submit" name="db_update" value="{L_UPDATE_DATABASE}" />
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
<!-- ELSE -->
|
<!-- ELSE -->
|
||||||
<h1>{L_COLLECTED_INFORMATION}</h1>
|
<h1>{L_COLLECTED_INFORMATION}</h1>
|
||||||
|
|
|
@ -22,7 +22,7 @@ $auth->acl($user->data);
|
||||||
$user->setup();
|
$user->setup();
|
||||||
|
|
||||||
// Set custom template for admin area
|
// Set custom template for admin area
|
||||||
$phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', array(), '');
|
$template->set_custom_style('adm', $phpbb_admin_path . 'style');
|
||||||
|
|
||||||
$template->set_filenames(array(
|
$template->set_filenames(array(
|
||||||
'body' => 'colour_swatch.html')
|
'body' => 'colour_swatch.html')
|
||||||
|
|
|
@ -24,7 +24,6 @@ $user->session_begin();
|
||||||
$auth->acl($user->data);
|
$auth->acl($user->data);
|
||||||
$user->setup('app');
|
$user->setup('app');
|
||||||
|
|
||||||
$symfony_request = phpbb_create_symfony_request($request);
|
|
||||||
$http_kernel = $phpbb_container->get('http_kernel');
|
$http_kernel = $phpbb_container->get('http_kernel');
|
||||||
$response = $http_kernel->handle($symfony_request);
|
$response = $http_kernel->handle($symfony_request);
|
||||||
$response->send();
|
$response->send();
|
||||||
|
|
|
@ -109,6 +109,9 @@ $db = $phpbb_container->get('dbal.conn');
|
||||||
// make sure request_var uses this request instance
|
// make sure request_var uses this request instance
|
||||||
request_var('', 0, false, false, $request); // "dependency injection" for a function
|
request_var('', 0, false, false, $request); // "dependency injection" for a function
|
||||||
|
|
||||||
|
// Create a Symfony Request object from our phpbb_request object
|
||||||
|
$symfony_request = phpbb_create_symfony_request($request);
|
||||||
|
|
||||||
// Grab global variables, re-cache if necessary
|
// Grab global variables, re-cache if necessary
|
||||||
$config = $phpbb_container->get('config');
|
$config = $phpbb_container->get('config');
|
||||||
set_config(null, null, null, $config);
|
set_config(null, null, null, $config);
|
||||||
|
@ -121,7 +124,6 @@ $phpbb_extension_manager = $phpbb_container->get('ext.manager');
|
||||||
$phpbb_subscriber_loader = $phpbb_container->get('event.subscriber_loader');
|
$phpbb_subscriber_loader = $phpbb_container->get('event.subscriber_loader');
|
||||||
|
|
||||||
$template = $phpbb_container->get('template');
|
$template = $phpbb_container->get('template');
|
||||||
$phpbb_style = $phpbb_container->get('style');
|
|
||||||
|
|
||||||
// Add own hook handler
|
// Add own hook handler
|
||||||
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
|
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
{
|
{
|
||||||
"minimum-stability": "beta",
|
"minimum-stability": "beta",
|
||||||
"require": {
|
"require": {
|
||||||
"symfony/config": "2.1.*",
|
"lusitanian/oauth": "0.2.*",
|
||||||
"symfony/dependency-injection": "2.1.*",
|
"symfony/config": "2.3.*",
|
||||||
"symfony/event-dispatcher": "2.1.*",
|
"symfony/dependency-injection": "2.3.*",
|
||||||
"symfony/http-kernel": "2.1.*",
|
"symfony/event-dispatcher": "2.3.*",
|
||||||
"symfony/routing": "2.1.*",
|
"symfony/http-kernel": "2.3.*",
|
||||||
"symfony/yaml": "2.1.*",
|
"symfony/routing": "2.3.*",
|
||||||
|
"symfony/yaml": "2.3.*",
|
||||||
"twig/twig": "1.13.*"
|
"twig/twig": "1.13.*"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
|
512
phpBB/composer.lock
generated
512
phpBB/composer.lock
generated
|
@ -3,30 +3,137 @@
|
||||||
"This file locks the dependencies of your project to a known state",
|
"This file locks the dependencies of your project to a known state",
|
||||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
|
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
|
||||||
],
|
],
|
||||||
"hash": "6e6125b88160e28568edcb9fd007abed",
|
"hash": "a14960de85feb64fdb19eabd165cc09b",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "symfony/config",
|
"name": "lusitanian/oauth",
|
||||||
"version": "v2.1.11",
|
"version": "v0.2.1",
|
||||||
"target-dir": "Symfony/Component/Config",
|
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/Config.git",
|
"url": "https://github.com/Lusitanian/PHPoAuthLib.git",
|
||||||
"reference": "v2.1.11"
|
"reference": "00c667d93058e983fc1b7d3d1cebdb1bc03fb043"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/Config/zipball/v2.1.11",
|
"url": "https://api.github.com/repos/Lusitanian/PHPoAuthLib/zipball/00c667d93058e983fc1b7d3d1cebdb1bc03fb043",
|
||||||
"reference": "v2.1.11",
|
"reference": "00c667d93058e983fc1b7d3d1cebdb1bc03fb043",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.3"
|
"php": ">=5.3.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "3.7.*",
|
||||||
|
"predis/predis": "0.8.*@dev",
|
||||||
|
"symfony/http-foundation": "~2.1"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"predis/predis": "Allows using the Redis storage backend.",
|
||||||
|
"symfony/http-foundation": "Allows using the Symfony Session storage backend."
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "0.1-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": {
|
||||||
|
"OAuth": "src",
|
||||||
|
"OAuth\\Unit": "tests"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "David Desberg",
|
||||||
|
"email": "david@daviddesberg.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Pieter Hordijk",
|
||||||
|
"email": "info@pieterhordijk.com",
|
||||||
|
"homepage": "https://pieterhordijk.com",
|
||||||
|
"role": "developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PHP 5.3+ oAuth 1/2 Library",
|
||||||
|
"keywords": [
|
||||||
|
"Authentication",
|
||||||
|
"authorization",
|
||||||
|
"oauth",
|
||||||
|
"security"
|
||||||
|
],
|
||||||
|
"time": "2013-08-29 21:40:04"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "psr/log",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-fig/log.git",
|
||||||
|
"reference": "fe0936ee26643249e916849d48e3a51d5f5e278b"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b",
|
||||||
|
"reference": "fe0936ee26643249e916849d48e3a51d5f5e278b",
|
||||||
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
"Symfony\\Component\\Config": ""
|
"Psr\\Log\\": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "PHP-FIG",
|
||||||
|
"homepage": "http://www.php-fig.org/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Common interface for logging libraries",
|
||||||
|
"keywords": [
|
||||||
|
"log",
|
||||||
|
"psr",
|
||||||
|
"psr-3"
|
||||||
|
],
|
||||||
|
"time": "2012-12-21 11:40:51"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/config",
|
||||||
|
"version": "v2.3.4",
|
||||||
|
"target-dir": "Symfony/Component/Config",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/Config.git",
|
||||||
|
"reference": "65a927c15ca5a911ba2fa277a5457fa8129505b0"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/Config/zipball/65a927c15ca5a911ba2fa277a5457fa8129505b0",
|
||||||
|
"reference": "65a927c15ca5a911ba2fa277a5457fa8129505b0",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.3",
|
||||||
|
"symfony/filesystem": "~2.3"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.3-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": {
|
||||||
|
"Symfony\\Component\\Config\\": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
@ -45,38 +152,100 @@
|
||||||
],
|
],
|
||||||
"description": "Symfony Config Component",
|
"description": "Symfony Config Component",
|
||||||
"homepage": "http://symfony.com",
|
"homepage": "http://symfony.com",
|
||||||
"time": "2013-05-09 15:22:40"
|
"time": "2013-08-06 05:49:23"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/dependency-injection",
|
"name": "symfony/debug",
|
||||||
"version": "v2.1.11",
|
"version": "v2.3.4",
|
||||||
"target-dir": "Symfony/Component/DependencyInjection",
|
"target-dir": "Symfony/Component/Debug",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/DependencyInjection.git",
|
"url": "https://github.com/symfony/Debug.git",
|
||||||
"reference": "v2.1.11"
|
"reference": "729f6d19cfc401c4942e43fcc1059103bd6df130"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/v2.1.11",
|
"url": "https://api.github.com/repos/symfony/Debug/zipball/729f6d19cfc401c4942e43fcc1059103bd6df130",
|
||||||
"reference": "v2.1.11",
|
"reference": "729f6d19cfc401c4942e43fcc1059103bd6df130",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.3"
|
"php": ">=5.3.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/config": "2.1.*",
|
"symfony/http-foundation": "~2.1",
|
||||||
"symfony/yaml": "2.1.*"
|
"symfony/http-kernel": "~2.1"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/config": "2.1.*",
|
"symfony/class-loader": "",
|
||||||
"symfony/yaml": "2.1.*"
|
"symfony/http-foundation": "",
|
||||||
|
"symfony/http-kernel": ""
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.3-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
"Symfony\\Component\\DependencyInjection": ""
|
"Symfony\\Component\\Debug\\": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Fabien Potencier",
|
||||||
|
"email": "fabien@symfony.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "http://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Symfony Debug Component",
|
||||||
|
"homepage": "http://symfony.com",
|
||||||
|
"time": "2013-08-08 14:16:10"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/dependency-injection",
|
||||||
|
"version": "v2.3.4",
|
||||||
|
"target-dir": "Symfony/Component/DependencyInjection",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/DependencyInjection.git",
|
||||||
|
"reference": "3678aa969e5bfeb8515a1f3047c63e8104723f5c"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/3678aa969e5bfeb8515a1f3047c63e8104723f5c",
|
||||||
|
"reference": "3678aa969e5bfeb8515a1f3047c63e8104723f5c",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.3"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/config": "~2.2",
|
||||||
|
"symfony/yaml": "~2.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"symfony/config": "",
|
||||||
|
"symfony/proxy-manager-bridge": "Generate service proxies to lazy load them",
|
||||||
|
"symfony/yaml": ""
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.3-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": {
|
||||||
|
"Symfony\\Component\\DependencyInjection\\": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
@ -95,37 +264,42 @@
|
||||||
],
|
],
|
||||||
"description": "Symfony DependencyInjection Component",
|
"description": "Symfony DependencyInjection Component",
|
||||||
"homepage": "http://symfony.com",
|
"homepage": "http://symfony.com",
|
||||||
"time": "2013-05-03 05:08:13"
|
"time": "2013-07-25 17:13:25"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/event-dispatcher",
|
"name": "symfony/event-dispatcher",
|
||||||
"version": "v2.1.11",
|
"version": "v2.3.4",
|
||||||
"target-dir": "Symfony/Component/EventDispatcher",
|
"target-dir": "Symfony/Component/EventDispatcher",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/EventDispatcher.git",
|
"url": "https://github.com/symfony/EventDispatcher.git",
|
||||||
"reference": "v2.1.11"
|
"reference": "41c9826457c65fa3cf746f214985b7ca9cba42f8"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.1.11",
|
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/41c9826457c65fa3cf746f214985b7ca9cba42f8",
|
||||||
"reference": "v2.1.11",
|
"reference": "41c9826457c65fa3cf746f214985b7ca9cba42f8",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.3"
|
"php": ">=5.3.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/dependency-injection": "2.1.*"
|
"symfony/dependency-injection": "~2.0"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/dependency-injection": "2.1.*",
|
"symfony/dependency-injection": "",
|
||||||
"symfony/http-kernel": "2.1.*"
|
"symfony/http-kernel": ""
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.3-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
"Symfony\\Component\\EventDispatcher": ""
|
"Symfony\\Component\\EventDispatcher\\": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
@ -144,31 +318,35 @@
|
||||||
],
|
],
|
||||||
"description": "Symfony EventDispatcher Component",
|
"description": "Symfony EventDispatcher Component",
|
||||||
"homepage": "http://symfony.com",
|
"homepage": "http://symfony.com",
|
||||||
"time": "2013-02-11 11:26:14"
|
"time": "2013-07-21 12:12:18"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-foundation",
|
"name": "symfony/filesystem",
|
||||||
"version": "v2.1.11",
|
"version": "v2.3.4",
|
||||||
"target-dir": "Symfony/Component/HttpFoundation",
|
"target-dir": "Symfony/Component/Filesystem",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/HttpFoundation.git",
|
"url": "https://github.com/symfony/Filesystem.git",
|
||||||
"reference": "v2.1.11"
|
"reference": "87acbbef6d35ba649f96f09cc572c45119b360c3"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.1.11",
|
"url": "https://api.github.com/repos/symfony/Filesystem/zipball/87acbbef6d35ba649f96f09cc572c45119b360c3",
|
||||||
"reference": "v2.1.11",
|
"reference": "87acbbef6d35ba649f96f09cc572c45119b360c3",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.3"
|
"php": ">=5.3.3"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.3-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
"Symfony\\Component\\HttpFoundation": "",
|
"Symfony\\Component\\Filesystem\\": ""
|
||||||
"SessionHandlerInterface": "Symfony/Component/HttpFoundation/Resources/stubs"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
@ -185,52 +363,111 @@
|
||||||
"homepage": "http://symfony.com/contributors"
|
"homepage": "http://symfony.com/contributors"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"description": "Symfony Filesystem Component",
|
||||||
|
"homepage": "http://symfony.com",
|
||||||
|
"time": "2013-07-21 12:12:18"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/http-foundation",
|
||||||
|
"version": "v2.3.4",
|
||||||
|
"target-dir": "Symfony/Component/HttpFoundation",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/HttpFoundation.git",
|
||||||
|
"reference": "fdf130fe65457aedbc4639a22f4ef9d3be5c002c"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/fdf130fe65457aedbc4639a22f4ef9d3be5c002c",
|
||||||
|
"reference": "fdf130fe65457aedbc4639a22f4ef9d3be5c002c",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.3"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.3-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": {
|
||||||
|
"Symfony\\Component\\HttpFoundation\\": ""
|
||||||
|
},
|
||||||
|
"classmap": [
|
||||||
|
"Symfony/Component/HttpFoundation/Resources/stubs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Fabien Potencier",
|
||||||
|
"email": "fabien@symfony.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "http://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
"description": "Symfony HttpFoundation Component",
|
"description": "Symfony HttpFoundation Component",
|
||||||
"homepage": "http://symfony.com",
|
"homepage": "http://symfony.com",
|
||||||
"time": "2013-05-26 18:42:07"
|
"time": "2013-08-26 05:49:51"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-kernel",
|
"name": "symfony/http-kernel",
|
||||||
"version": "v2.1.11",
|
"version": "v2.3.4",
|
||||||
"target-dir": "Symfony/Component/HttpKernel",
|
"target-dir": "Symfony/Component/HttpKernel",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/HttpKernel.git",
|
"url": "https://github.com/symfony/HttpKernel.git",
|
||||||
"reference": "v2.1.11"
|
"reference": "9d35da40f07bbe7a4f8dfbc41555d2b69de674bf"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/v2.1.11",
|
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/9d35da40f07bbe7a4f8dfbc41555d2b69de674bf",
|
||||||
"reference": "v2.1.11",
|
"reference": "9d35da40f07bbe7a4f8dfbc41555d2b69de674bf",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.3",
|
"php": ">=5.3.3",
|
||||||
"symfony/event-dispatcher": "2.1.*",
|
"psr/log": "~1.0",
|
||||||
"symfony/http-foundation": "2.1.*"
|
"symfony/debug": "~2.3",
|
||||||
|
"symfony/event-dispatcher": "~2.1",
|
||||||
|
"symfony/http-foundation": "~2.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/browser-kit": "2.1.*",
|
"symfony/browser-kit": "~2.2",
|
||||||
"symfony/class-loader": "2.1.*",
|
"symfony/class-loader": "~2.1",
|
||||||
"symfony/config": "2.1.*",
|
"symfony/config": "~2.0",
|
||||||
"symfony/console": "2.1.*",
|
"symfony/console": "~2.2",
|
||||||
"symfony/dependency-injection": "2.1.*",
|
"symfony/dependency-injection": "~2.0",
|
||||||
"symfony/finder": "2.1.*",
|
"symfony/finder": "~2.0",
|
||||||
"symfony/process": "2.1.*",
|
"symfony/process": "~2.0",
|
||||||
"symfony/routing": "2.1.*"
|
"symfony/routing": "~2.2",
|
||||||
|
"symfony/stopwatch": "~2.2",
|
||||||
|
"symfony/templating": "~2.2"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/browser-kit": "2.1.*",
|
"symfony/browser-kit": "",
|
||||||
"symfony/class-loader": "2.1.*",
|
"symfony/class-loader": "",
|
||||||
"symfony/config": "2.1.*",
|
"symfony/config": "",
|
||||||
"symfony/console": "2.1.*",
|
"symfony/console": "",
|
||||||
"symfony/dependency-injection": "2.1.*",
|
"symfony/dependency-injection": "",
|
||||||
"symfony/finder": "2.1.*"
|
"symfony/finder": ""
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.3-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
"Symfony\\Component\\HttpKernel": ""
|
"Symfony\\Component\\HttpKernel\\": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
@ -249,41 +486,46 @@
|
||||||
],
|
],
|
||||||
"description": "Symfony HttpKernel Component",
|
"description": "Symfony HttpKernel Component",
|
||||||
"homepage": "http://symfony.com",
|
"homepage": "http://symfony.com",
|
||||||
"time": "2013-06-02 12:29:05"
|
"time": "2013-08-27 08:58:24"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/routing",
|
"name": "symfony/routing",
|
||||||
"version": "v2.1.11",
|
"version": "v2.3.4",
|
||||||
"target-dir": "Symfony/Component/Routing",
|
"target-dir": "Symfony/Component/Routing",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/Routing.git",
|
"url": "https://github.com/symfony/Routing.git",
|
||||||
"reference": "v2.1.11"
|
"reference": "69af3f07dbf3ae93dd513dbc373f561cb2e7f143"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/Routing/zipball/v2.1.11",
|
"url": "https://api.github.com/repos/symfony/Routing/zipball/69af3f07dbf3ae93dd513dbc373f561cb2e7f143",
|
||||||
"reference": "v2.1.11",
|
"reference": "69af3f07dbf3ae93dd513dbc373f561cb2e7f143",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.3"
|
"php": ">=5.3.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"doctrine/common": ">=2.2,<3.0",
|
"doctrine/common": "~2.2",
|
||||||
"symfony/config": "2.1.*",
|
"psr/log": "~1.0",
|
||||||
"symfony/http-kernel": "2.1.*",
|
"symfony/config": "~2.2",
|
||||||
"symfony/yaml": "2.1.*"
|
"symfony/yaml": "~2.0"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"doctrine/common": "~2.2",
|
"doctrine/common": "",
|
||||||
"symfony/config": "2.1.*",
|
"symfony/config": "",
|
||||||
"symfony/yaml": "2.1.*"
|
"symfony/yaml": ""
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.3-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
"Symfony\\Component\\Routing": ""
|
"Symfony\\Component\\Routing\\": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
@ -302,30 +544,35 @@
|
||||||
],
|
],
|
||||||
"description": "Symfony Routing Component",
|
"description": "Symfony Routing Component",
|
||||||
"homepage": "http://symfony.com",
|
"homepage": "http://symfony.com",
|
||||||
"time": "2013-05-06 10:48:41"
|
"time": "2013-08-23 15:14:07"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/yaml",
|
"name": "symfony/yaml",
|
||||||
"version": "v2.1.11",
|
"version": "v2.3.4",
|
||||||
"target-dir": "Symfony/Component/Yaml",
|
"target-dir": "Symfony/Component/Yaml",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/Yaml.git",
|
"url": "https://github.com/symfony/Yaml.git",
|
||||||
"reference": "v2.1.11"
|
"reference": "5a279f1b5f5e1045a6c432354d9ea727ff3a9847"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/Yaml/zipball/v2.1.11",
|
"url": "https://api.github.com/repos/symfony/Yaml/zipball/5a279f1b5f5e1045a6c432354d9ea727ff3a9847",
|
||||||
"reference": "v2.1.11",
|
"reference": "5a279f1b5f5e1045a6c432354d9ea727ff3a9847",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.3"
|
"php": ">=5.3.3"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.3-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
"Symfony\\Component\\Yaml": ""
|
"Symfony\\Component\\Yaml\\": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
@ -344,20 +591,20 @@
|
||||||
],
|
],
|
||||||
"description": "Symfony Yaml Component",
|
"description": "Symfony Yaml Component",
|
||||||
"homepage": "http://symfony.com",
|
"homepage": "http://symfony.com",
|
||||||
"time": "2013-05-10 00:09:46"
|
"time": "2013-08-24 15:26:22"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "twig/twig",
|
"name": "twig/twig",
|
||||||
"version": "v1.13.1",
|
"version": "v1.13.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/fabpot/Twig.git",
|
"url": "https://github.com/fabpot/Twig.git",
|
||||||
"reference": "v1.13.1"
|
"reference": "6d6a1009427d1f398c9d40904147bf9f723d5755"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/fabpot/Twig/zipball/v1.13.1",
|
"url": "https://api.github.com/repos/fabpot/Twig/zipball/6d6a1009427d1f398c9d40904147bf9f723d5755",
|
||||||
"reference": "v1.13.1",
|
"reference": "6d6a1009427d1f398c9d40904147bf9f723d5755",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -376,7 +623,7 @@
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"BSD-3"
|
"BSD-3-Clause"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
@ -393,7 +640,7 @@
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"templating"
|
"templating"
|
||||||
],
|
],
|
||||||
"time": "2013-06-06 06:06:01"
|
"time": "2013-08-03 15:35:31"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
|
@ -803,16 +1050,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-timer",
|
"name": "phpunit/php-timer",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git://github.com/sebastianbergmann/php-timer.git",
|
"url": "https://github.com/sebastianbergmann/php-timer.git",
|
||||||
"reference": "1.0.4"
|
"reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://github.com/sebastianbergmann/php-timer/zipball/1.0.4",
|
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
|
||||||
"reference": "1.0.4",
|
"reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -839,24 +1086,24 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Utility class for timing",
|
"description": "Utility class for timing",
|
||||||
"homepage": "http://www.phpunit.de/",
|
"homepage": "https://github.com/sebastianbergmann/php-timer/",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"timer"
|
"timer"
|
||||||
],
|
],
|
||||||
"time": "2012-10-11 04:45:58"
|
"time": "2013-08-02 07:42:54"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-token-stream",
|
"name": "phpunit/php-token-stream",
|
||||||
"version": "1.1.5",
|
"version": "1.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git://github.com/sebastianbergmann/php-token-stream.git",
|
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
|
||||||
"reference": "1.1.5"
|
"reference": "31babf400e5b5868573bf49a000a3519d3978233"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://github.com/sebastianbergmann/php-token-stream/zipball/1.1.5",
|
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/31babf400e5b5868573bf49a000a3519d3978233",
|
||||||
"reference": "1.1.5",
|
"reference": "31babf400e5b5868573bf49a000a3519d3978233",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -864,6 +1111,11 @@
|
||||||
"php": ">=5.3.3"
|
"php": ">=5.3.3"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.2-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"classmap": [
|
"classmap": [
|
||||||
"PHP/"
|
"PHP/"
|
||||||
|
@ -884,24 +1136,24 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Wrapper around PHP's tokenizer extension.",
|
"description": "Wrapper around PHP's tokenizer extension.",
|
||||||
"homepage": "http://www.phpunit.de/",
|
"homepage": "https://github.com/sebastianbergmann/php-token-stream/",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tokenizer"
|
"tokenizer"
|
||||||
],
|
],
|
||||||
"time": "2012-10-11 04:47:14"
|
"time": "2013-08-04 05:57:48"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/phpunit",
|
"name": "phpunit/phpunit",
|
||||||
"version": "3.7.22",
|
"version": "3.7.24",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||||
"reference": "3.7.22"
|
"reference": "af7b77ccb5c64458bdfca95665d29558d1df7d08"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3.7.22",
|
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/af7b77ccb5c64458bdfca95665d29558d1df7d08",
|
||||||
"reference": "3.7.22",
|
"reference": "af7b77ccb5c64458bdfca95665d29558d1df7d08",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -913,7 +1165,7 @@
|
||||||
"phpunit/php-code-coverage": "~1.2.1",
|
"phpunit/php-code-coverage": "~1.2.1",
|
||||||
"phpunit/php-file-iterator": ">=1.3.1",
|
"phpunit/php-file-iterator": ">=1.3.1",
|
||||||
"phpunit/php-text-template": ">=1.1.1",
|
"phpunit/php-text-template": ">=1.1.1",
|
||||||
"phpunit/php-timer": "~1.0.2",
|
"phpunit/php-timer": ">=1.0.4",
|
||||||
"phpunit/phpunit-mock-objects": "~1.2.0",
|
"phpunit/phpunit-mock-objects": "~1.2.0",
|
||||||
"symfony/yaml": "~2.0"
|
"symfony/yaml": "~2.0"
|
||||||
},
|
},
|
||||||
|
@ -962,7 +1214,7 @@
|
||||||
"testing",
|
"testing",
|
||||||
"xunit"
|
"xunit"
|
||||||
],
|
],
|
||||||
"time": "2013-07-06 06:29:15"
|
"time": "2013-08-09 06:58:24"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/phpunit-mock-objects",
|
"name": "phpunit/phpunit-mock-objects",
|
||||||
|
@ -1015,17 +1267,17 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/browser-kit",
|
"name": "symfony/browser-kit",
|
||||||
"version": "v2.1.11",
|
"version": "v2.1.12",
|
||||||
"target-dir": "Symfony/Component/BrowserKit",
|
"target-dir": "Symfony/Component/BrowserKit",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/BrowserKit.git",
|
"url": "https://github.com/symfony/BrowserKit.git",
|
||||||
"reference": "v2.1.11"
|
"reference": "0bb8f07107a2911db0fe49c39f96b5018e5ab678"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/BrowserKit/zipball/v2.1.11",
|
"url": "https://api.github.com/repos/symfony/BrowserKit/zipball/0bb8f07107a2911db0fe49c39f96b5018e5ab678",
|
||||||
"reference": "v2.1.11",
|
"reference": "0bb8f07107a2911db0fe49c39f96b5018e5ab678",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1065,17 +1317,17 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/css-selector",
|
"name": "symfony/css-selector",
|
||||||
"version": "v2.1.11",
|
"version": "v2.1.12",
|
||||||
"target-dir": "Symfony/Component/CssSelector",
|
"target-dir": "Symfony/Component/CssSelector",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/CssSelector.git",
|
"url": "https://github.com/symfony/CssSelector.git",
|
||||||
"reference": "v2.1.11"
|
"reference": "bf7bb82a099dfb26b018daf70ad1985fea4d2997"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/CssSelector/zipball/v2.1.11",
|
"url": "https://api.github.com/repos/symfony/CssSelector/zipball/bf7bb82a099dfb26b018daf70ad1985fea4d2997",
|
||||||
"reference": "v2.1.11",
|
"reference": "bf7bb82a099dfb26b018daf70ad1985fea4d2997",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1107,17 +1359,17 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/dom-crawler",
|
"name": "symfony/dom-crawler",
|
||||||
"version": "v2.1.11",
|
"version": "v2.1.12",
|
||||||
"target-dir": "Symfony/Component/DomCrawler",
|
"target-dir": "Symfony/Component/DomCrawler",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/DomCrawler.git",
|
"url": "https://github.com/symfony/DomCrawler.git",
|
||||||
"reference": "v2.1.11"
|
"reference": "bedfd7eb44e3b1224d1e18335d2e36bbbed26cbe"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/DomCrawler/zipball/v2.1.11",
|
"url": "https://api.github.com/repos/symfony/DomCrawler/zipball/bedfd7eb44e3b1224d1e18335d2e36bbbed26cbe",
|
||||||
"reference": "v2.1.11",
|
"reference": "bedfd7eb44e3b1224d1e18335d2e36bbbed26cbe",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1155,17 +1407,17 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/finder",
|
"name": "symfony/finder",
|
||||||
"version": "v2.1.11",
|
"version": "v2.1.12",
|
||||||
"target-dir": "Symfony/Component/Finder",
|
"target-dir": "Symfony/Component/Finder",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/Finder.git",
|
"url": "https://github.com/symfony/Finder.git",
|
||||||
"reference": "v2.1.11"
|
"reference": "0dbc61194b58bc513e003789853ddfe0aea8cf33"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/Finder/zipball/v2.1.11",
|
"url": "https://api.github.com/repos/symfony/Finder/zipball/0dbc61194b58bc513e003789853ddfe0aea8cf33",
|
||||||
"reference": "v2.1.11",
|
"reference": "0dbc61194b58bc513e003789853ddfe0aea8cf33",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1197,17 +1449,17 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/process",
|
"name": "symfony/process",
|
||||||
"version": "v2.1.11",
|
"version": "v2.1.12",
|
||||||
"target-dir": "Symfony/Component/Process",
|
"target-dir": "Symfony/Component/Process",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/Process.git",
|
"url": "https://github.com/symfony/Process.git",
|
||||||
"reference": "v2.1.11"
|
"reference": "be3cac4d0575bc547a0f2e85ceb4f19a5a8b3025"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/Process/zipball/v2.1.11",
|
"url": "https://api.github.com/repos/symfony/Process/zipball/be3cac4d0575bc547a0f2e85ceb4f19a5a8b3025",
|
||||||
"reference": "v2.1.11",
|
"reference": "be3cac4d0575bc547a0f2e85ceb4f19a5a8b3025",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
|
|
@ -35,3 +35,45 @@ services:
|
||||||
- @user
|
- @user
|
||||||
tags:
|
tags:
|
||||||
- { name: auth.provider }
|
- { name: auth.provider }
|
||||||
|
auth.provider.oauth:
|
||||||
|
class: phpbb_auth_provider_oauth
|
||||||
|
arguments:
|
||||||
|
- @dbal.conn
|
||||||
|
- @config
|
||||||
|
- @request
|
||||||
|
- @user
|
||||||
|
- %tables.auth_provider_oauth_token_storage%
|
||||||
|
- %tables.auth_provider_oauth_account_assoc%
|
||||||
|
- @auth.provider.oauth.service_collection
|
||||||
|
- %tables.users%
|
||||||
|
- %core.root_path%
|
||||||
|
- %core.php_ext%
|
||||||
|
tags:
|
||||||
|
- { name: auth.provider }
|
||||||
|
auth.provider.oauth.service_collection:
|
||||||
|
class: phpbb_di_service_collection
|
||||||
|
arguments:
|
||||||
|
- @service_container
|
||||||
|
tags:
|
||||||
|
- { name: service_collection, tag: auth.provider.oauth.service }
|
||||||
|
auth.provider.oauth.service.bitly:
|
||||||
|
class: phpbb_auth_provider_oauth_service_bitly
|
||||||
|
arguments:
|
||||||
|
- @config
|
||||||
|
- @request
|
||||||
|
tags:
|
||||||
|
- { name: auth.provider.oauth.service }
|
||||||
|
auth.provider.oauth.service.facebook:
|
||||||
|
class: phpbb_auth_provider_oauth_service_facebook
|
||||||
|
arguments:
|
||||||
|
- @config
|
||||||
|
- @request
|
||||||
|
tags:
|
||||||
|
- { name: auth.provider.oauth.service }
|
||||||
|
auth.provider.oauth.service.google:
|
||||||
|
class: phpbb_auth_provider_oauth_service_google
|
||||||
|
arguments:
|
||||||
|
- @config
|
||||||
|
- @request
|
||||||
|
tags:
|
||||||
|
- { name: auth.provider.oauth.service }
|
||||||
|
|
|
@ -103,6 +103,42 @@ services:
|
||||||
tags:
|
tags:
|
||||||
- { name: notification.type }
|
- { name: notification.type }
|
||||||
|
|
||||||
|
notification.type.group_request:
|
||||||
|
class: phpbb_notification_type_group_request
|
||||||
|
scope: prototype # scope MUST be prototype for this to work!
|
||||||
|
arguments:
|
||||||
|
- @user_loader
|
||||||
|
- @dbal.conn
|
||||||
|
- @cache.driver
|
||||||
|
- @user
|
||||||
|
- @auth
|
||||||
|
- @config
|
||||||
|
- %core.root_path%
|
||||||
|
- %core.php_ext%
|
||||||
|
- %tables.notification_types%
|
||||||
|
- %tables.notifications%
|
||||||
|
- %tables.user_notifications%
|
||||||
|
tags:
|
||||||
|
- { name: notification.type }
|
||||||
|
|
||||||
|
notification.type.group_request_approved:
|
||||||
|
class: phpbb_notification_type_group_request_approved
|
||||||
|
scope: prototype # scope MUST be prototype for this to work!
|
||||||
|
arguments:
|
||||||
|
- @user_loader
|
||||||
|
- @dbal.conn
|
||||||
|
- @cache.driver
|
||||||
|
- @user
|
||||||
|
- @auth
|
||||||
|
- @config
|
||||||
|
- %core.root_path%
|
||||||
|
- %core.php_ext%
|
||||||
|
- %tables.notification_types%
|
||||||
|
- %tables.notifications%
|
||||||
|
- %tables.user_notifications%
|
||||||
|
tags:
|
||||||
|
- { name: notification.type }
|
||||||
|
|
||||||
notification.type.pm:
|
notification.type.pm:
|
||||||
class: phpbb_notification_type_pm
|
class: phpbb_notification_type_pm
|
||||||
scope: prototype # scope MUST be prototype for this to work!
|
scope: prototype # scope MUST be prototype for this to work!
|
||||||
|
|
|
@ -90,6 +90,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @template
|
- @template
|
||||||
- @user
|
- @user
|
||||||
|
- @request
|
||||||
- %core.root_path%
|
- %core.root_path%
|
||||||
- %core.php_ext%
|
- %core.php_ext%
|
||||||
|
|
||||||
|
@ -98,7 +99,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @user
|
- @user
|
||||||
- @service_container
|
- @service_container
|
||||||
- @style
|
- @template
|
||||||
|
|
||||||
cron.task_collection:
|
cron.task_collection:
|
||||||
class: phpbb_di_service_collection
|
class: phpbb_di_service_collection
|
||||||
|
@ -251,30 +252,6 @@ services:
|
||||||
request:
|
request:
|
||||||
class: phpbb_request
|
class: phpbb_request
|
||||||
|
|
||||||
style:
|
|
||||||
class: phpbb_style
|
|
||||||
arguments:
|
|
||||||
- %core.root_path%
|
|
||||||
- %core.php_ext%
|
|
||||||
- @config
|
|
||||||
- @user
|
|
||||||
- @style.resource_locator
|
|
||||||
- @style.path_provider_ext
|
|
||||||
- @template
|
|
||||||
|
|
||||||
style.resource_locator:
|
|
||||||
class: phpbb_style_resource_locator
|
|
||||||
|
|
||||||
style.path_provider_ext:
|
|
||||||
class: phpbb_style_extension_path_provider
|
|
||||||
arguments:
|
|
||||||
- @ext.manager
|
|
||||||
- @style.path_provider
|
|
||||||
- %core.root_path%
|
|
||||||
|
|
||||||
style.path_provider:
|
|
||||||
class: phpbb_style_path_provider
|
|
||||||
|
|
||||||
template:
|
template:
|
||||||
class: phpbb_template_twig
|
class: phpbb_template_twig
|
||||||
arguments:
|
arguments:
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
parameters:
|
parameters:
|
||||||
|
tables.auth_provider_oauth_token_storage: %core.table_prefix%oauth_tokens
|
||||||
|
tables.auth_provider_oauth_account_assoc: %core.table_prefix%oauth_accounts
|
||||||
tables.config: %core.table_prefix%config
|
tables.config: %core.table_prefix%config
|
||||||
tables.config_text: %core.table_prefix%config_text
|
tables.config_text: %core.table_prefix%config_text
|
||||||
tables.ext: %core.table_prefix%ext
|
tables.ext: %core.table_prefix%ext
|
||||||
|
|
0
phpBB/develop/blank.gif
Normal file
0
phpBB/develop/blank.gif
Normal file
0
phpBB/develop/blank.jpg
Normal file
0
phpBB/develop/blank.jpg
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -145,7 +145,6 @@
|
||||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11265">PHPBB3-11265</a>] - Functional tests do not assert that board installation succeeded</li>
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11265">PHPBB3-11265</a>] - Functional tests do not assert that board installation succeeded</li>
|
||||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11269">PHPBB3-11269</a>] - Travis functional test case errors</li>
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11269">PHPBB3-11269</a>] - Travis functional test case errors</li>
|
||||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11278">PHPBB3-11278</a>] - Firebird tables are not removed correctly on 3.0.9-rc1 update</li>
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11278">PHPBB3-11278</a>] - Firebird tables are not removed correctly on 3.0.9-rc1 update</li>
|
||||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11288">PHPBB3-11288</a>] - Search fooled by hyphens</li>
|
|
||||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11291">PHPBB3-11291</a>] - "Could not open input file: ../composer.phar" error during phing's create-package</li>
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11291">PHPBB3-11291</a>] - "Could not open input file: ../composer.phar" error during phing's create-package</li>
|
||||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11292">PHPBB3-11292</a>] - Newlines removed in display of PM reports, no clickable links in PM reports</li>
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11292">PHPBB3-11292</a>] - Newlines removed in display of PM reports, no clickable links in PM reports</li>
|
||||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11301">PHPBB3-11301</a>] - "String offset cast occured" error on PHP 5.4</li>
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11301">PHPBB3-11301</a>] - "String offset cast occured" error on PHP 5.4</li>
|
||||||
|
@ -183,6 +182,11 @@
|
||||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11662">PHPBB3-11662</a>] - "occured" should be "occurred"</li>
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11662">PHPBB3-11662</a>] - "occured" should be "occurred"</li>
|
||||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11670">PHPBB3-11670</a>] - Replace trademark ™ with ® on "Welcome to phpBB" install page</li>
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11670">PHPBB3-11670</a>] - Replace trademark ™ with ® on "Welcome to phpBB" install page</li>
|
||||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11674">PHPBB3-11674</a>] - Do not include vendor folder if there are no dependencies.</li>
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11674">PHPBB3-11674</a>] - Do not include vendor folder if there are no dependencies.</li>
|
||||||
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11524">PHPBB3-11524</a>] - MySQL Upgrader throws warnings on PHP 5.4</li>
|
||||||
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11720">PHPBB3-11720</a>] - Reporting posts leads to white page error</li>
|
||||||
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11769">PHPBB3-11769</a>] - Wrong poster in subscription email when poster is using the Quote button</li>
|
||||||
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11775">PHPBB3-11775</a>] - Error while moving posts to a new topic</li>
|
||||||
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11802">PHPBB3-11802</a>] - Undefined variable $browser in /download/file.php</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h4>Improvement</h4>
|
<h4>Improvement</h4>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -206,6 +210,7 @@
|
||||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11294">PHPBB3-11294</a>] - Update extension list in running tests doc</li>
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11294">PHPBB3-11294</a>] - Update extension list in running tests doc</li>
|
||||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11368">PHPBB3-11368</a>] - Latest pm reports row count</li>
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11368">PHPBB3-11368</a>] - Latest pm reports row count</li>
|
||||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11583">PHPBB3-11583</a>] - InnoDB supports FULLTEXT index since MySQL 5.6.4.</li>
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11583">PHPBB3-11583</a>] - InnoDB supports FULLTEXT index since MySQL 5.6.4.</li>
|
||||||
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11740">PHPBB3-11740</a>] - Update link in FAQ to Ideas Centre</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h4>Sub-task</h4>
|
<h4>Sub-task</h4>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -231,6 +236,8 @@
|
||||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11529">PHPBB3-11529</a>] - Rename RUNNING_TESTS file to .md file to render it on GitHub</li>
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11529">PHPBB3-11529</a>] - Rename RUNNING_TESTS file to .md file to render it on GitHub</li>
|
||||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11576">PHPBB3-11576</a>] - Make phpBB Test Suite MySQL behave at least as strict as phpBB MySQL driver</li>
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11576">PHPBB3-11576</a>] - Make phpBB Test Suite MySQL behave at least as strict as phpBB MySQL driver</li>
|
||||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11671">PHPBB3-11671</a>] - Add phing/phing to composer.json</li>
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11671">PHPBB3-11671</a>] - Add phing/phing to composer.json</li>
|
||||||
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11752">PHPBB3-11752</a>] - Update phpBB.com URLs to https in email templates</li>
|
||||||
|
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11753">PHPBB3-11753</a>] - Upgrade mysql_upgrader.php schema data.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a name="v3010"></a><h3>1.ii. Changes since 3.0.10</h3>
|
<a name="v3010"></a><h3>1.ii. Changes since 3.0.10</h3>
|
||||||
|
|
|
@ -832,7 +832,7 @@ $sql = 'SELECT *
|
||||||
$sql_ary = array(
|
$sql_ary = array(
|
||||||
'somedata' => $my_string,
|
'somedata' => $my_string,
|
||||||
'otherdata' => $an_int,
|
'otherdata' => $an_int,
|
||||||
'moredata' => $another_int
|
'moredata' => $another_int,
|
||||||
);
|
);
|
||||||
|
|
||||||
$db->sql_query('INSERT INTO ' . SOME_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
|
$db->sql_query('INSERT INTO ' . SOME_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
|
||||||
|
@ -844,7 +844,7 @@ $db->sql_query('INSERT INTO ' . SOME_TABLE . ' ' . $db->sql_build_array('I
|
||||||
$sql_ary = array(
|
$sql_ary = array(
|
||||||
'somedata' => $my_string,
|
'somedata' => $my_string,
|
||||||
'otherdata' => $an_int,
|
'otherdata' => $an_int,
|
||||||
'moredata' => $another_int
|
'moredata' => $another_int,
|
||||||
);
|
);
|
||||||
|
|
||||||
$sql = 'UPDATE ' . SOME_TABLE . '
|
$sql = 'UPDATE ' . SOME_TABLE . '
|
||||||
|
@ -937,20 +937,20 @@ $sql_array = array(
|
||||||
|
|
||||||
'FROM' => array(
|
'FROM' => array(
|
||||||
FORUMS_WATCH_TABLE => 'fw',
|
FORUMS_WATCH_TABLE => 'fw',
|
||||||
FORUMS_TABLE => 'f'
|
FORUMS_TABLE => 'f',
|
||||||
),
|
),
|
||||||
|
|
||||||
'LEFT_JOIN' => array(
|
'LEFT_JOIN' => array(
|
||||||
array(
|
array(
|
||||||
'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
|
'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
|
||||||
'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id'
|
'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id',
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
'WHERE' => 'fw.user_id = ' . $user->data['user_id'] . '
|
'WHERE' => 'fw.user_id = ' . $user->data['user_id'] . '
|
||||||
AND f.forum_id = fw.forum_id',
|
AND f.forum_id = fw.forum_id',
|
||||||
|
|
||||||
'ORDER_BY' => 'left_id'
|
'ORDER_BY' => 'left_id',
|
||||||
);
|
);
|
||||||
|
|
||||||
$sql = $db->sql_build_query('SELECT', $sql_array);
|
$sql = $db->sql_build_query('SELECT', $sql_array);
|
||||||
|
@ -964,13 +964,13 @@ $sql_array = array(
|
||||||
|
|
||||||
'FROM' => array(
|
'FROM' => array(
|
||||||
FORUMS_WATCH_TABLE => 'fw',
|
FORUMS_WATCH_TABLE => 'fw',
|
||||||
FORUMS_TABLE => 'f'
|
FORUMS_TABLE => 'f',
|
||||||
),
|
),
|
||||||
|
|
||||||
'WHERE' => 'fw.user_id = ' . $user->data['user_id'] . '
|
'WHERE' => 'fw.user_id = ' . $user->data['user_id'] . '
|
||||||
AND f.forum_id = fw.forum_id',
|
AND f.forum_id = fw.forum_id',
|
||||||
|
|
||||||
'ORDER_BY' => 'left_id'
|
'ORDER_BY' => 'left_id',
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($config['load_db_lastread'])
|
if ($config['load_db_lastread'])
|
||||||
|
@ -978,8 +978,8 @@ if ($config['load_db_lastread'])
|
||||||
$sql_array['LEFT_JOIN'] = array(
|
$sql_array['LEFT_JOIN'] = array(
|
||||||
array(
|
array(
|
||||||
'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
|
'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
|
||||||
'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id'
|
'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id',
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
$sql_array['SELECT'] .= ', ft.mark_time ';
|
$sql_array['SELECT'] .= ', ft.mark_time ';
|
||||||
|
|
|
@ -52,6 +52,36 @@ index_body_stat_blocks_before
|
||||||
+ styles/subsilver2/template/index_body.html
|
+ styles/subsilver2/template/index_body.html
|
||||||
* Purpose: Add new statistic blocks above the Who Is Online and Board Statistics blocks
|
* Purpose: Add new statistic blocks above the Who Is Online and Board Statistics blocks
|
||||||
|
|
||||||
|
memberlist_body_username_append
|
||||||
|
===
|
||||||
|
* Locations:
|
||||||
|
+ styles/prosilver/template/memberlist_body.html
|
||||||
|
+ styles/subsilver2/template/memberlist_body.html
|
||||||
|
* Purpose: Add information after every username in the memberlist. Works in
|
||||||
|
all display modes (leader, group and normal memberlist).
|
||||||
|
|
||||||
|
memberlist_body_username_prepend
|
||||||
|
===
|
||||||
|
* Locations:
|
||||||
|
+ styles/prosilver/template/memberlist_body.html
|
||||||
|
+ styles/subsilver2/template/memberlist_body.html
|
||||||
|
* Purpose: Add information before every username in the memberlist. Works in
|
||||||
|
all display modes (leader, group and normal memberlist).
|
||||||
|
|
||||||
|
memberlist_view_user_statistics_after
|
||||||
|
===
|
||||||
|
* Locations:
|
||||||
|
+ styles/prosilver/template/memberlist_view.html
|
||||||
|
+ styles/subsilver2/template/memberlist_view.html
|
||||||
|
* Purpose: Add entries after the user statistics part of any user profile
|
||||||
|
|
||||||
|
memberlist_view_user_statistics_before
|
||||||
|
===
|
||||||
|
* Locations:
|
||||||
|
+ styles/prosilver/template/memberlist_view.html
|
||||||
|
+ styles/subsilver2/template/memberlist_view.html
|
||||||
|
* Purpose: Add entries before the user statistics part of any user profile
|
||||||
|
|
||||||
overall_footer_after
|
overall_footer_after
|
||||||
===
|
===
|
||||||
* Locations:
|
* Locations:
|
||||||
|
@ -114,11 +144,101 @@ simple_footer_after
|
||||||
* Location: styles/prosilver/template/simple_footer.html
|
* Location: styles/prosilver/template/simple_footer.html
|
||||||
* Purpose: Add content directly prior to the `</body>` tag of the simple footer
|
* Purpose: Add content directly prior to the `</body>` tag of the simple footer
|
||||||
|
|
||||||
|
topiclist_row_prepend
|
||||||
|
===
|
||||||
|
* Locations:
|
||||||
|
+ styles/prosilver/template/search_results.html
|
||||||
|
+ styles/prosilver/template/viewforum_body.html
|
||||||
|
+ styles/subsilver2/template/search_results.html
|
||||||
|
+ styles/subsilver2/template/viewforum_body.html
|
||||||
|
* Purpose: Add content into topic rows (inside the elements containing topic titles)
|
||||||
|
|
||||||
|
topiclist_row_append
|
||||||
|
===
|
||||||
|
* Locations:
|
||||||
|
+ styles/prosilver/template/search_results.html
|
||||||
|
+ styles/prosilver/template/viewforum_body.html
|
||||||
|
+ styles/subsilver2/template/search_results.html
|
||||||
|
+ styles/subsilver2/template/viewforum_body.html
|
||||||
|
* Purpose: Add content into topic rows (inside the elements containing topic titles)
|
||||||
|
|
||||||
|
ucp_pm_viewmessage_custom_fields_after
|
||||||
|
===
|
||||||
|
* Location: styles/prosilver/template/ucp_pm_viewmessage.html
|
||||||
|
* Purpose: Add data after the custom fields on the user profile when viewing
|
||||||
|
a private message
|
||||||
|
|
||||||
|
ucp_pm_viewmessage_custom_fields_before
|
||||||
|
===
|
||||||
|
* Location: styles/prosilver/template/ucp_pm_viewmessage.html
|
||||||
|
* Purpose: Add data before the custom fields on the user profile when viewing
|
||||||
|
a private message
|
||||||
|
|
||||||
ucp_pm_viewmessage_print_head_append
|
ucp_pm_viewmessage_print_head_append
|
||||||
===
|
===
|
||||||
* Location: styles/prosilver/template/ucp_pm_viewmessage_print.html
|
* Location: styles/prosilver/template/ucp_pm_viewmessage_print.html
|
||||||
* Purpose: Add asset calls directly before the `</head>` tag of the Print PM screen
|
* Purpose: Add asset calls directly before the `</head>` tag of the Print PM screen
|
||||||
|
|
||||||
|
ucp_prefs_personal_prepend
|
||||||
|
===
|
||||||
|
* Locations:
|
||||||
|
+ styles/prosilver/template/ucp_prefs_personal.html
|
||||||
|
+ styles/subsilver2/template/ucp_prefs_personal.html
|
||||||
|
* Purpose: Add user options to the top of the Edit Global Settings block
|
||||||
|
|
||||||
|
ucp_prefs_personal_append
|
||||||
|
===
|
||||||
|
* Locations:
|
||||||
|
+ styles/prosilver/template/ucp_prefs_personal.html
|
||||||
|
+ styles/subsilver2/template/ucp_prefs_personal.html
|
||||||
|
* Purpose: Add user options to the bottom of the Edit Global Settings block
|
||||||
|
|
||||||
|
ucp_prefs_post_prepend
|
||||||
|
===
|
||||||
|
* Locations:
|
||||||
|
+ styles/prosilver/template/ucp_prefs_post.html
|
||||||
|
+ styles/subsilver2/template/ucp_prefs_post.html
|
||||||
|
* Purpose: Add user options to the top of the Edit Posting Defaults block
|
||||||
|
|
||||||
|
ucp_prefs_post_append
|
||||||
|
===
|
||||||
|
* Locations:
|
||||||
|
+ styles/prosilver/template/ucp_prefs_post.html
|
||||||
|
+ styles/subsilver2/template/ucp_prefs_post.html
|
||||||
|
* Purpose: Add user options to the bottom of the Edit Posting Defaults block
|
||||||
|
|
||||||
|
ucp_prefs_view_radio_buttons_prepend
|
||||||
|
===
|
||||||
|
* Locations:
|
||||||
|
+ styles/prosilver/template/ucp_prefs_view.html
|
||||||
|
+ styles/subsilver2/template/ucp_prefs_view.html
|
||||||
|
* Purpose: Add options to the top of the radio buttons block of the Edit
|
||||||
|
Display Options screen
|
||||||
|
|
||||||
|
ucp_prefs_view_radio_buttons_append
|
||||||
|
===
|
||||||
|
* Locations:
|
||||||
|
+ styles/prosilver/template/ucp_prefs_view.html
|
||||||
|
+ styles/subsilver2/template/ucp_prefs_view.html
|
||||||
|
* Purpose: Add options to the bottom of the radio buttons block of the Edit
|
||||||
|
Display Options screen
|
||||||
|
|
||||||
|
ucp_prefs_view_select_menu_prepend
|
||||||
|
===
|
||||||
|
* Locations:
|
||||||
|
+ styles/prosilver/template/ucp_prefs_view.html
|
||||||
|
+ styles/subsilver2/template/ucp_prefs_view.html
|
||||||
|
* Purpose: Add options to the top of the drop-down lists block of the Edit
|
||||||
|
Display Options screen
|
||||||
|
|
||||||
|
ucp_prefs_view_select_menu_append
|
||||||
|
===
|
||||||
|
* Locations:
|
||||||
|
+ styles/prosilver/template/ucp_prefs_view.html
|
||||||
|
+ styles/subsilver2/template/ucp_prefs_view.html
|
||||||
|
* Purpose: Add options to the bottom of the drop-down lists block of the Edit
|
||||||
|
Display Options screen
|
||||||
|
|
||||||
viewtopic_print_head_append
|
viewtopic_print_head_append
|
||||||
===
|
===
|
||||||
* Location: styles/prosilver/template/viewtopic_print.html
|
* Location: styles/prosilver/template/viewtopic_print.html
|
||||||
|
@ -133,6 +253,38 @@ viewtopic_body_footer_before
|
||||||
and quick reply, directly before the jumpbox in Prosilver, breadcrumbs in
|
and quick reply, directly before the jumpbox in Prosilver, breadcrumbs in
|
||||||
Subsilver2.
|
Subsilver2.
|
||||||
|
|
||||||
|
viewtopic_body_post_buttons_after
|
||||||
|
===
|
||||||
|
* Locations:
|
||||||
|
+ styles/prosilver/template/viewtopic_body.html
|
||||||
|
+ styles/subsilver2/template/viewtopic_body.html
|
||||||
|
* Purpose: Add post button to posts (next to edit, quote etc), at the end of
|
||||||
|
the list.
|
||||||
|
|
||||||
|
viewtopic_body_post_buttons_before
|
||||||
|
===
|
||||||
|
* Locations:
|
||||||
|
+ styles/prosilver/template/viewtopic_body.html
|
||||||
|
+ styles/subsilver2/template/viewtopic_body.html
|
||||||
|
* Purpose: Add post button to posts (next to edit, quote etc), at the start of
|
||||||
|
the list.
|
||||||
|
|
||||||
|
viewtopic_body_postrow_custom_fields_after
|
||||||
|
===
|
||||||
|
* Locations:
|
||||||
|
+ styles/prosilver/template/viewtopic_body.html
|
||||||
|
+ styles/subsilver2/template/viewtopic_body.html
|
||||||
|
* Purpose: Add data after the custom fields on the user profile when viewing
|
||||||
|
a post
|
||||||
|
|
||||||
|
viewtopic_body_postrow_custom_fields_before
|
||||||
|
===
|
||||||
|
* Locations:
|
||||||
|
+ styles/prosilver/template/viewtopic_body.html
|
||||||
|
+ styles/subsilver2/template/viewtopic_body.html
|
||||||
|
* Purpose: Add data before the custom fields on the user profile when viewing
|
||||||
|
a post
|
||||||
|
|
||||||
viewtopic_topic_title_prepend
|
viewtopic_topic_title_prepend
|
||||||
===
|
===
|
||||||
* Locations:
|
* Locations:
|
||||||
|
|
|
@ -659,6 +659,13 @@ class acp_board
|
||||||
$auth_tpl = $provider->get_acp_template($this->new_config);
|
$auth_tpl = $provider->get_acp_template($this->new_config);
|
||||||
if ($auth_tpl)
|
if ($auth_tpl)
|
||||||
{
|
{
|
||||||
|
if (array_key_exists('BLOCK_VAR_NAME', $auth_tpl))
|
||||||
|
{
|
||||||
|
foreach ($auth_tpl['BLOCK_VARS'] as $block_vars)
|
||||||
|
{
|
||||||
|
$template->assign_block_vars($auth_tpl['BLOCK_VAR_NAME'], $block_vars);
|
||||||
|
}
|
||||||
|
}
|
||||||
$template->assign_vars($auth_tpl['TEMPLATE_VARS']);
|
$template->assign_vars($auth_tpl['TEMPLATE_VARS']);
|
||||||
$template->assign_block_vars('auth_tpl', array(
|
$template->assign_block_vars('auth_tpl', array(
|
||||||
'TEMPLATE_FILE' => $auth_tpl['TEMPLATE_FILE'],
|
'TEMPLATE_FILE' => $auth_tpl['TEMPLATE_FILE'],
|
||||||
|
|
|
@ -132,11 +132,8 @@ class bbcode
|
||||||
{
|
{
|
||||||
$this->template_bitfield = new bitfield($user->style['bbcode_bitfield']);
|
$this->template_bitfield = new bitfield($user->style['bbcode_bitfield']);
|
||||||
|
|
||||||
$style_resource_locator = new phpbb_style_resource_locator();
|
|
||||||
$style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider(), $phpbb_root_path);
|
|
||||||
$template = new phpbb_template_twig($phpbb_root_path, $phpEx, $config, $user, new phpbb_template_context(), $phpbb_extension_manager);
|
$template = new phpbb_template_twig($phpbb_root_path, $phpEx, $config, $user, new phpbb_template_context(), $phpbb_extension_manager);
|
||||||
$style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider, $template);
|
$template->set_style();
|
||||||
$style->set_style();
|
|
||||||
$template->set_filenames(array('bbcode.html' => 'bbcode.html'));
|
$template->set_filenames(array('bbcode.html' => 'bbcode.html'));
|
||||||
$this->template_filename = $template->get_source_file_for_handle('bbcode.html');
|
$this->template_filename = $template->get_source_file_for_handle('bbcode.html');
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,6 +61,7 @@ define('LOGIN_CONTINUE', 1);
|
||||||
define('LOGIN_BREAK', 2);
|
define('LOGIN_BREAK', 2);
|
||||||
define('LOGIN_SUCCESS', 3);
|
define('LOGIN_SUCCESS', 3);
|
||||||
define('LOGIN_SUCCESS_CREATE_PROFILE', 20);
|
define('LOGIN_SUCCESS_CREATE_PROFILE', 20);
|
||||||
|
define('LOGIN_SUCCESS_LINK_PROFILE', 21);
|
||||||
define('LOGIN_ERROR_USERNAME', 10);
|
define('LOGIN_ERROR_USERNAME', 10);
|
||||||
define('LOGIN_ERROR_PASSWORD', 11);
|
define('LOGIN_ERROR_PASSWORD', 11);
|
||||||
define('LOGIN_ERROR_ACTIVE', 12);
|
define('LOGIN_ERROR_ACTIVE', 12);
|
||||||
|
|
1219
phpBB/includes/db/schema_data.php
Normal file
1219
phpBB/includes/db/schema_data.php
Normal file
File diff suppressed because it is too large
Load diff
|
@ -2413,6 +2413,7 @@ function append_sid($url, $params = false, $is_amp = true, $session_id = false)
|
||||||
{
|
{
|
||||||
global $_SID, $_EXTRA_URL, $phpbb_hook;
|
global $_SID, $_EXTRA_URL, $phpbb_hook;
|
||||||
global $phpbb_dispatcher;
|
global $phpbb_dispatcher;
|
||||||
|
global $symfony_request, $phpbb_root_path;
|
||||||
|
|
||||||
if ($params === '' || (is_array($params) && empty($params)))
|
if ($params === '' || (is_array($params) && empty($params)))
|
||||||
{
|
{
|
||||||
|
@ -2420,6 +2421,12 @@ function append_sid($url, $params = false, $is_amp = true, $session_id = false)
|
||||||
$params = false;
|
$params = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$corrected_path = $symfony_request !== null ? phpbb_get_web_root_path($symfony_request, $phpbb_root_path) : '';
|
||||||
|
if ($corrected_path)
|
||||||
|
{
|
||||||
|
$url = substr($corrected_path . $url, strlen($phpbb_root_path));
|
||||||
|
}
|
||||||
|
|
||||||
$append_sid_overwrite = false;
|
$append_sid_overwrite = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3199,7 +3206,7 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
|
||||||
function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true)
|
function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true)
|
||||||
{
|
{
|
||||||
global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $config;
|
global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $config;
|
||||||
global $request;
|
global $request, $phpbb_container;
|
||||||
|
|
||||||
if (!class_exists('phpbb_captcha_factory', false))
|
if (!class_exists('phpbb_captcha_factory', false))
|
||||||
{
|
{
|
||||||
|
@ -3226,7 +3233,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||||
trigger_error('NO_AUTH_ADMIN');
|
trigger_error('NO_AUTH_ADMIN');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['login']))
|
if ($request->is_set_post('login') || ($request->is_set('login') && $request->variable('login', '') == 'external'))
|
||||||
{
|
{
|
||||||
// Get credential
|
// Get credential
|
||||||
if ($admin)
|
if ($admin)
|
||||||
|
@ -3367,6 +3374,29 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||||
$s_hidden_fields['credential'] = $credential;
|
$s_hidden_fields['credential'] = $credential;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$auth_provider = $phpbb_container->get('auth.provider.' . $config['auth_method']);
|
||||||
|
|
||||||
|
$auth_provider_data = $auth_provider->get_login_data();
|
||||||
|
if ($auth_provider_data)
|
||||||
|
{
|
||||||
|
if (isset($auth_provider_data['VARS']))
|
||||||
|
{
|
||||||
|
$template->assign_vars($auth_provider_data['VARS']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($auth_provider_data['BLOCK_VAR_NAME']))
|
||||||
|
{
|
||||||
|
foreach ($auth_provider_data['BLOCK_VARS'] as $block_vars)
|
||||||
|
{
|
||||||
|
$template->assign_block_vars($auth_provider_data['BLOCK_VAR_NAME'], $block_vars);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'PROVIDER_TEMPLATE_FILE' => $auth_provider_data['TEMPLATE_FILE'],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
$s_hidden_fields = build_hidden_fields($s_hidden_fields);
|
$s_hidden_fields = build_hidden_fields($s_hidden_fields);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
|
@ -5051,7 +5081,7 @@ function phpbb_build_hidden_fields_for_query_params($request, $exclude = null)
|
||||||
function page_header($page_title = '', $display_online_list = true, $item_id = 0, $item = 'forum')
|
function page_header($page_title = '', $display_online_list = true, $item_id = 0, $item = 'forum')
|
||||||
{
|
{
|
||||||
global $db, $config, $template, $SID, $_SID, $_EXTRA_URL, $user, $auth, $phpEx, $phpbb_root_path;
|
global $db, $config, $template, $SID, $_SID, $_EXTRA_URL, $user, $auth, $phpEx, $phpbb_root_path;
|
||||||
global $phpbb_dispatcher, $request, $phpbb_container;
|
global $phpbb_dispatcher, $request, $phpbb_container, $symfony_request;
|
||||||
|
|
||||||
if (defined('HEADER_INC'))
|
if (defined('HEADER_INC'))
|
||||||
{
|
{
|
||||||
|
@ -5208,7 +5238,11 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||||
|
|
||||||
// Determine board url - we may need it later
|
// Determine board url - we may need it later
|
||||||
$board_url = generate_board_url() . '/';
|
$board_url = generate_board_url() . '/';
|
||||||
$web_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? $board_url : $phpbb_root_path;
|
// This path is sent with the base template paths in the assign_vars()
|
||||||
|
// call below. We need to correct it in case we are accessing from a
|
||||||
|
// controller because the web paths will be incorrect otherwise.
|
||||||
|
$corrected_path = $symfony_request !== null ? phpbb_get_web_root_path($symfony_request, $phpbb_root_path) : '';
|
||||||
|
$web_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? $board_url : $corrected_path;
|
||||||
|
|
||||||
// Send a proper content-language to the output
|
// Send a proper content-language to the output
|
||||||
$user_lang = $user->lang['USER_LANG'];
|
$user_lang = $user->lang['USER_LANG'];
|
||||||
|
@ -5390,8 +5424,6 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||||
'T_UPLOAD' => $config['upload_path'],
|
'T_UPLOAD' => $config['upload_path'],
|
||||||
|
|
||||||
'SITE_LOGO_IMG' => $user->img('site_logo'),
|
'SITE_LOGO_IMG' => $user->img('site_logo'),
|
||||||
|
|
||||||
'A_COOKIE_SETTINGS' => addslashes('; path=' . $config['cookie_path'] . ((!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $config['cookie_domain']) . ((!$config['cookie_secure']) ? '' : '; secure')),
|
|
||||||
));
|
));
|
||||||
|
|
||||||
// application/xhtml+xml not used because of IE
|
// application/xhtml+xml not used because of IE
|
||||||
|
@ -5684,6 +5716,16 @@ function phpbb_convert_30_dbms_to_31($dbms)
|
||||||
*/
|
*/
|
||||||
function phpbb_create_symfony_request(phpbb_request $request)
|
function phpbb_create_symfony_request(phpbb_request $request)
|
||||||
{
|
{
|
||||||
|
// If we have already gotten it, don't go back through all the trouble of
|
||||||
|
// creating it again; instead, just return it. This allows multiple calls
|
||||||
|
// of this method so we don't have to globalize $symfony_request in other
|
||||||
|
// functions.
|
||||||
|
static $symfony_request;
|
||||||
|
if (null !== $symfony_request)
|
||||||
|
{
|
||||||
|
return $symfony_request;
|
||||||
|
}
|
||||||
|
|
||||||
// This function is meant to sanitize the global input arrays
|
// This function is meant to sanitize the global input arrays
|
||||||
$sanitizer = function(&$value, $key) {
|
$sanitizer = function(&$value, $key) {
|
||||||
$type_cast_helper = new phpbb_request_type_cast_helper();
|
$type_cast_helper = new phpbb_request_type_cast_helper();
|
||||||
|
@ -5703,21 +5745,45 @@ function phpbb_create_symfony_request(phpbb_request $request)
|
||||||
array_walk_recursive($get_parameters, $sanitizer);
|
array_walk_recursive($get_parameters, $sanitizer);
|
||||||
array_walk_recursive($post_parameters, $sanitizer);
|
array_walk_recursive($post_parameters, $sanitizer);
|
||||||
|
|
||||||
// Until we fix the issue with relative paths, we have to fake path info
|
$symfony_request = new Request($get_parameters, $post_parameters, array(), $cookie_parameters, $files_parameters, $server_parameters);
|
||||||
// to allow urls like app.php?controller=foo/bar
|
return $symfony_request;
|
||||||
$controller = $request->variable('controller', '');
|
}
|
||||||
$path_info = '/' . $controller;
|
|
||||||
$request_uri = $server_parameters['REQUEST_URI'];
|
|
||||||
|
|
||||||
// Remove the query string from REQUEST_URI
|
/**
|
||||||
if ($pos = strpos($request_uri, '?'))
|
* Get a relative root path from the current URL
|
||||||
|
*
|
||||||
|
* @param Request $symfony_request Symfony Request object
|
||||||
|
*/
|
||||||
|
function phpbb_get_web_root_path(Request $symfony_request, $phpbb_root_path = '')
|
||||||
|
{
|
||||||
|
global $phpbb_container;
|
||||||
|
|
||||||
|
static $path;
|
||||||
|
if (null !== $path)
|
||||||
{
|
{
|
||||||
$request_uri = substr($request_uri, 0, $pos);
|
return $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the path info (i.e. controller route) to the REQUEST_URI
|
$path_info = $symfony_request->getPathInfo();
|
||||||
$server_parameters['REQUEST_URI'] = $request_uri . $path_info;
|
if ($path_info === '/')
|
||||||
$server_parameters['SCRIPT_NAME'] = '';
|
{
|
||||||
|
$path = $phpbb_root_path;
|
||||||
|
return $path;
|
||||||
|
}
|
||||||
|
|
||||||
return new Request($get_parameters, $post_parameters, array(), $cookie_parameters, $files_parameters, $server_parameters);
|
$filesystem = $phpbb_container->get('filesystem');
|
||||||
|
$path_info = $filesystem->clean_path($path_info);
|
||||||
|
|
||||||
|
// Do not count / at start of path
|
||||||
|
$corrections = substr_count(substr($path_info, 1), '/');
|
||||||
|
|
||||||
|
// When URL Rewriting is enabled, app.php is optional. We have to
|
||||||
|
// correct for it not being there
|
||||||
|
if (strpos($symfony_request->getRequestUri(), $symfony_request->getScriptName()) === false)
|
||||||
|
{
|
||||||
|
$corrections -= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$path = $phpbb_root_path . str_repeat('../', $corrections);
|
||||||
|
return $path;
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,7 +118,10 @@ function phpbb_create_container(array $extensions, $phpbb_root_path, $php_ext)
|
||||||
*/
|
*/
|
||||||
function phpbb_create_install_container($phpbb_root_path, $php_ext)
|
function phpbb_create_install_container($phpbb_root_path, $php_ext)
|
||||||
{
|
{
|
||||||
$core = new phpbb_di_extension_core($phpbb_root_path);
|
$other_config_path = $phpbb_root_path . 'install/update/new/config/';
|
||||||
|
$config_path = file_exists($other_config_path . 'services.yml') ? $other_config_path : $phpbb_root_path . 'config/';
|
||||||
|
|
||||||
|
$core = new phpbb_di_extension_core($config_path);
|
||||||
$container = phpbb_create_container(array($core), $phpbb_root_path, $php_ext);
|
$container = phpbb_create_container(array($core), $phpbb_root_path, $php_ext);
|
||||||
|
|
||||||
$container->setParameter('core.root_path', $phpbb_root_path);
|
$container->setParameter('core.root_path', $phpbb_root_path);
|
||||||
|
@ -135,6 +138,32 @@ function phpbb_create_install_container($phpbb_root_path, $php_ext)
|
||||||
return $container;
|
return $container;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create updater container
|
||||||
|
*
|
||||||
|
* @param string $phpbb_root_path Root path
|
||||||
|
* @param string $php_ext PHP Extension
|
||||||
|
* @param array $config_path Path to config directory
|
||||||
|
* @return ContainerBuilder object (compiled)
|
||||||
|
*/
|
||||||
|
function phpbb_create_update_container($phpbb_root_path, $php_ext, $config_path)
|
||||||
|
{
|
||||||
|
$config_file = $phpbb_root_path . 'config.' . $php_ext;
|
||||||
|
return phpbb_create_compiled_container(
|
||||||
|
$config_file,
|
||||||
|
array(
|
||||||
|
new phpbb_di_extension_config($config_file),
|
||||||
|
new phpbb_di_extension_core($config_path),
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
new phpbb_di_pass_collection_pass(),
|
||||||
|
new phpbb_di_pass_kernel_pass(),
|
||||||
|
),
|
||||||
|
$phpbb_root_path,
|
||||||
|
$php_ext
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a compiled ContainerBuilder object
|
* Create a compiled ContainerBuilder object
|
||||||
*
|
*
|
||||||
|
@ -146,11 +175,6 @@ function phpbb_create_install_container($phpbb_root_path, $php_ext)
|
||||||
*/
|
*/
|
||||||
function phpbb_create_compiled_container($config_file, array $extensions, array $passes, $phpbb_root_path, $php_ext)
|
function phpbb_create_compiled_container($config_file, array $extensions, array $passes, $phpbb_root_path, $php_ext)
|
||||||
{
|
{
|
||||||
$installed_exts = phpbb_bootstrap_enabled_exts($config_file, $phpbb_root_path);
|
|
||||||
|
|
||||||
// Now pass the enabled extension paths into the ext compiler extension
|
|
||||||
$extensions[] = new phpbb_di_extension_ext($installed_exts);
|
|
||||||
|
|
||||||
// Create the final container to be compiled and cached
|
// Create the final container to be compiled and cached
|
||||||
$container = phpbb_create_container($extensions, $phpbb_root_path, $php_ext);
|
$container = phpbb_create_container($extensions, $phpbb_root_path, $php_ext);
|
||||||
|
|
||||||
|
@ -231,11 +255,14 @@ function phpbb_create_dumped_container_unless_debug($config_file, array $extensi
|
||||||
function phpbb_create_default_container($phpbb_root_path, $php_ext)
|
function phpbb_create_default_container($phpbb_root_path, $php_ext)
|
||||||
{
|
{
|
||||||
$config_file = $phpbb_root_path . 'config.' . $php_ext;
|
$config_file = $phpbb_root_path . 'config.' . $php_ext;
|
||||||
|
$installed_exts = phpbb_bootstrap_enabled_exts($config_file, $phpbb_root_path);
|
||||||
|
|
||||||
return phpbb_create_dumped_container_unless_debug(
|
return phpbb_create_dumped_container_unless_debug(
|
||||||
$config_file,
|
$config_file,
|
||||||
array(
|
array(
|
||||||
new phpbb_di_extension_config($config_file),
|
new phpbb_di_extension_config($config_file),
|
||||||
new phpbb_di_extension_core($phpbb_root_path),
|
new phpbb_di_extension_core($phpbb_root_path . 'config'),
|
||||||
|
new phpbb_di_extension_ext($installed_exts),
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
new phpbb_di_pass_collection_pass(),
|
new phpbb_di_pass_collection_pass(),
|
||||||
|
|
|
@ -413,7 +413,7 @@ function generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text
|
||||||
static $bbcode;
|
static $bbcode;
|
||||||
global $phpbb_dispatcher;
|
global $phpbb_dispatcher;
|
||||||
|
|
||||||
if (!$text)
|
if ($text === '')
|
||||||
{
|
{
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
@ -505,7 +505,7 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb
|
||||||
$uid = $bitfield = '';
|
$uid = $bitfield = '';
|
||||||
$flags = (($allow_bbcode) ? OPTION_FLAG_BBCODE : 0) + (($allow_smilies) ? OPTION_FLAG_SMILIES : 0) + (($allow_urls) ? OPTION_FLAG_LINKS : 0);
|
$flags = (($allow_bbcode) ? OPTION_FLAG_BBCODE : 0) + (($allow_smilies) ? OPTION_FLAG_SMILIES : 0) + (($allow_urls) ? OPTION_FLAG_LINKS : 0);
|
||||||
|
|
||||||
if (!$text)
|
if ($text === '')
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||||
*/
|
*/
|
||||||
class messenger
|
class messenger
|
||||||
{
|
{
|
||||||
var $vars, $msg, $extra_headers, $replyto, $from, $subject;
|
var $msg, $extra_headers, $replyto, $from, $subject;
|
||||||
var $addresses = array();
|
var $addresses = array();
|
||||||
|
|
||||||
var $mail_priority = MAIL_NORMAL_PRIORITY;
|
var $mail_priority = MAIL_NORMAL_PRIORITY;
|
||||||
|
@ -53,7 +53,7 @@ class messenger
|
||||||
function reset()
|
function reset()
|
||||||
{
|
{
|
||||||
$this->addresses = $this->extra_headers = array();
|
$this->addresses = $this->extra_headers = array();
|
||||||
$this->vars = $this->msg = $this->replyto = $this->from = '';
|
$this->msg = $this->replyto = $this->from = '';
|
||||||
$this->mail_priority = MAIL_NORMAL_PRIORITY;
|
$this->mail_priority = MAIL_NORMAL_PRIORITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -258,8 +258,6 @@ class messenger
|
||||||
'body' => $template_file . '.txt',
|
'body' => $template_file . '.txt',
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->vars = $this->template->get_template_vars();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -288,26 +286,11 @@ class messenger
|
||||||
global $config, $user;
|
global $config, $user;
|
||||||
|
|
||||||
// We add some standard variables we always use, no need to specify them always
|
// We add some standard variables we always use, no need to specify them always
|
||||||
if (!isset($this->vars['U_BOARD']))
|
|
||||||
{
|
|
||||||
$this->assign_vars(array(
|
$this->assign_vars(array(
|
||||||
'U_BOARD' => generate_board_url(),
|
'U_BOARD' => generate_board_url(),
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($this->vars['EMAIL_SIG']))
|
|
||||||
{
|
|
||||||
$this->assign_vars(array(
|
|
||||||
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . htmlspecialchars_decode($config['board_email_sig'])),
|
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . htmlspecialchars_decode($config['board_email_sig'])),
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($this->vars['SITENAME']))
|
|
||||||
{
|
|
||||||
$this->assign_vars(array(
|
|
||||||
'SITENAME' => htmlspecialchars_decode($config['sitename']),
|
'SITENAME' => htmlspecialchars_decode($config['sitename']),
|
||||||
));
|
));
|
||||||
}
|
|
||||||
|
|
||||||
// Parse message through template
|
// Parse message through template
|
||||||
$this->msg = trim($this->template->assign_display('body'));
|
$this->msg = trim($this->template->assign_display('body'));
|
||||||
|
@ -660,7 +643,7 @@ class messenger
|
||||||
{
|
{
|
||||||
$this->setup_template();
|
$this->setup_template();
|
||||||
|
|
||||||
$this->template->set_style_names(array($path_name), $paths);
|
$this->template->set_custom_style($path_name, $paths);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -455,7 +455,7 @@ class p_master
|
||||||
*/
|
*/
|
||||||
function load_active($mode = false, $module_url = false, $execute_module = true)
|
function load_active($mode = false, $module_url = false, $execute_module = true)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $user, $phpbb_style;
|
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $user, $template;
|
||||||
|
|
||||||
$module_path = $this->include_path . $this->p_class;
|
$module_path = $this->include_path . $this->p_class;
|
||||||
$icat = request_var('icat', '');
|
$icat = request_var('icat', '');
|
||||||
|
@ -508,7 +508,7 @@ class p_master
|
||||||
|
|
||||||
if (is_dir($module_style_dir))
|
if (is_dir($module_style_dir))
|
||||||
{
|
{
|
||||||
$phpbb_style->set_custom_style('admin', array($module_style_dir, $phpbb_admin_path . 'style'), array(), '');
|
$template->set_custom_style('adm', array($module_style_dir, $phpbb_admin_path . 'style'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -537,7 +537,7 @@ class p_master
|
||||||
|
|
||||||
if (is_dir($phpbb_root_path . $module_style_dir))
|
if (is_dir($phpbb_root_path . $module_style_dir))
|
||||||
{
|
{
|
||||||
$phpbb_style->set_style(array($module_style_dir, 'styles'));
|
$template->set_style(array($module_style_dir, 'styles'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1095,25 +1095,20 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||||
|
|
||||||
$poster_id = $row['user_id'];
|
$poster_id = $row['user_id'];
|
||||||
$post_subject = $row['post_subject'];
|
$post_subject = $row['post_subject'];
|
||||||
$message = censor_text($row['post_text']);
|
|
||||||
|
|
||||||
$decoded_message = false;
|
$decoded_message = false;
|
||||||
|
|
||||||
if ($show_quote_button && $auth->acl_get('f_reply', $forum_id))
|
if ($show_quote_button && $auth->acl_get('f_reply', $forum_id))
|
||||||
{
|
{
|
||||||
$decoded_message = $message;
|
$decoded_message = censor_text($row['post_text']);
|
||||||
decode_message($decoded_message, $row['bbcode_uid']);
|
decode_message($decoded_message, $row['bbcode_uid']);
|
||||||
|
|
||||||
$decoded_message = bbcode_nl2br($decoded_message);
|
$decoded_message = bbcode_nl2br($decoded_message);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($row['bbcode_bitfield'])
|
$parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0);
|
||||||
{
|
$parse_flags |= ($row['enable_smilies'] ? OPTION_FLAG_SMILIES : 0);
|
||||||
$bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
|
$message = generate_text_for_display($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, true);
|
||||||
}
|
|
||||||
|
|
||||||
$message = bbcode_nl2br($message);
|
|
||||||
$message = smiley_text($message, !$row['enable_smilies']);
|
|
||||||
|
|
||||||
if (!empty($attachments[$row['post_id']]))
|
if (!empty($attachments[$row['post_id']]))
|
||||||
{
|
{
|
||||||
|
@ -2171,6 +2166,11 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||||
update_forum_tracking_info($data['forum_id'], $forum_last_post_time, $f_mark_time, false);
|
update_forum_tracking_info($data['forum_id'], $forum_last_post_time, $f_mark_time, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If a username was supplied or the poster is a guest, we will use the supplied username.
|
||||||
|
// Doing it this way we can use "...post by guest-username..." in notifications when
|
||||||
|
// "guest-username" is supplied or ommit the username if it is not.
|
||||||
|
$username = ($username !== '' || !$user->data['is_registered']) ? $username : $user->data['username'];
|
||||||
|
|
||||||
// Send Notifications
|
// Send Notifications
|
||||||
$notification_data = array_merge($data, array(
|
$notification_data = array_merge($data, array(
|
||||||
'topic_title' => (isset($data['topic_title'])) ? $data['topic_title'] : $subject,
|
'topic_title' => (isset($data['topic_title'])) ? $data['topic_title'] : $subject,
|
||||||
|
|
|
@ -2019,13 +2019,10 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
|
||||||
$decoded_message = bbcode_nl2br($decoded_message);
|
$decoded_message = bbcode_nl2br($decoded_message);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($row['bbcode_bitfield'])
|
$parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0);
|
||||||
{
|
$parse_flags |= ($row['enable_smilies'] ? OPTION_FLAG_SMILIES : 0);
|
||||||
$bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$message = bbcode_nl2br($message);
|
$message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, false);
|
||||||
$message = smiley_text($message, !$row['enable_smilies']);
|
|
||||||
|
|
||||||
$subject = censor_text($subject);
|
$subject = censor_text($subject);
|
||||||
|
|
||||||
|
|
|
@ -2534,7 +2534,7 @@ function group_delete($group_id, $group_name = false)
|
||||||
*/
|
*/
|
||||||
function group_user_add($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $default = false, $leader = 0, $pending = 0, $group_attributes = false)
|
function group_user_add($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $default = false, $leader = 0, $pending = 0, $group_attributes = false)
|
||||||
{
|
{
|
||||||
global $db, $auth;
|
global $db, $auth, $phpbb_container;
|
||||||
|
|
||||||
// We need both username and user_id info
|
// We need both username and user_id info
|
||||||
$result = user_get_id_name($user_id_ary, $username_ary);
|
$result = user_get_id_name($user_id_ary, $username_ary);
|
||||||
|
@ -2622,6 +2622,20 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
|
||||||
|
|
||||||
group_update_listings($group_id);
|
group_update_listings($group_id);
|
||||||
|
|
||||||
|
if ($pending)
|
||||||
|
{
|
||||||
|
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||||
|
|
||||||
|
foreach ($add_id_ary as $user_id)
|
||||||
|
{
|
||||||
|
$phpbb_notifications->add_notifications('group_request', array(
|
||||||
|
'group_id' => $group_id,
|
||||||
|
'user_id' => $user_id,
|
||||||
|
'group_name' => $group_name,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Return false - no error
|
// Return false - no error
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2635,7 +2649,7 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
|
||||||
*/
|
*/
|
||||||
function group_user_del($group_id, $user_id_ary = false, $username_ary = false, $group_name = false)
|
function group_user_del($group_id, $user_id_ary = false, $username_ary = false, $group_name = false)
|
||||||
{
|
{
|
||||||
global $db, $auth, $config, $phpbb_dispatcher;
|
global $db, $auth, $config, $phpbb_dispatcher, $phpbb_container;
|
||||||
|
|
||||||
if ($config['coppa_enable'])
|
if ($config['coppa_enable'])
|
||||||
{
|
{
|
||||||
|
@ -2769,6 +2783,10 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
|
||||||
|
|
||||||
group_update_listings($group_id);
|
group_update_listings($group_id);
|
||||||
|
|
||||||
|
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||||
|
|
||||||
|
$phpbb_notifications->delete_notifications('group_request', $user_id_ary, $group_id);
|
||||||
|
|
||||||
// Return false - no error
|
// Return false - no error
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2858,7 +2876,7 @@ function remove_default_rank($group_id, $user_ids)
|
||||||
*/
|
*/
|
||||||
function group_user_attributes($action, $group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $group_attributes = false)
|
function group_user_attributes($action, $group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $group_attributes = false)
|
||||||
{
|
{
|
||||||
global $db, $auth, $phpbb_root_path, $phpEx, $config;
|
global $db, $auth, $phpbb_root_path, $phpEx, $config, $phpbb_container;
|
||||||
|
|
||||||
// We need both username and user_id info
|
// We need both username and user_id info
|
||||||
$result = user_get_id_name($user_id_ary, $username_ary);
|
$result = user_get_id_name($user_id_ary, $username_ary);
|
||||||
|
@ -2911,11 +2929,10 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
|
||||||
AND ' . $db->sql_in_set('ug.user_id', $user_id_ary);
|
AND ' . $db->sql_in_set('ug.user_id', $user_id_ary);
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
$user_id_ary = $email_users = array();
|
$user_id_ary = array();
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$user_id_ary[] = $row['user_id'];
|
$user_id_ary[] = $row['user_id'];
|
||||||
$email_users[] = $row;
|
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
@ -2930,26 +2947,14 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
|
||||||
AND " . $db->sql_in_set('user_id', $user_id_ary);
|
AND " . $db->sql_in_set('user_id', $user_id_ary);
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
// Send approved email to users...
|
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||||
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
|
||||||
$messenger = new messenger();
|
|
||||||
|
|
||||||
foreach ($email_users as $row)
|
$phpbb_notifications->add_notifications('group_request_approved', array(
|
||||||
{
|
'user_ids' => $user_id_ary,
|
||||||
$messenger->template('group_approved', $row['user_lang']);
|
'group_id' => $group_id,
|
||||||
|
'group_name' => $group_name,
|
||||||
$messenger->set_addresses($row);
|
));
|
||||||
|
$phpbb_notifications->delete_notifications('group_request', $user_id_ary, $group_id);
|
||||||
$messenger->assign_vars(array(
|
|
||||||
'USERNAME' => htmlspecialchars_decode($row['username']),
|
|
||||||
'GROUP_NAME' => htmlspecialchars_decode($group_name),
|
|
||||||
'U_GROUP' => generate_board_url() . "/ucp.$phpEx?i=groups&mode=membership")
|
|
||||||
);
|
|
||||||
|
|
||||||
$messenger->send($row['user_notify_type']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$messenger->save_queue();
|
|
||||||
|
|
||||||
$log = 'LOG_USERS_APPROVED';
|
$log = 'LOG_USERS_APPROVED';
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -115,17 +115,9 @@ class mcp_pm_reports
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process message, leave it uncensored
|
// Process message, leave it uncensored
|
||||||
$message = $pm_info['message_text'];
|
$parse_flags = ($pm_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
|
||||||
|
$message = generate_text_for_display($pm_info['message_text'], $pm_info['bbcode_uid'], $pm_info['bbcode_bitfield'], $parse_flags, false);
|
||||||
|
|
||||||
if ($pm_info['bbcode_bitfield'])
|
|
||||||
{
|
|
||||||
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
|
||||||
$bbcode = new bbcode($pm_info['bbcode_bitfield']);
|
|
||||||
$bbcode->bbcode_second_pass($message, $pm_info['bbcode_uid'], $pm_info['bbcode_bitfield']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$message = bbcode_nl2br($message);
|
|
||||||
$message = smiley_text($message);
|
|
||||||
$report['report_text'] = make_clickable(bbcode_nl2br($report['report_text']));
|
$report['report_text'] = make_clickable(bbcode_nl2br($report['report_text']));
|
||||||
|
|
||||||
if ($pm_info['message_attachment'] && $auth->acl_get('u_pm_download'))
|
if ($pm_info['message_attachment'] && $auth->acl_get('u_pm_download'))
|
||||||
|
@ -169,6 +161,7 @@ class mcp_pm_reports
|
||||||
'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=pm_reports&mode=pm_report_details&r=' . $report_id),
|
'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=pm_reports&mode=pm_report_details&r=' . $report_id),
|
||||||
'S_CAN_VIEWIP' => $auth->acl_getf_global('m_info'),
|
'S_CAN_VIEWIP' => $auth->acl_getf_global('m_info'),
|
||||||
'S_POST_REPORTED' => $pm_info['message_reported'],
|
'S_POST_REPORTED' => $pm_info['message_reported'],
|
||||||
|
'S_REPORT_CLOSED' => $report['report_closed'],
|
||||||
'S_USER_NOTES' => true,
|
'S_USER_NOTES' => true,
|
||||||
|
|
||||||
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=pm_reports&mode=pm_report_details&r=' . $report_id),
|
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=pm_reports&mode=pm_report_details&r=' . $report_id),
|
||||||
|
|
|
@ -125,17 +125,8 @@ function mcp_post_details($id, $mode, $action)
|
||||||
$post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false;
|
$post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false;
|
||||||
|
|
||||||
// Process message, leave it uncensored
|
// Process message, leave it uncensored
|
||||||
$message = $post_info['post_text'];
|
$parse_flags = ($post_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
|
||||||
|
$message = generate_text_for_display($post_info['post_text'], $post_info['bbcode_uid'], $post_info['bbcode_bitfield'], $parse_flags, false);
|
||||||
if ($post_info['bbcode_bitfield'])
|
|
||||||
{
|
|
||||||
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
|
||||||
$bbcode = new bbcode($post_info['bbcode_bitfield']);
|
|
||||||
$bbcode->bbcode_second_pass($message, $post_info['bbcode_uid'], $post_info['bbcode_bitfield']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$message = bbcode_nl2br($message);
|
|
||||||
$message = smiley_text($message);
|
|
||||||
|
|
||||||
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
|
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
|
||||||
{
|
{
|
||||||
|
|
|
@ -206,17 +206,8 @@ class mcp_queue
|
||||||
$post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false;
|
$post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false;
|
||||||
|
|
||||||
// Process message, leave it uncensored
|
// Process message, leave it uncensored
|
||||||
$message = $post_info['post_text'];
|
$parse_flags = ($post_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
|
||||||
|
$message = generate_text_for_display($post_info['post_text'], $post_info['bbcode_uid'], $post_info['bbcode_bitfield'], $parse_flags, false);
|
||||||
if ($post_info['bbcode_bitfield'])
|
|
||||||
{
|
|
||||||
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
|
||||||
$bbcode = new bbcode($post_info['bbcode_bitfield']);
|
|
||||||
$bbcode->bbcode_second_pass($message, $post_info['bbcode_uid'], $post_info['bbcode_bitfield']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$message = bbcode_nl2br($message);
|
|
||||||
$message = smiley_text($message);
|
|
||||||
|
|
||||||
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
|
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
|
||||||
{
|
{
|
||||||
|
|
|
@ -187,8 +187,9 @@ class mcp_reports
|
||||||
'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||||
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
|
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
|
||||||
'S_POST_REPORTED' => $post_info['post_reported'],
|
'S_POST_REPORTED' => $post_info['post_reported'],
|
||||||
'S_POST_UNAPPROVED' => ($post_info['post_visibility'] == POST_UNAPPROVED),
|
'S_POST_UNAPPROVED' => ($post_info['post_visibility'] == ITEM_UNAPPROVED),
|
||||||
'S_POST_LOCKED' => $post_info['post_edit_locked'],
|
'S_POST_LOCKED' => $post_info['post_edit_locked'],
|
||||||
|
'S_REPORT_CLOSED' => $report['report_closed'],
|
||||||
'S_USER_NOTES' => true,
|
'S_USER_NOTES' => true,
|
||||||
|
|
||||||
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '',
|
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '',
|
||||||
|
|
|
@ -207,13 +207,8 @@ function mcp_topic_view($id, $mode, $action)
|
||||||
$message = $row['post_text'];
|
$message = $row['post_text'];
|
||||||
$post_subject = ($row['post_subject'] != '') ? $row['post_subject'] : $topic_info['topic_title'];
|
$post_subject = ($row['post_subject'] != '') ? $row['post_subject'] : $topic_info['topic_title'];
|
||||||
|
|
||||||
if ($row['bbcode_bitfield'])
|
$parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
|
||||||
{
|
$message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, false);
|
||||||
$bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$message = bbcode_nl2br($message);
|
|
||||||
$message = smiley_text($message);
|
|
||||||
|
|
||||||
if (!empty($attachments[$row['post_id']]))
|
if (!empty($attachments[$row['post_id']]))
|
||||||
{
|
{
|
||||||
|
@ -674,10 +669,10 @@ function merge_posts($topic_id, $to_topic_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the topic no longer exist, we will update the topic watch table.
|
// If the topic no longer exist, we will update the topic watch table.
|
||||||
phpbb_update_rows_avoiding_duplicates_notify_status($db, TOPICS_WATCH_TABLE, 'topic_id', $topic_ids, $to_topic_id);
|
phpbb_update_rows_avoiding_duplicates_notify_status($db, TOPICS_WATCH_TABLE, 'topic_id', array($topic_id), $to_topic_id);
|
||||||
|
|
||||||
// If the topic no longer exist, we will update the bookmarks table.
|
// If the topic no longer exist, we will update the bookmarks table.
|
||||||
phpbb_update_rows_avoiding_duplicates($db, BOOKMARKS_TABLE, 'topic_id', $topic_id, $to_topic_id);
|
phpbb_update_rows_avoiding_duplicates($db, BOOKMARKS_TABLE, 'topic_id', array($topic_id), $to_topic_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Link to the new topic
|
// Link to the new topic
|
||||||
|
|
|
@ -289,19 +289,8 @@ class mcp_warn
|
||||||
|
|
||||||
// We want to make the message available here as a reminder
|
// We want to make the message available here as a reminder
|
||||||
// Parse the message and subject
|
// Parse the message and subject
|
||||||
$message = censor_text($user_row['post_text']);
|
$parse_flags = OPTION_FLAG_SMILIES | ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0);
|
||||||
|
$message = generate_text_for_display($user_row['post_text'], $user_row['bbcode_uid'], $user_row['bbcode_bitfield'], $parse_flags, true);
|
||||||
// Second parse bbcode here
|
|
||||||
if ($user_row['bbcode_bitfield'])
|
|
||||||
{
|
|
||||||
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
|
||||||
|
|
||||||
$bbcode = new bbcode($user_row['bbcode_bitfield']);
|
|
||||||
$bbcode->bbcode_second_pass($message, $user_row['bbcode_uid'], $user_row['bbcode_bitfield']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$message = bbcode_nl2br($message);
|
|
||||||
$message = smiley_text($message);
|
|
||||||
|
|
||||||
// Generate the appropriate user information for the user we are looking at
|
// Generate the appropriate user information for the user we are looking at
|
||||||
if (!function_exists('phpbb_get_user_avatar'))
|
if (!function_exists('phpbb_get_user_avatar'))
|
||||||
|
|
34
phpBB/includes/ucp/info/ucp_auth_link.php
Normal file
34
phpBB/includes/ucp/info/ucp_auth_link.php
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package ucp
|
||||||
|
* @copyright (c) 2013 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package module_install
|
||||||
|
*/
|
||||||
|
class ucp_auth_link_info
|
||||||
|
{
|
||||||
|
function module()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'filename' => 'ucp_auth_link',
|
||||||
|
'title' => 'UCP_AUTH_LINK',
|
||||||
|
'version' => '1.0.0',
|
||||||
|
'modes' => array(
|
||||||
|
'auth_link' => array('title' => 'UCP_AUTH_LINK_MANAGE', 'auth' => '', 'cat' => array('UCP_PROFILE')),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function install()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
function uninstall()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
142
phpBB/includes/ucp/ucp_auth_link.php
Normal file
142
phpBB/includes/ucp/ucp_auth_link.php
Normal file
|
@ -0,0 +1,142 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package ucp
|
||||||
|
* @copyright (c) 2013 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
|
if (!defined('IN_PHPBB'))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
class ucp_auth_link
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $u_action;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates the ucp_auth_link page and handles the auth link process
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @param string $mode
|
||||||
|
*/
|
||||||
|
public function main($id, $mode)
|
||||||
|
{
|
||||||
|
global $config, $request, $template, $phpbb_container, $user;
|
||||||
|
|
||||||
|
$error = array();
|
||||||
|
|
||||||
|
$auth_provider = $phpbb_container->get('auth.provider.' . $config['auth_method']);
|
||||||
|
|
||||||
|
// confirm that the auth provider supports this page
|
||||||
|
$provider_data = $auth_provider->get_auth_link_data();
|
||||||
|
if ($provider_data === null)
|
||||||
|
{
|
||||||
|
$error[] = 'UCP_AUTH_LINK_NOT_SUPPORTED';
|
||||||
|
}
|
||||||
|
|
||||||
|
$s_hidden_fields = array();
|
||||||
|
add_form_key('ucp_auth_link');
|
||||||
|
|
||||||
|
$submit = $request->variable('submit', false, false, phpbb_request_interface::POST);
|
||||||
|
|
||||||
|
// This path is only for primary actions
|
||||||
|
if (!sizeof($error) && $submit)
|
||||||
|
{
|
||||||
|
if (!check_form_key('ucp_auth_link'))
|
||||||
|
{
|
||||||
|
$error[] = 'FORM_INVALID';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!sizeof($error))
|
||||||
|
{
|
||||||
|
// Any post data could be necessary for auth (un)linking
|
||||||
|
$link_data = $request->get_super_global(phpbb_request_interface::POST);
|
||||||
|
|
||||||
|
// The current user_id is also necessary
|
||||||
|
$link_data['user_id'] = $user->data['user_id'];
|
||||||
|
|
||||||
|
// Tell the provider that the method is auth_link not login_link
|
||||||
|
$link_data['link_method'] = 'auth_link';
|
||||||
|
|
||||||
|
if ($request->variable('link', 0, false, phpbb_request_interface::POST))
|
||||||
|
{
|
||||||
|
$error[] = $auth_provider->link_account($link_data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$error[] = $auth_provider->unlink_account($link_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Template data may have changed, get new data
|
||||||
|
$provider_data = $auth_provider->get_auth_link_data();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// In some cases, a request to an external server may be required. In
|
||||||
|
// these cases, the GET parameter 'link' should exist and should be true
|
||||||
|
if ($request->variable('link', false))
|
||||||
|
{
|
||||||
|
// In this case the link data should only be populated with the
|
||||||
|
// link_method as the provider dictates how data is returned to it.
|
||||||
|
$link_data = array('link_method' => 'auth_link');
|
||||||
|
|
||||||
|
$error[] = $auth_provider->link_account($link_data);
|
||||||
|
|
||||||
|
// Template data may have changed, get new data
|
||||||
|
$provider_data = $auth_provider->get_auth_link_data();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($provider_data['VARS']))
|
||||||
|
{
|
||||||
|
// Handle hidden fields separately
|
||||||
|
if (isset($provider_data['VARS']['HIDDEN_FIELDS']))
|
||||||
|
{
|
||||||
|
$s_hidden_fields = array_merge($s_hidden_fields, $provider_data['VARS']['HIDDEN_FIELDS']);
|
||||||
|
unset($provider_data['VARS']['HIDDEN_FIELDS']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign_vars($provider_data['VARS']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($provider_data['BLOCK_VAR_NAME']))
|
||||||
|
{
|
||||||
|
foreach ($provider_data['BLOCK_VARS'] as $block_vars)
|
||||||
|
{
|
||||||
|
// See if there are additional hidden fields. This should be an associative array
|
||||||
|
if (isset($block_vars['HIDDEN_FIELDS']))
|
||||||
|
{
|
||||||
|
$block_vars['HIDDEN_FIELDS'] = build_hidden_fields($block_vars['HIDDEN_FIELDS']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign_block_vars($provider_data['BLOCK_VAR_NAME'], $block_vars);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$s_hidden_fields = build_hidden_fields($s_hidden_fields);
|
||||||
|
|
||||||
|
// Replace "error" strings with their real, localised form
|
||||||
|
$error = array_map(array($user, 'lang'), $error);
|
||||||
|
$error = implode('<br />', $error);
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'ERROR' => $error,
|
||||||
|
|
||||||
|
'PROVIDER_TEMPLATE_FILE' => $provider_data['TEMPLATE_FILE'],
|
||||||
|
|
||||||
|
'S_HIDDEN_FIELDS' => $s_hidden_fields,
|
||||||
|
'S_UCP_ACTION' => $this->u_action,
|
||||||
|
));
|
||||||
|
|
||||||
|
$this->tpl_name = 'ucp_auth_link';
|
||||||
|
$this->page_title = 'UCP_AUTH_LINK';
|
||||||
|
}
|
||||||
|
}
|
|
@ -197,37 +197,6 @@ class ucp_groups
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
group_user_add($group_id, $user->data['user_id'], false, false, false, 0, 1);
|
group_user_add($group_id, $user->data['user_id'], false, false, false, 0, 1);
|
||||||
|
|
||||||
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
|
||||||
$messenger = new messenger();
|
|
||||||
|
|
||||||
$sql = 'SELECT u.username, u.username_clean, u.user_email, u.user_notify_type, u.user_jabber, u.user_lang
|
|
||||||
FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . " u
|
|
||||||
WHERE ug.user_id = u.user_id
|
|
||||||
AND ug.group_leader = 1
|
|
||||||
AND ug.group_id = $group_id";
|
|
||||||
$result = $db->sql_query($sql);
|
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
|
||||||
{
|
|
||||||
$messenger->template('group_request', $row['user_lang']);
|
|
||||||
|
|
||||||
$messenger->set_addresses($row);
|
|
||||||
|
|
||||||
$messenger->assign_vars(array(
|
|
||||||
'USERNAME' => htmlspecialchars_decode($row['username']),
|
|
||||||
'GROUP_NAME' => htmlspecialchars_decode($group_row[$group_id]['group_name']),
|
|
||||||
'REQUEST_USERNAME' => $user->data['username'],
|
|
||||||
|
|
||||||
'U_PENDING' => generate_board_url() . "/ucp.$phpEx?i=groups&mode=manage&action=list&g=$group_id",
|
|
||||||
'U_GROUP' => generate_board_url() . "/memberlist.$phpEx?mode=group&g=$group_id")
|
|
||||||
);
|
|
||||||
|
|
||||||
$messenger->send($row['user_notify_type']);
|
|
||||||
}
|
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
$messenger->save_queue();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
add_log('user', $user->data['user_id'], 'LOG_USER_GROUP_JOIN' . (($group_row[$group_id]['group_type'] == GROUP_FREE) ? '' : '_PENDING'), $group_row[$group_id]['group_name']);
|
add_log('user', $user->data['user_id'], 'LOG_USER_GROUP_JOIN' . (($group_row[$group_id]['group_type'] == GROUP_FREE) ? '' : '_PENDING'), $group_row[$group_id]['group_name']);
|
||||||
|
|
243
phpBB/includes/ucp/ucp_login_link.php
Normal file
243
phpBB/includes/ucp/ucp_login_link.php
Normal file
|
@ -0,0 +1,243 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package ucp
|
||||||
|
* @copyright (c) 2013 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
|
if (!defined('IN_PHPBB'))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucp_login_link
|
||||||
|
* Allows users of external accounts link those accounts to their phpBB accounts
|
||||||
|
* during an attempted login.
|
||||||
|
* @package ucp
|
||||||
|
*/
|
||||||
|
class ucp_login_link
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $u_action;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates the ucp_login_link page and handles login link process
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @param string $mode
|
||||||
|
*/
|
||||||
|
function main($id, $mode)
|
||||||
|
{
|
||||||
|
global $config, $phpbb_container, $request, $template, $user;
|
||||||
|
global $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
|
// Initialize necessary variables
|
||||||
|
$login_error = null;
|
||||||
|
$login_link_error = null;
|
||||||
|
$login_username = null;
|
||||||
|
|
||||||
|
// Build the data array
|
||||||
|
$data = $this->get_login_link_data_array();
|
||||||
|
|
||||||
|
// Ensure the person was sent here with login_link data
|
||||||
|
if (empty($data))
|
||||||
|
{
|
||||||
|
$login_link_error = $user->lang['LOGIN_LINK_NO_DATA_PROVIDED'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use the auth_provider requested even if different from configured
|
||||||
|
$auth_provider = 'auth.provider.' . $request->variable('auth_provider', $config['auth_method']);
|
||||||
|
$auth_provider = $phpbb_container->get($auth_provider);
|
||||||
|
|
||||||
|
// Set the link_method to login_link
|
||||||
|
$data['link_method'] = 'login_link';
|
||||||
|
|
||||||
|
// Have the authentication provider check that all necessary data is available
|
||||||
|
$result = $auth_provider->login_link_has_necessary_data($data);
|
||||||
|
if ($result !== null)
|
||||||
|
{
|
||||||
|
$login_link_error = $user->lang[$result];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Perform link action if there is no error
|
||||||
|
if (!$login_link_error)
|
||||||
|
{
|
||||||
|
if ($request->is_set_post('login'))
|
||||||
|
{
|
||||||
|
$login_username = $request->variable('login_username', '', false, phpbb_request_interface::POST);
|
||||||
|
$login_password = $request->untrimmed_variable('login_password', '', true, phpbb_request_interface::POST);
|
||||||
|
|
||||||
|
$login_result = $auth_provider->login($login_username, $login_password);
|
||||||
|
|
||||||
|
// We only care if there is or is not an error
|
||||||
|
$login_error = $this->process_login_result($login_result);
|
||||||
|
|
||||||
|
if (!$login_error)
|
||||||
|
{
|
||||||
|
// Give the user_id to the data
|
||||||
|
$data['user_id'] = $login_result['user_row']['user_id'];
|
||||||
|
|
||||||
|
// The user is now logged in, attempt to link the user to the external account
|
||||||
|
$result = $auth_provider->link_account($data);
|
||||||
|
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
$login_link_error = $user->lang[$result];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Finish login
|
||||||
|
$result = $user->session_create($login_result['user_row']['user_id'], false, false, true);
|
||||||
|
|
||||||
|
// Perform a redirect as the account has been linked
|
||||||
|
$this->perform_redirect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
// Common template elements
|
||||||
|
'LOGIN_LINK_ERROR' => $login_link_error,
|
||||||
|
'PASSWORD_CREDENTIAL' => 'login_password',
|
||||||
|
'USERNAME_CREDENTIAL' => 'login_username',
|
||||||
|
'S_HIDDEN_FIELDS' => $this->get_hidden_fields($data),
|
||||||
|
|
||||||
|
// Registration elements
|
||||||
|
'REGISTER_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'),
|
||||||
|
|
||||||
|
// Login elements
|
||||||
|
'LOGIN_ERROR' => $login_error,
|
||||||
|
'LOGIN_USERNAME' => $login_username,
|
||||||
|
));
|
||||||
|
|
||||||
|
$this->tpl_name = 'ucp_login_link';
|
||||||
|
$this->page_title = 'UCP_LOGIN_LINK';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds the hidden fields string from the data array.
|
||||||
|
*
|
||||||
|
* @param array $data This function only includes data in the array
|
||||||
|
* that has a key that begins with 'login_link_'
|
||||||
|
* @return string A string of hidden fields that can be included in the
|
||||||
|
* template
|
||||||
|
*/
|
||||||
|
protected function get_hidden_fields($data)
|
||||||
|
{
|
||||||
|
$fields = array();
|
||||||
|
|
||||||
|
foreach ($data as $key => $value)
|
||||||
|
{
|
||||||
|
$fields['login_link_' . $key] = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return build_hidden_fields($fields);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds the login_link data array
|
||||||
|
*
|
||||||
|
* @return array All login_link data. This is all GET data whose names
|
||||||
|
* begin with 'login_link_'
|
||||||
|
*/
|
||||||
|
protected function get_login_link_data_array()
|
||||||
|
{
|
||||||
|
global $request;
|
||||||
|
|
||||||
|
$var_names = $request->variable_names(phpbb_request_interface::GET);
|
||||||
|
$login_link_data = array();
|
||||||
|
$string_start_length = strlen('login_link_');
|
||||||
|
|
||||||
|
foreach ($var_names as $var_name)
|
||||||
|
{
|
||||||
|
if (strpos($var_name, 'login_link_') === 0)
|
||||||
|
{
|
||||||
|
$key_name = substr($var_name, $string_start_length);
|
||||||
|
$login_link_data[$key_name] = $request->variable($var_name, '', false, phpbb_request_interface::GET);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $login_link_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Processes the result array from the login process
|
||||||
|
* @param array $result The login result array
|
||||||
|
* @return string|null If there was an error in the process, a string is
|
||||||
|
* returned. If the login was successful, then null is
|
||||||
|
* returned.
|
||||||
|
*/
|
||||||
|
protected function process_login_result($result)
|
||||||
|
{
|
||||||
|
global $config, $request, $template, $user;
|
||||||
|
|
||||||
|
$login_error = null;
|
||||||
|
|
||||||
|
if ($result['status'] != LOGIN_SUCCESS)
|
||||||
|
{
|
||||||
|
// Handle all errors first
|
||||||
|
if ($result['status'] == LOGIN_BREAK)
|
||||||
|
{
|
||||||
|
trigger_error($result['error_msg']);
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($result['status'])
|
||||||
|
{
|
||||||
|
case LOGIN_ERROR_ATTEMPTS:
|
||||||
|
|
||||||
|
$captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']);
|
||||||
|
$captcha->init(CONFIRM_LOGIN);
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'CAPTCHA_TEMPLATE' => $captcha->get_template(),
|
||||||
|
));
|
||||||
|
|
||||||
|
$login_error = $user->lang[$result['error_msg']];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LOGIN_ERROR_PASSWORD_CONVERT:
|
||||||
|
$login_error = sprintf(
|
||||||
|
$user->lang[$result['error_msg']],
|
||||||
|
($config['email_enable']) ? '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') . '">' : '',
|
||||||
|
($config['email_enable']) ? '</a>' : '',
|
||||||
|
($config['board_contact']) ? '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">' : '',
|
||||||
|
($config['board_contact']) ? '</a>' : ''
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Username, password, etc...
|
||||||
|
default:
|
||||||
|
$login_error = $user->lang[$result['error_msg']];
|
||||||
|
|
||||||
|
// Assign admin contact to some error messages
|
||||||
|
if ($result['error_msg'] == 'LOGIN_ERROR_USERNAME' || $result['error_msg'] == 'LOGIN_ERROR_PASSWORD')
|
||||||
|
{
|
||||||
|
$login_error = (!$config['board_contact']) ? sprintf($user->lang[$result['error_msg']], '', '') : sprintf($user->lang[$result['error_msg']], '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>');
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $login_error;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Performs a post login redirect
|
||||||
|
*/
|
||||||
|
protected function perform_redirect()
|
||||||
|
{
|
||||||
|
global $phpbb_root_path, $phpEx;
|
||||||
|
$url = append_sid($phpbb_root_path . 'index.' . $phpEx);
|
||||||
|
redirect($url);
|
||||||
|
}
|
||||||
|
}
|
|
@ -76,17 +76,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||||
$user_info = get_user_information($author_id, $message_row);
|
$user_info = get_user_information($author_id, $message_row);
|
||||||
|
|
||||||
// Parse the message and subject
|
// Parse the message and subject
|
||||||
$message = censor_text($message_row['message_text']);
|
$parse_flags = ($message_row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
|
||||||
|
$message = generate_text_for_display($message_row['message_text'], $message_row['bbcode_uid'], $message_row['bbcode_bitfield'], $parse_flags, true);
|
||||||
// Second parse bbcode here
|
|
||||||
if ($message_row['bbcode_bitfield'])
|
|
||||||
{
|
|
||||||
$bbcode->bbcode_second_pass($message, $message_row['bbcode_uid'], $message_row['bbcode_bitfield']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Always process smilies after parsing bbcodes
|
|
||||||
$message = bbcode_nl2br($message);
|
|
||||||
$message = smiley_text($message);
|
|
||||||
|
|
||||||
// Replace naughty words such as farty pants
|
// Replace naughty words such as farty pants
|
||||||
$message_row['message_subject'] = censor_text($message_row['message_subject']);
|
$message_row['message_subject'] = censor_text($message_row['message_subject']);
|
||||||
|
@ -160,21 +151,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||||
// End signature parsing, only if needed
|
// End signature parsing, only if needed
|
||||||
if ($signature)
|
if ($signature)
|
||||||
{
|
{
|
||||||
$signature = censor_text($signature);
|
$parse_flags = ($user_info['user_sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
|
||||||
|
$signature = generate_text_for_display($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield'], $parse_flags, true);
|
||||||
if ($user_info['user_sig_bbcode_bitfield'])
|
|
||||||
{
|
|
||||||
if ($bbcode === false)
|
|
||||||
{
|
|
||||||
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
|
||||||
$bbcode = new bbcode($user_info['user_sig_bbcode_bitfield']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$bbcode->bbcode_second_pass($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$signature = bbcode_nl2br($signature);
|
|
||||||
$signature = smiley_text($signature);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm');
|
$url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm');
|
||||||
|
|
|
@ -26,7 +26,7 @@ class ucp_prefs
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
|
global $config, $db, $user, $auth, $template, $phpbb_dispatcher, $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
$submit = (isset($_POST['submit'])) ? true : false;
|
$submit = (isset($_POST['submit'])) ? true : false;
|
||||||
$error = $data = array();
|
$error = $data = array();
|
||||||
|
@ -55,6 +55,20 @@ class ucp_prefs
|
||||||
$data['notifymethod'] = NOTIFY_BOTH;
|
$data['notifymethod'] = NOTIFY_BOTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add UCP edit global settings data before they are assigned to the template or submitted
|
||||||
|
*
|
||||||
|
* To assign data to the template, use $template->assign_vars()
|
||||||
|
*
|
||||||
|
* @event core.ucp_prefs_personal_data
|
||||||
|
* @var bool submit Do we display the form only
|
||||||
|
* or did the user press submit
|
||||||
|
* @var array data Array with current ucp options data
|
||||||
|
* @since 3.1-A1
|
||||||
|
*/
|
||||||
|
$vars = array('submit', 'data');
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.ucp_prefs_personal_data', compact($vars)));
|
||||||
|
|
||||||
if ($submit)
|
if ($submit)
|
||||||
{
|
{
|
||||||
if ($config['override_user_style'])
|
if ($config['override_user_style'])
|
||||||
|
@ -93,6 +107,17 @@ class ucp_prefs
|
||||||
'user_style' => $data['style'],
|
'user_style' => $data['style'],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update UCP edit global settings data on form submit
|
||||||
|
*
|
||||||
|
* @event core.ucp_prefs_personal_update_data
|
||||||
|
* @var array data Submitted display options data
|
||||||
|
* @var array sql_ary Display options data we udpate
|
||||||
|
* @since 3.1-A1
|
||||||
|
*/
|
||||||
|
$vars = array('data', 'sql_ary');
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.ucp_prefs_personal_update_data', compact($vars)));
|
||||||
|
|
||||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||||
WHERE user_id = ' . $user->data['user_id'];
|
WHERE user_id = ' . $user->data['user_id'];
|
||||||
|
@ -209,6 +234,20 @@ class ucp_prefs
|
||||||
'wordcensor' => request_var('wordcensor', (bool) $user->optionget('viewcensors')),
|
'wordcensor' => request_var('wordcensor', (bool) $user->optionget('viewcensors')),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add UCP edit display options data before they are assigned to the template or submitted
|
||||||
|
*
|
||||||
|
* To assign data to the template, use $template->assign_vars()
|
||||||
|
*
|
||||||
|
* @event core.ucp_prefs_view_data
|
||||||
|
* @var bool submit Do we display the form only
|
||||||
|
* or did the user press submit
|
||||||
|
* @var array data Array with current ucp options data
|
||||||
|
* @since 3.1-A1
|
||||||
|
*/
|
||||||
|
$vars = array('submit', 'data');
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.ucp_prefs_view_data', compact($vars)));
|
||||||
|
|
||||||
if ($submit)
|
if ($submit)
|
||||||
{
|
{
|
||||||
$error = validate_data($data, array(
|
$error = validate_data($data, array(
|
||||||
|
@ -247,6 +286,17 @@ class ucp_prefs
|
||||||
'user_post_show_days' => $data['post_st'],
|
'user_post_show_days' => $data['post_st'],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update UCP edit display options data on form submit
|
||||||
|
*
|
||||||
|
* @event core.ucp_prefs_view_update_data
|
||||||
|
* @var array data Submitted display options data
|
||||||
|
* @var array sql_ary Display options data we udpate
|
||||||
|
* @since 3.1-A1
|
||||||
|
*/
|
||||||
|
$vars = array('data', 'sql_ary');
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.ucp_prefs_view_update_data', compact($vars)));
|
||||||
|
|
||||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||||
WHERE user_id = ' . $user->data['user_id'];
|
WHERE user_id = ' . $user->data['user_id'];
|
||||||
|
@ -335,6 +385,20 @@ class ucp_prefs
|
||||||
);
|
);
|
||||||
add_form_key('ucp_prefs_post');
|
add_form_key('ucp_prefs_post');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add UCP edit posting defaults data before they are assigned to the template or submitted
|
||||||
|
*
|
||||||
|
* To assign data to the template, use $template->assign_vars()
|
||||||
|
*
|
||||||
|
* @event core.ucp_prefs_post_data
|
||||||
|
* @var bool submit Do we display the form only
|
||||||
|
* or did the user press submit
|
||||||
|
* @var array data Array with current ucp options data
|
||||||
|
* @since 3.1-A1
|
||||||
|
*/
|
||||||
|
$vars = array('submit', 'data');
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.ucp_prefs_post_data', compact($vars)));
|
||||||
|
|
||||||
if ($submit)
|
if ($submit)
|
||||||
{
|
{
|
||||||
if (check_form_key('ucp_prefs_post'))
|
if (check_form_key('ucp_prefs_post'))
|
||||||
|
@ -348,6 +412,17 @@ class ucp_prefs
|
||||||
'user_notify' => $data['notify'],
|
'user_notify' => $data['notify'],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update UCP edit posting defaults data on form submit
|
||||||
|
*
|
||||||
|
* @event core.ucp_prefs_post_update_data
|
||||||
|
* @var array data Submitted display options data
|
||||||
|
* @var array sql_ary Display options data we udpate
|
||||||
|
* @since 3.1-A1
|
||||||
|
*/
|
||||||
|
$vars = array('data', 'sql_ary');
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.ucp_prefs_post_update_data', compact($vars)));
|
||||||
|
|
||||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||||
WHERE user_id = ' . $user->data['user_id'];
|
WHERE user_id = ' . $user->data['user_id'];
|
||||||
|
|
|
@ -546,6 +546,9 @@ class ucp_profile
|
||||||
// Build custom bbcodes array
|
// Build custom bbcodes array
|
||||||
display_custom_bbcodes();
|
display_custom_bbcodes();
|
||||||
|
|
||||||
|
// Generate smiley listing
|
||||||
|
generate_smilies('inline', 0);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'avatar':
|
case 'avatar':
|
||||||
|
|
|
@ -27,7 +27,7 @@ class ucp_register
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
|
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
|
||||||
global $request;
|
global $request, $phpbb_container;
|
||||||
|
|
||||||
//
|
//
|
||||||
if ($config['require_activation'] == USER_ACTIVATION_DISABLE)
|
if ($config['require_activation'] == USER_ACTIVATION_DISABLE)
|
||||||
|
@ -38,7 +38,7 @@ class ucp_register
|
||||||
include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
|
include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
|
||||||
|
|
||||||
$coppa = $request->is_set('coppa') ? (int) $request->variable('coppa', false) : false;
|
$coppa = $request->is_set('coppa') ? (int) $request->variable('coppa', false) : false;
|
||||||
$agreed = (int) $request->variable('agreed', false);
|
$agreed = $request->variable('agreed', false);
|
||||||
$submit = $request->is_set_post('submit');
|
$submit = $request->is_set_post('submit');
|
||||||
$change_lang = request_var('change_lang', '');
|
$change_lang = request_var('change_lang', '');
|
||||||
$user_lang = request_var('lang', $user->lang_name);
|
$user_lang = request_var('lang', $user->lang_name);
|
||||||
|
@ -63,7 +63,7 @@ class ucp_register
|
||||||
$submit = false;
|
$submit = false;
|
||||||
|
|
||||||
// Setting back agreed to let the user view the agreement in his/her language
|
// Setting back agreed to let the user view the agreement in his/her language
|
||||||
$agreed = ($request->variable('change_lang', false)) ? 0 : $agreed;
|
$agreed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$user->lang_name = $user_lang = $use_lang;
|
$user->lang_name = $user_lang = $use_lang;
|
||||||
|
@ -78,19 +78,37 @@ class ucp_register
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$cp = new custom_profile();
|
$cp = new custom_profile();
|
||||||
|
|
||||||
$error = $cp_data = $cp_error = array();
|
$error = $cp_data = $cp_error = array();
|
||||||
|
$s_hidden_fields = array();
|
||||||
|
|
||||||
|
// Handle login_link data added to $_hidden_fields
|
||||||
|
$login_link_data = $this->get_login_link_data_array();
|
||||||
|
|
||||||
|
if (!empty($login_link_data))
|
||||||
|
{
|
||||||
|
// Confirm that we have all necessary data
|
||||||
|
$auth_provider = 'auth.provider.' . $request->variable('auth_provider', $config['auth_method']);
|
||||||
|
$auth_provider = $phpbb_container->get($auth_provider);
|
||||||
|
|
||||||
|
$result = $auth_provider->login_link_has_necessary_data($login_link_data);
|
||||||
|
if ($result !== null)
|
||||||
|
{
|
||||||
|
$error[] = $user->lang[$result];
|
||||||
|
}
|
||||||
|
|
||||||
|
$s_hidden_fields = array_merge($s_hidden_fields, $this->get_login_link_data_for_hidden_fields($login_link_data));
|
||||||
|
}
|
||||||
|
|
||||||
if (!$agreed || ($coppa === false && $config['coppa_enable']) || ($coppa && !$config['coppa_enable']))
|
if (!$agreed || ($coppa === false && $config['coppa_enable']) || ($coppa && !$config['coppa_enable']))
|
||||||
{
|
{
|
||||||
$add_lang = ($change_lang) ? '&change_lang=' . urlencode($change_lang) : '';
|
$add_lang = ($change_lang) ? '&change_lang=' . urlencode($change_lang) : '';
|
||||||
$add_coppa = ($coppa !== false) ? '&coppa=' . $coppa : '';
|
$add_coppa = ($coppa !== false) ? '&coppa=' . $coppa : '';
|
||||||
|
|
||||||
$s_hidden_fields = array(
|
$s_hidden_fields = array_merge($s_hidden_fields, array(
|
||||||
'change_lang' => $change_lang,
|
'change_lang' => '',
|
||||||
);
|
));
|
||||||
|
|
||||||
// If we change the language, we want to pass on some more possible parameter.
|
// If we change the language, we want to pass on some more possible parameter.
|
||||||
if ($change_lang)
|
if ($change_lang)
|
||||||
|
@ -398,15 +416,28 @@ class ucp_register
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Perform account linking if necessary
|
||||||
|
if (!empty($login_link_data))
|
||||||
|
{
|
||||||
|
$login_link_data['user_id'] = $user_id;
|
||||||
|
|
||||||
|
$result = $auth_provider->link_account($login_link_data);
|
||||||
|
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
$message = $message . '<br /><br />' . $user->lang[$result];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
|
$message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
|
||||||
trigger_error($message);
|
trigger_error($message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$s_hidden_fields = array(
|
$s_hidden_fields = array_merge($s_hidden_fields, array(
|
||||||
'agreed' => 'true',
|
'agreed' => 'true',
|
||||||
'change_lang' => 0,
|
'change_lang' => 0,
|
||||||
);
|
));
|
||||||
|
|
||||||
if ($config['coppa_enable'])
|
if ($config['coppa_enable'])
|
||||||
{
|
{
|
||||||
|
@ -474,4 +505,49 @@ class ucp_register
|
||||||
$this->tpl_name = 'ucp_register';
|
$this->tpl_name = 'ucp_register';
|
||||||
$this->page_title = 'UCP_REGISTRATION';
|
$this->page_title = 'UCP_REGISTRATION';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the login_link data array
|
||||||
|
*
|
||||||
|
* @return array Returns an array of all POST paramaters whose names
|
||||||
|
* begin with 'login_link_'
|
||||||
|
*/
|
||||||
|
protected function get_login_link_data_array()
|
||||||
|
{
|
||||||
|
global $request;
|
||||||
|
|
||||||
|
$var_names = $request->variable_names(phpbb_request_interface::POST);
|
||||||
|
$login_link_data = array();
|
||||||
|
$string_start_length = strlen('login_link_');
|
||||||
|
|
||||||
|
foreach ($var_names as $var_name)
|
||||||
|
{
|
||||||
|
if (strpos($var_name, 'login_link_') === 0)
|
||||||
|
{
|
||||||
|
$key_name = substr($var_name, $string_start_length);
|
||||||
|
$login_link_data[$key_name] = $request->variable($var_name, '', false, phpbb_request_interface::POST);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $login_link_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepends they key names of an associative array with 'login_link_' for
|
||||||
|
* inclusion on the page as hidden fields.
|
||||||
|
*
|
||||||
|
* @param array $data The array to be modified
|
||||||
|
* @return array The modified array
|
||||||
|
*/
|
||||||
|
protected function get_login_link_data_for_hidden_fields($data)
|
||||||
|
{
|
||||||
|
$new_data = array();
|
||||||
|
|
||||||
|
foreach ($data as $key => $value)
|
||||||
|
{
|
||||||
|
$new_data['login_link_' . $key] = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $new_data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,6 +101,8 @@ class ucp_remind
|
||||||
|
|
||||||
$messenger->set_addresses($user_row);
|
$messenger->set_addresses($user_row);
|
||||||
|
|
||||||
|
$messenger->anti_abuse_headers($config, $user);
|
||||||
|
|
||||||
$messenger->assign_vars(array(
|
$messenger->assign_vars(array(
|
||||||
'USERNAME' => htmlspecialchars_decode($user_row['username']),
|
'USERNAME' => htmlspecialchars_decode($user_row['username']),
|
||||||
'PASSWORD' => htmlspecialchars_decode($user_password),
|
'PASSWORD' => htmlspecialchars_decode($user_password),
|
||||||
|
|
|
@ -21,26 +21,6 @@ define('IN_INSTALL', true);
|
||||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
||||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||||
|
|
||||||
if (!function_exists('phpbb_require_updated'))
|
|
||||||
{
|
|
||||||
function phpbb_require_updated($path, $optional = false)
|
|
||||||
{
|
|
||||||
global $phpbb_root_path;
|
|
||||||
|
|
||||||
$new_path = $phpbb_root_path . 'install/update/new/' . $path;
|
|
||||||
$old_path = $phpbb_root_path . $path;
|
|
||||||
|
|
||||||
if (file_exists($new_path))
|
|
||||||
{
|
|
||||||
require($new_path);
|
|
||||||
}
|
|
||||||
else if (!$optional || file_exists($old_path))
|
|
||||||
{
|
|
||||||
require($old_path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function phpbb_end_update($cache, $config)
|
function phpbb_end_update($cache, $config)
|
||||||
{
|
{
|
||||||
$cache->purge();
|
$cache->purge();
|
||||||
|
@ -69,7 +49,7 @@ function phpbb_end_update($cache, $config)
|
||||||
exit_handler();
|
exit_handler();
|
||||||
}
|
}
|
||||||
|
|
||||||
phpbb_require_updated('includes/startup.' . $phpEx);
|
require($phpbb_root_path . 'includes/startup.' . $phpEx);
|
||||||
|
|
||||||
include($phpbb_root_path . 'config.' . $phpEx);
|
include($phpbb_root_path . 'config.' . $phpEx);
|
||||||
if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
|
if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
|
||||||
|
@ -88,7 +68,9 @@ require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
||||||
require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
|
require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
|
||||||
require($phpbb_root_path . 'includes/functions_container.' . $phpEx);
|
require($phpbb_root_path . 'includes/functions_container.' . $phpEx);
|
||||||
|
|
||||||
|
require($phpbb_root_path . 'config.' . $phpEx);
|
||||||
require($phpbb_root_path . 'includes/constants.' . $phpEx);
|
require($phpbb_root_path . 'includes/constants.' . $phpEx);
|
||||||
|
include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
|
||||||
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
||||||
|
|
||||||
// Set PHP error handler to ours
|
// Set PHP error handler to ours
|
||||||
|
@ -101,11 +83,10 @@ $phpbb_class_loader->register();
|
||||||
// Set up container (must be done here because extensions table may not exist)
|
// Set up container (must be done here because extensions table may not exist)
|
||||||
$container_extensions = array(
|
$container_extensions = array(
|
||||||
new phpbb_di_extension_config($phpbb_root_path . 'config.' . $phpEx),
|
new phpbb_di_extension_config($phpbb_root_path . 'config.' . $phpEx),
|
||||||
new phpbb_di_extension_core($phpbb_root_path),
|
new phpbb_di_extension_core($phpbb_root_path . 'config/'),
|
||||||
);
|
);
|
||||||
$container_passes = array(
|
$container_passes = array(
|
||||||
new phpbb_di_pass_collection_pass(),
|
new phpbb_di_pass_collection_pass(),
|
||||||
//new phpbb_di_pass_kernel_pass(),
|
|
||||||
);
|
);
|
||||||
$phpbb_container = phpbb_create_container($container_extensions, $phpbb_root_path, $phpEx);
|
$phpbb_container = phpbb_create_container($container_extensions, $phpbb_root_path, $phpEx);
|
||||||
|
|
||||||
|
@ -263,8 +244,8 @@ while (!$migrator->finished())
|
||||||
// Are we approaching the time limit? If so we want to pause the update and continue after refreshing
|
// Are we approaching the time limit? If so we want to pause the update and continue after refreshing
|
||||||
if ((time() - $update_start_time) >= $safe_time_limit)
|
if ((time() - $update_start_time) >= $safe_time_limit)
|
||||||
{
|
{
|
||||||
echo $user->lang['DATABASE_UPDATE_NOT_COMPLETED'] . '<br />';
|
echo '<br />' . $user->lang['DATABASE_UPDATE_NOT_COMPLETED'] . '<br /><br />';
|
||||||
echo '<a href="' . append_sid($phpbb_root_path . 'install/database_update.' . $phpEx, 'type=' . $request->variable('type', 0) . '&language=' . $user->lang['USER_LANG']) . '">' . $user->lang['DATABASE_UPDATE_CONTINUE'] . '</a>';
|
echo '<a href="' . append_sid($phpbb_root_path . 'install/database_update.' . $phpEx, 'type=' . $request->variable('type', 0) . '&language=' . $request->variable('language', 'en')) . '" class="button1">' . $user->lang['DATABASE_UPDATE_CONTINUE'] . '</a>';
|
||||||
|
|
||||||
phpbb_end_update($cache, $config);
|
phpbb_end_update($cache, $config);
|
||||||
}
|
}
|
||||||
|
@ -280,7 +261,7 @@ echo $user->lang['DATABASE_UPDATE_COMPLETE'] . '<br />';
|
||||||
if ($request->variable('type', 0))
|
if ($request->variable('type', 0))
|
||||||
{
|
{
|
||||||
echo $user->lang['INLINE_UPDATE_SUCCESSFUL'] . '<br /><br />';
|
echo $user->lang['INLINE_UPDATE_SUCCESSFUL'] . '<br /><br />';
|
||||||
echo '<a href="' . append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update&sub=file_check&language=' . $user->lang['USER_LANG']) . '" class="button1">' . $user->lang['CONTINUE_UPDATE_NOW'] . '</a>';
|
echo '<a href="' . append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update&sub=update_db&language=' . $request->variable('language', 'en')) . '" class="button1">' . $user->lang['CONTINUE_UPDATE_NOW'] . '</a>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,7 @@ if (version_compare(PHP_VERSION, '5.3.3') < 0)
|
||||||
|
|
||||||
function phpbb_require_updated($path, $optional = false)
|
function phpbb_require_updated($path, $optional = false)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path;
|
global $phpbb_root_path, $table_prefix;
|
||||||
|
|
||||||
$new_path = $phpbb_root_path . 'install/update/new/' . $path;
|
$new_path = $phpbb_root_path . 'install/update/new/' . $path;
|
||||||
$old_path = $phpbb_root_path . $path;
|
$old_path = $phpbb_root_path . $path;
|
||||||
|
@ -43,6 +43,23 @@ function phpbb_require_updated($path, $optional = false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function phpbb_include_updated($path, $optional = false)
|
||||||
|
{
|
||||||
|
global $phpbb_root_path;
|
||||||
|
|
||||||
|
$new_path = $phpbb_root_path . 'install/update/new/' . $path;
|
||||||
|
$old_path = $phpbb_root_path . $path;
|
||||||
|
|
||||||
|
if (file_exists($new_path))
|
||||||
|
{
|
||||||
|
include($new_path);
|
||||||
|
}
|
||||||
|
else if (!$optional || file_exists($old_path))
|
||||||
|
{
|
||||||
|
include($old_path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
phpbb_require_updated('includes/startup.' . $phpEx);
|
phpbb_require_updated('includes/startup.' . $phpEx);
|
||||||
|
|
||||||
// Try to override some limits - maybe it helps some...
|
// Try to override some limits - maybe it helps some...
|
||||||
|
@ -78,18 +95,21 @@ $phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relati
|
||||||
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
|
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
|
||||||
|
|
||||||
// Include essential scripts
|
// Include essential scripts
|
||||||
require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
|
phpbb_require_updated('phpbb/class_loader.' . $phpEx);
|
||||||
|
|
||||||
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
phpbb_require_updated('includes/functions.' . $phpEx);
|
||||||
require($phpbb_root_path . 'includes/functions_container.' . $phpEx);
|
phpbb_require_updated('includes/functions_container.' . $phpEx);
|
||||||
|
|
||||||
phpbb_require_updated('includes/functions_content.' . $phpEx, true);
|
phpbb_require_updated('includes/functions_content.' . $phpEx, true);
|
||||||
|
|
||||||
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
phpbb_include_updated('includes/functions_admin.' . $phpEx);
|
||||||
include($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
phpbb_include_updated('includes/utf/utf_normalizer.' . $phpEx);
|
||||||
require($phpbb_root_path . 'includes/functions_install.' . $phpEx);
|
phpbb_include_updated('includes/utf/utf_tools.' . $phpEx);
|
||||||
|
phpbb_require_updated('includes/functions_install.' . $phpEx);
|
||||||
|
|
||||||
// Setup class loader first
|
// Setup class loader first
|
||||||
|
$phpbb_class_loader_new = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}install/update/new/phpbb/", $phpEx);
|
||||||
|
$phpbb_class_loader_new->register();
|
||||||
$phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}phpbb/", $phpEx);
|
$phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}phpbb/", $phpEx);
|
||||||
$phpbb_class_loader->register();
|
$phpbb_class_loader->register();
|
||||||
$phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', "{$phpbb_root_path}ext/", $phpEx);
|
$phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', "{$phpbb_root_path}ext/", $phpEx);
|
||||||
|
@ -108,7 +128,7 @@ $request = $phpbb_container->get('request');
|
||||||
request_var('', 0, false, false, $request); // "dependency injection" for a function
|
request_var('', 0, false, false, $request); // "dependency injection" for a function
|
||||||
|
|
||||||
// Try and load an appropriate language if required
|
// Try and load an appropriate language if required
|
||||||
$language = basename(request_var('language', ''));
|
$language = basename($request->variable('language', ''));
|
||||||
|
|
||||||
if ($request->header('Accept-Language') && !$language)
|
if ($request->header('Accept-Language') && !$language)
|
||||||
{
|
{
|
||||||
|
@ -167,11 +187,23 @@ if (!file_exists($phpbb_root_path . 'language/' . $language) || !is_dir($phpbb_r
|
||||||
}
|
}
|
||||||
|
|
||||||
// And finally, load the relevant language files
|
// And finally, load the relevant language files
|
||||||
include($phpbb_root_path . 'language/' . $language . '/common.' . $phpEx);
|
$load_lang_files = array('common', 'acp/common', 'acp/board', 'install', 'posting');
|
||||||
include($phpbb_root_path . 'language/' . $language . '/acp/common.' . $phpEx);
|
$new_path = $phpbb_root_path . 'install/update/new/language/' . $language . '/';
|
||||||
include($phpbb_root_path . 'language/' . $language . '/acp/board.' . $phpEx);
|
$old_path = $phpbb_root_path . 'language/' . $language . '/';
|
||||||
include($phpbb_root_path . 'language/' . $language . '/install.' . $phpEx);
|
|
||||||
include($phpbb_root_path . 'language/' . $language . '/posting.' . $phpEx);
|
// NOTE: we can not use "phpbb_include_updated" as the files uses vars which would be required
|
||||||
|
// to be global while loading.
|
||||||
|
foreach ($load_lang_files as $lang_file)
|
||||||
|
{
|
||||||
|
if (file_exists($new_path . $lang_file . '.' . $phpEx))
|
||||||
|
{
|
||||||
|
include($new_path . $lang_file . '.' . $phpEx);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
include($old_path . $lang_file . '.' . $phpEx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// usually we would need every single constant here - and it would be consistent. For 3.0.x, use a dirty hack... :(
|
// usually we would need every single constant here - and it would be consistent. For 3.0.x, use a dirty hack... :(
|
||||||
|
|
||||||
|
@ -181,8 +213,8 @@ define('CHMOD_READ', 4);
|
||||||
define('CHMOD_WRITE', 2);
|
define('CHMOD_WRITE', 2);
|
||||||
define('CHMOD_EXECUTE', 1);
|
define('CHMOD_EXECUTE', 1);
|
||||||
|
|
||||||
$mode = request_var('mode', 'overview');
|
$mode = $request->variable('mode', 'overview');
|
||||||
$sub = request_var('sub', '');
|
$sub = $request->variable('sub', '');
|
||||||
|
|
||||||
// Set PHP error handler to ours
|
// Set PHP error handler to ours
|
||||||
set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
|
set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
|
||||||
|
@ -212,12 +244,11 @@ $config = new phpbb_config(array(
|
||||||
'load_tplcompile' => '1'
|
'load_tplcompile' => '1'
|
||||||
));
|
));
|
||||||
|
|
||||||
$phpbb_style_resource_locator = new phpbb_style_resource_locator();
|
|
||||||
$phpbb_style_path_provider = new phpbb_style_path_provider();
|
|
||||||
$template = new phpbb_template_twig($phpbb_root_path, $phpEx, $config, $user, new phpbb_template_context());
|
$template = new phpbb_template_twig($phpbb_root_path, $phpEx, $config, $user, new phpbb_template_context());
|
||||||
$phpbb_style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template);
|
$paths = array($phpbb_root_path . 'install/update/new/adm/style', $phpbb_admin_path . 'style');
|
||||||
$phpbb_style->set_ext_dir_prefix('adm/');
|
$paths = array_filter($paths, 'is_dir');
|
||||||
$phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', array(), '');
|
$template->set_custom_style('adm', $paths);
|
||||||
|
|
||||||
$template->assign_var('T_ASSETS_PATH', '../assets');
|
$template->assign_var('T_ASSETS_PATH', '../assets');
|
||||||
$template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');
|
$template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ if (!empty($setmodules))
|
||||||
'module_filename' => substr(basename(__FILE__), 0, -strlen($phpEx)-1),
|
'module_filename' => substr(basename(__FILE__), 0, -strlen($phpEx)-1),
|
||||||
'module_order' => 30,
|
'module_order' => 30,
|
||||||
'module_subs' => '',
|
'module_subs' => '',
|
||||||
'module_stages' => array('INTRO', 'VERSION_CHECK', 'UPDATE_DB', 'FILE_CHECK', 'UPDATE_FILES'),
|
'module_stages' => array('INTRO', 'VERSION_CHECK', 'FILE_CHECK', 'UPDATE_FILES', 'UPDATE_DB'),
|
||||||
'module_reqs' => ''
|
'module_reqs' => ''
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,6 @@ class install_update extends module
|
||||||
var $new_location;
|
var $new_location;
|
||||||
var $latest_version;
|
var $latest_version;
|
||||||
var $current_version;
|
var $current_version;
|
||||||
var $unequal_version;
|
|
||||||
|
|
||||||
var $update_to_version;
|
var $update_to_version;
|
||||||
|
|
||||||
|
@ -71,18 +70,22 @@ class install_update extends module
|
||||||
|
|
||||||
function main($mode, $sub)
|
function main($mode, $sub)
|
||||||
{
|
{
|
||||||
global $phpbb_style, $template, $phpEx, $phpbb_root_path, $user, $db, $config, $cache, $auth, $language;
|
global $template, $phpEx, $phpbb_root_path, $user, $db, $config, $cache, $auth, $language;
|
||||||
global $request, $phpbb_admin_path, $phpbb_adm_relative_path, $phpbb_container;
|
global $request, $phpbb_admin_path, $phpbb_adm_relative_path, $phpbb_container;
|
||||||
|
|
||||||
|
// We must enable super globals, otherwise creating a new instance of the request class,
|
||||||
|
// using the new container with a dbal connection will fail with the following PHP Notice:
|
||||||
|
// Object of class phpbb_request_deactivated_super_global could not be converted to int
|
||||||
|
$request->enable_super_globals();
|
||||||
|
|
||||||
// Create a normal container now
|
// Create a normal container now
|
||||||
$phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
|
$phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, $phpbb_root_path . 'install/update/new/config');
|
||||||
|
|
||||||
// Writes into global $cache
|
// Writes into global $cache
|
||||||
$cache = $phpbb_container->get('cache');
|
$cache = $phpbb_container->get('cache');
|
||||||
|
|
||||||
$this->tpl_name = 'install_update';
|
$this->tpl_name = 'install_update';
|
||||||
$this->page_title = 'UPDATE_INSTALLATION';
|
$this->page_title = 'UPDATE_INSTALLATION';
|
||||||
$this->unequal_version = false;
|
|
||||||
|
|
||||||
$this->old_location = $phpbb_root_path . 'install/update/old/';
|
$this->old_location = $phpbb_root_path . 'install/update/old/';
|
||||||
$this->new_location = $phpbb_root_path . 'install/update/new/';
|
$this->new_location = $phpbb_root_path . 'install/update/new/';
|
||||||
|
@ -125,7 +128,7 @@ class install_update extends module
|
||||||
$config['default_lang'] = $language;
|
$config['default_lang'] = $language;
|
||||||
$user->data['user_lang'] = $language;
|
$user->data['user_lang'] = $language;
|
||||||
|
|
||||||
$user->setup(array('common', 'acp/common', 'acp/board', 'install', 'posting'));
|
$user->add_lang(array('common', 'acp/common', 'acp/board', 'install', 'posting'));
|
||||||
|
|
||||||
// Reset the default_lang
|
// Reset the default_lang
|
||||||
$config['default_lang'] = $config_default_lang;
|
$config['default_lang'] = $config_default_lang;
|
||||||
|
@ -138,7 +141,9 @@ class install_update extends module
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set custom template again. ;)
|
// Set custom template again. ;)
|
||||||
$phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', array(), '');
|
$paths = array($phpbb_root_path . 'install/update/new/adm/style', $phpbb_admin_path . 'style');
|
||||||
|
$paths = array_filter($paths, 'is_dir');
|
||||||
|
$template->set_custom_style('adm', $paths);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_USER_LANG' => $user->lang['USER_LANG'],
|
'S_USER_LANG' => $user->lang['USER_LANG'],
|
||||||
|
@ -192,8 +197,6 @@ class install_update extends module
|
||||||
// Check if the update files are actually meant to update from the current version
|
// Check if the update files are actually meant to update from the current version
|
||||||
if ($this->current_version != $this->update_info['version']['from'])
|
if ($this->current_version != $this->update_info['version']['from'])
|
||||||
{
|
{
|
||||||
$this->unequal_version = true;
|
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_ERROR' => true,
|
'S_ERROR' => true,
|
||||||
'ERROR_MSG' => sprintf($user->lang['INCOMPATIBLE_UPDATE_FILES'], $this->current_version, $this->update_info['version']['from'], $this->update_info['version']['to']),
|
'ERROR_MSG' => sprintf($user->lang['INCOMPATIBLE_UPDATE_FILES'], $this->current_version, $this->update_info['version']['from'], $this->update_info['version']['to']),
|
||||||
|
@ -201,10 +204,8 @@ class install_update extends module
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the update files stored are for the latest version...
|
// Check if the update files stored are for the latest version...
|
||||||
if (phpbb_version_compare($this->latest_version, $this->update_info['version']['to'], '>'))
|
if (version_compare(strtolower($this->latest_version), strtolower($this->update_info['version']['to']), '>'))
|
||||||
{
|
{
|
||||||
$this->unequal_version = true;
|
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_WARNING' => true,
|
'S_WARNING' => true,
|
||||||
'WARNING_MSG' => sprintf($user->lang['OLD_UPDATE_FILES'], $this->update_info['version']['from'], $this->update_info['version']['to'], $this->latest_version))
|
'WARNING_MSG' => sprintf($user->lang['OLD_UPDATE_FILES'], $this->update_info['version']['from'], $this->update_info['version']['to'], $this->latest_version))
|
||||||
|
@ -222,12 +223,6 @@ class install_update extends module
|
||||||
|
|
||||||
if ($this->test_update === false)
|
if ($this->test_update === false)
|
||||||
{
|
{
|
||||||
// Got the updater template itself updated? If so, we are able to directly use it - but only if all three files are present
|
|
||||||
if (in_array($phpbb_adm_relative_path . 'style/install_update.html', $this->update_info['files']))
|
|
||||||
{
|
|
||||||
$this->tpl_name = '../../install/update/new/adm/style/install_update';
|
|
||||||
}
|
|
||||||
|
|
||||||
// What about the language file? Got it updated?
|
// What about the language file? Got it updated?
|
||||||
if (in_array('language/' . $language . '/install.' . $phpEx, $this->update_info['files']))
|
if (in_array('language/' . $language . '/install.' . $phpEx, $this->update_info['files']))
|
||||||
{
|
{
|
||||||
|
@ -280,18 +275,17 @@ class install_update extends module
|
||||||
$this->page_title = 'STAGE_VERSION_CHECK';
|
$this->page_title = 'STAGE_VERSION_CHECK';
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_UP_TO_DATE' => $up_to_date,
|
|
||||||
'S_VERSION_CHECK' => true,
|
'S_VERSION_CHECK' => true,
|
||||||
|
|
||||||
'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"),
|
'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"),
|
||||||
'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_db"),
|
|
||||||
|
|
||||||
|
'S_UP_TO_DATE' => $up_to_date,
|
||||||
'LATEST_VERSION' => $this->latest_version,
|
'LATEST_VERSION' => $this->latest_version,
|
||||||
'CURRENT_VERSION' => $this->current_version)
|
'CURRENT_VERSION' => $this->current_version,
|
||||||
);
|
));
|
||||||
|
|
||||||
// Print out version the update package updates to
|
// Print out version the update package updates to
|
||||||
if ($this->unequal_version)
|
if ($this->latest_version != $this->update_info['version']['to'])
|
||||||
{
|
{
|
||||||
$template->assign_var('PACKAGE_VERSION', $this->update_info['version']['to']);
|
$template->assign_var('PACKAGE_VERSION', $this->update_info['version']['to']);
|
||||||
}
|
}
|
||||||
|
@ -309,30 +303,6 @@ class install_update extends module
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'update_db':
|
case 'update_db':
|
||||||
|
|
||||||
// Make sure the database update is valid for the latest version
|
|
||||||
$valid = false;
|
|
||||||
$updates_to_version = '';
|
|
||||||
|
|
||||||
if (file_exists($phpbb_root_path . 'install/database_update.' . $phpEx))
|
|
||||||
{
|
|
||||||
include_once($phpbb_root_path . 'install/database_update.' . $phpEx);
|
|
||||||
|
|
||||||
if ($updates_to_version === $this->update_info['version']['to'])
|
|
||||||
{
|
|
||||||
$valid = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Should not happen at all
|
|
||||||
if (!$valid)
|
|
||||||
{
|
|
||||||
trigger_error($user->lang['DATABASE_UPDATE_INFO_OLD'], E_USER_ERROR);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Just a precaution
|
|
||||||
$cache->purge();
|
|
||||||
|
|
||||||
// Redirect the user to the database update script with some explanations...
|
// Redirect the user to the database update script with some explanations...
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_DB_UPDATE' => true,
|
'S_DB_UPDATE' => true,
|
||||||
|
@ -340,8 +310,14 @@ class install_update extends module
|
||||||
'U_DB_UPDATE' => append_sid($phpbb_root_path . 'install/database_update.' . $phpEx, 'type=1&language=' . $user->data['user_lang']),
|
'U_DB_UPDATE' => append_sid($phpbb_root_path . 'install/database_update.' . $phpEx, 'type=1&language=' . $user->data['user_lang']),
|
||||||
'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_db"),
|
'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_db"),
|
||||||
'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"),
|
'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"),
|
||||||
|
'L_EVERYTHING_UP_TO_DATE' => $user->lang('EVERYTHING_UP_TO_DATE', append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'), append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login&redirect=' . $phpbb_adm_relative_path . 'index.php%3Fi=send_statistics%26mode=send_statistics')),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
// Do not display incompatible package note after successful update
|
||||||
|
if ($config['version'] == $this->update_info['version']['to'])
|
||||||
|
{
|
||||||
|
$template->assign_var('S_ERROR', false);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'file_check':
|
case 'file_check':
|
||||||
|
@ -507,17 +483,30 @@ class install_update extends module
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_FILE_CHECK' => true,
|
'S_FILE_CHECK' => true,
|
||||||
'S_ALL_UP_TO_DATE' => $all_up_to_date,
|
'S_ALL_UP_TO_DATE' => $all_up_to_date,
|
||||||
'L_ALL_FILES_UP_TO_DATE' => $user->lang('ALL_FILES_UP_TO_DATE', append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'), append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login&redirect=' . $phpbb_adm_relative_path . 'index.php%3Fi=send_statistics%26mode=send_statistics')),
|
|
||||||
'S_VERSION_UP_TO_DATE' => $up_to_date,
|
'S_VERSION_UP_TO_DATE' => $up_to_date,
|
||||||
|
'S_UP_TO_DATE' => $up_to_date,
|
||||||
'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"),
|
'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"),
|
||||||
'U_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_files"),
|
'U_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_files"),
|
||||||
'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_db"),
|
'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_db"),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
// Since some people try to update to RC releases, but phpBB.com tells them the last version is the version they currently run
|
||||||
|
// we are faced with the updater thinking the database schema is up-to-date; which it is, but should be updated none-the-less
|
||||||
|
// We now try to cope with this by triggering the update process
|
||||||
|
if (version_compare(str_replace('rc', 'RC', strtolower($this->current_version)), str_replace('rc', 'RC', strtolower($this->update_info['version']['to'])), '<'))
|
||||||
|
{
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_UP_TO_DATE' => false,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
if ($all_up_to_date)
|
if ($all_up_to_date)
|
||||||
{
|
{
|
||||||
|
global $phpbb_container;
|
||||||
|
$phpbb_log = $phpbb_container->get('log');
|
||||||
|
|
||||||
// Add database update to log
|
// Add database update to log
|
||||||
add_log('admin', 'LOG_UPDATE_PHPBB', $this->current_version, $this->update_to_version);
|
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_UPDATE_PHPBB', time(), array($this->current_version, $this->update_to_version));
|
||||||
|
|
||||||
$db->sql_return_on_error(true);
|
$db->sql_return_on_error(true);
|
||||||
$db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'version_update_from'");
|
$db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'version_update_from'");
|
||||||
|
@ -1096,12 +1085,6 @@ class install_update extends module
|
||||||
|
|
||||||
$this->tpl_name = 'install_update_diff';
|
$this->tpl_name = 'install_update_diff';
|
||||||
|
|
||||||
// Got the diff template itself updated? If so, we are able to directly use it
|
|
||||||
if (in_array($phpbb_adm_relative_path . 'style/install_update_diff.html', $this->update_info['files']))
|
|
||||||
{
|
|
||||||
$this->tpl_name = '../../install/update/new/adm/style/install_update_diff';
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->page_title = 'VIEWING_FILE_DIFF';
|
$this->page_title = 'VIEWING_FILE_DIFF';
|
||||||
|
|
||||||
$status = request_var('status', '');
|
$status = request_var('status', '');
|
||||||
|
|
|
@ -128,6 +128,27 @@ CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users(user_id);;
|
||||||
CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users(auth_option_id);;
|
CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users(auth_option_id);;
|
||||||
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users(auth_role_id);;
|
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users(auth_role_id);;
|
||||||
|
|
||||||
|
# Table: 'phpbb_oauth_tokens'
|
||||||
|
CREATE TABLE phpbb_oauth_tokens (
|
||||||
|
user_id INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
|
||||||
|
provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
|
||||||
|
oauth_token BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL
|
||||||
|
);;
|
||||||
|
|
||||||
|
CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens(user_id);;
|
||||||
|
CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens(provider);;
|
||||||
|
|
||||||
|
# Table: 'phpbb_oauth_accounts'
|
||||||
|
CREATE TABLE phpbb_oauth_accounts (
|
||||||
|
user_id INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
|
||||||
|
oauth_provider_id BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
|
||||||
|
);;
|
||||||
|
|
||||||
|
ALTER TABLE phpbb_oauth_accounts ADD PRIMARY KEY (user_id, provider);;
|
||||||
|
|
||||||
|
|
||||||
# Table: 'phpbb_banlist'
|
# Table: 'phpbb_banlist'
|
||||||
CREATE TABLE phpbb_banlist (
|
CREATE TABLE phpbb_banlist (
|
||||||
ban_id INTEGER NOT NULL,
|
ban_id INTEGER NOT NULL,
|
||||||
|
|
|
@ -166,6 +166,43 @@ CREATE INDEX [auth_role_id] ON [phpbb_acl_users]([auth_role_id]) ON [PRIMARY]
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Table: 'phpbb_oauth_tokens'
|
||||||
|
*/
|
||||||
|
CREATE TABLE [phpbb_oauth_tokens] (
|
||||||
|
[user_id] [int] DEFAULT (0) NOT NULL ,
|
||||||
|
[session_id] [char] (32) DEFAULT ('') NOT NULL ,
|
||||||
|
[provider] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||||
|
[oauth_token] [text] DEFAULT ('') NOT NULL
|
||||||
|
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||||
|
GO
|
||||||
|
|
||||||
|
CREATE INDEX [user_id] ON [phpbb_oauth_tokens]([user_id]) ON [PRIMARY]
|
||||||
|
GO
|
||||||
|
|
||||||
|
CREATE INDEX [provider] ON [phpbb_oauth_tokens]([provider]) ON [PRIMARY]
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Table: 'phpbb_oauth_accounts'
|
||||||
|
*/
|
||||||
|
CREATE TABLE [phpbb_oauth_accounts] (
|
||||||
|
[user_id] [int] DEFAULT (0) NOT NULL ,
|
||||||
|
[provider] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||||
|
[oauth_provider_id] [varchar] (4000) DEFAULT ('') NOT NULL
|
||||||
|
) ON [PRIMARY]
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [phpbb_oauth_accounts] WITH NOCHECK ADD
|
||||||
|
CONSTRAINT [PK_phpbb_oauth_accounts] PRIMARY KEY CLUSTERED
|
||||||
|
(
|
||||||
|
[user_id],
|
||||||
|
[provider]
|
||||||
|
) ON [PRIMARY]
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Table: 'phpbb_banlist'
|
Table: 'phpbb_banlist'
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -90,6 +90,26 @@ CREATE TABLE phpbb_acl_users (
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
# Table: 'phpbb_oauth_tokens'
|
||||||
|
CREATE TABLE phpbb_oauth_tokens (
|
||||||
|
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
|
session_id binary(32) DEFAULT '' NOT NULL,
|
||||||
|
provider varbinary(255) DEFAULT '' NOT NULL,
|
||||||
|
oauth_token mediumblob NOT NULL,
|
||||||
|
KEY user_id (user_id),
|
||||||
|
KEY provider (provider)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
# Table: 'phpbb_oauth_accounts'
|
||||||
|
CREATE TABLE phpbb_oauth_accounts (
|
||||||
|
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
|
provider varbinary(255) DEFAULT '' NOT NULL,
|
||||||
|
oauth_provider_id blob NOT NULL,
|
||||||
|
PRIMARY KEY (user_id, provider)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
# Table: 'phpbb_banlist'
|
# Table: 'phpbb_banlist'
|
||||||
CREATE TABLE phpbb_banlist (
|
CREATE TABLE phpbb_banlist (
|
||||||
ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||||
|
|
|
@ -90,6 +90,26 @@ CREATE TABLE phpbb_acl_users (
|
||||||
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||||
|
|
||||||
|
|
||||||
|
# Table: 'phpbb_oauth_tokens'
|
||||||
|
CREATE TABLE phpbb_oauth_tokens (
|
||||||
|
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
|
session_id char(32) DEFAULT '' NOT NULL,
|
||||||
|
provider varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
oauth_token mediumtext NOT NULL,
|
||||||
|
KEY user_id (user_id),
|
||||||
|
KEY provider (provider)
|
||||||
|
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||||
|
|
||||||
|
|
||||||
|
# Table: 'phpbb_oauth_accounts'
|
||||||
|
CREATE TABLE phpbb_oauth_accounts (
|
||||||
|
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
|
provider varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
oauth_provider_id text NOT NULL,
|
||||||
|
PRIMARY KEY (user_id, provider)
|
||||||
|
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||||
|
|
||||||
|
|
||||||
# Table: 'phpbb_banlist'
|
# Table: 'phpbb_banlist'
|
||||||
CREATE TABLE phpbb_banlist (
|
CREATE TABLE phpbb_banlist (
|
||||||
ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||||
|
|
|
@ -210,6 +210,34 @@ CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id)
|
||||||
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id)
|
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id)
|
||||||
/
|
/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Table: 'phpbb_oauth_tokens'
|
||||||
|
*/
|
||||||
|
CREATE TABLE phpbb_oauth_tokens (
|
||||||
|
user_id number(8) DEFAULT '0' NOT NULL,
|
||||||
|
session_id char(32) DEFAULT '' ,
|
||||||
|
provider varchar2(255) DEFAULT '' ,
|
||||||
|
oauth_token clob DEFAULT ''
|
||||||
|
)
|
||||||
|
/
|
||||||
|
|
||||||
|
CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id)
|
||||||
|
/
|
||||||
|
CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider)
|
||||||
|
/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Table: 'phpbb_oauth_accounts'
|
||||||
|
*/
|
||||||
|
CREATE TABLE phpbb_oauth_accounts (
|
||||||
|
user_id number(8) DEFAULT '0' NOT NULL,
|
||||||
|
provider varchar2(255) DEFAULT '' ,
|
||||||
|
oauth_provider_id clob DEFAULT '' ,
|
||||||
|
CONSTRAINT pk_phpbb_oauth_accounts PRIMARY KEY (user_id, provider)
|
||||||
|
)
|
||||||
|
/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Table: 'phpbb_banlist'
|
Table: 'phpbb_banlist'
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -188,6 +188,30 @@ CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id);
|
||||||
CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id);
|
CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id);
|
||||||
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id);
|
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Table: 'phpbb_oauth_tokens'
|
||||||
|
*/
|
||||||
|
CREATE TABLE phpbb_oauth_tokens (
|
||||||
|
user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
|
||||||
|
session_id char(32) DEFAULT '' NOT NULL,
|
||||||
|
provider varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
oauth_token TEXT DEFAULT '' NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id);
|
||||||
|
CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Table: 'phpbb_oauth_accounts'
|
||||||
|
*/
|
||||||
|
CREATE TABLE phpbb_oauth_accounts (
|
||||||
|
user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
|
||||||
|
provider varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
oauth_provider_id varchar(4000) DEFAULT '' NOT NULL,
|
||||||
|
PRIMARY KEY (user_id, provider)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Table: 'phpbb_banlist'
|
Table: 'phpbb_banlist'
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -170,7 +170,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('limit_search_load'
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_anon_lastread', '0');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_anon_lastread', '0');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_birthdays', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_birthdays', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_memberlist', '0');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_memberlist', '0');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_profile', '0');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_pm', '0');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewprofile', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewprofile', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic', '0');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic', '0');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1');
|
||||||
|
|
|
@ -89,6 +89,26 @@ CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id);
|
||||||
CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id);
|
CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id);
|
||||||
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id);
|
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id);
|
||||||
|
|
||||||
|
# Table: 'phpbb_oauth_tokens'
|
||||||
|
CREATE TABLE phpbb_oauth_tokens (
|
||||||
|
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
session_id char(32) NOT NULL DEFAULT '',
|
||||||
|
provider varchar(255) NOT NULL DEFAULT '',
|
||||||
|
oauth_token mediumtext(16777215) NOT NULL DEFAULT ''
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id);
|
||||||
|
CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider);
|
||||||
|
|
||||||
|
# Table: 'phpbb_oauth_accounts'
|
||||||
|
CREATE TABLE phpbb_oauth_accounts (
|
||||||
|
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
provider varchar(255) NOT NULL DEFAULT '',
|
||||||
|
oauth_provider_id text(65535) NOT NULL DEFAULT '',
|
||||||
|
PRIMARY KEY (user_id, provider)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
# Table: 'phpbb_banlist'
|
# Table: 'phpbb_banlist'
|
||||||
CREATE TABLE phpbb_banlist (
|
CREATE TABLE phpbb_banlist (
|
||||||
ban_id INTEGER PRIMARY KEY NOT NULL ,
|
ban_id INTEGER PRIMARY KEY NOT NULL ,
|
||||||
|
|
|
@ -396,6 +396,12 @@ $lang = array_merge($lang, array(
|
||||||
|
|
||||||
'AUTH_METHOD' => 'Select an authentication method',
|
'AUTH_METHOD' => 'Select an authentication method',
|
||||||
|
|
||||||
|
'AUTH_PROVIDER_OAUTH_ERROR_ELEMENT_MISSING' => 'Both the key and secret of each enabled OAuth service provider must be provided. Only one was provided for an OAuth service provider.',
|
||||||
|
'AUTH_PROVIDER_OAUTH_EXPLAIN' => 'Each OAuth provider requires a unique secret and key in order to authenticate with the external server.<br />These should be supplied by the OAuth service when you register your website with them and should be entered exactly as provided to you.<br />Any service that does not have both a key and a secret entered here will not be available for use by the forum users.',
|
||||||
|
'AUTH_PROVIDER_OAUTH_KEY' => 'Key',
|
||||||
|
'AUTH_PROVIDER_OAUTH_TITLE' => 'OAuth',
|
||||||
|
'AUTH_PROVIDER_OAUTH_SECRET' => 'Secret',
|
||||||
|
|
||||||
'APACHE_SETUP_BEFORE_USE' => 'You have to setup apache authentication before you switch phpBB to this authentication method. Keep in mind that the username you use for apache authentication has to be the same as your phpBB username. Apache authentication can only be used with mod_php (not with a CGI version) and safe_mode disabled.',
|
'APACHE_SETUP_BEFORE_USE' => 'You have to setup apache authentication before you switch phpBB to this authentication method. Keep in mind that the username you use for apache authentication has to be the same as your phpBB username. Apache authentication can only be used with mod_php (not with a CGI version) and safe_mode disabled.',
|
||||||
|
|
||||||
'LDAP_DN' => 'LDAP base <var>dn</var>',
|
'LDAP_DN' => 'LDAP base <var>dn</var>',
|
||||||
|
|
|
@ -88,6 +88,14 @@ $lang = array_merge($lang, array(
|
||||||
'ATTACHED_IMAGE_NOT_IMAGE' => 'The image file you tried to attach is invalid.',
|
'ATTACHED_IMAGE_NOT_IMAGE' => 'The image file you tried to attach is invalid.',
|
||||||
'AUTHOR' => 'Author',
|
'AUTHOR' => 'Author',
|
||||||
'AUTH_NO_PROFILE_CREATED' => 'The creation of a user profile was unsuccessful.',
|
'AUTH_NO_PROFILE_CREATED' => 'The creation of a user profile was unsuccessful.',
|
||||||
|
'AUTH_PROVIDER_OAUTH_ERROR_INVALID_ENTRY' => 'Invalid database entry.',
|
||||||
|
'AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE' => 'Invalid service type provided to OAuth service handler.',
|
||||||
|
'AUTH_PROVIDER_OAUTH_ERROR_SERVICE_NOT_CREATED' => 'OAuth service not created',
|
||||||
|
'AUTH_PROVIDER_OAUTH_SERVICE_BITLY' => 'Bitly',
|
||||||
|
'AUTH_PROVIDER_OAUTH_SERVICE_FACEBOOK' => 'Facebook',
|
||||||
|
'AUTH_PROVIDER_OAUTH_SERVICE_GOOGLE' => 'Google',
|
||||||
|
'AUTH_PROVIDER_OAUTH_TOKEN_ERROR_NOT_STORED' => 'OAuth token not stored.',
|
||||||
|
'AUTH_PROVIDER_OAUTH_TOKEN_ERROR_INCORRECTLY_STORED' => 'OAuth token incorrectly stored.',
|
||||||
'AVATAR_DISALLOWED_CONTENT' => 'The upload was rejected because the uploaded file was identified as a possible attack vector.',
|
'AVATAR_DISALLOWED_CONTENT' => 'The upload was rejected because the uploaded file was identified as a possible attack vector.',
|
||||||
'AVATAR_DISALLOWED_EXTENSION' => 'This file cannot be displayed because the extension <strong>%s</strong> is not allowed.',
|
'AVATAR_DISALLOWED_EXTENSION' => 'This file cannot be displayed because the extension <strong>%s</strong> is not allowed.',
|
||||||
'AVATAR_EMPTY_REMOTE_DATA' => 'The specified avatar could not be uploaded because the remote data appears to be invalid or corrupted.',
|
'AVATAR_EMPTY_REMOTE_DATA' => 'The specified avatar could not be uploaded because the remote data appears to be invalid or corrupted.',
|
||||||
|
@ -351,6 +359,7 @@ $lang = array_merge($lang, array(
|
||||||
'LOGIN_CONFIRM_EXPLAIN' => 'To prevent brute forcing accounts the board requires you to enter a confirmation code after a maximum amount of failed logins. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.', // unused
|
'LOGIN_CONFIRM_EXPLAIN' => 'To prevent brute forcing accounts the board requires you to enter a confirmation code after a maximum amount of failed logins. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.', // unused
|
||||||
'LOGIN_ERROR_ATTEMPTS' => 'You exceeded the maximum allowed number of login attempts. In addition to your username and password you now also have to solve the CAPTCHA below.',
|
'LOGIN_ERROR_ATTEMPTS' => 'You exceeded the maximum allowed number of login attempts. In addition to your username and password you now also have to solve the CAPTCHA below.',
|
||||||
'LOGIN_ERROR_EXTERNAL_AUTH_APACHE' => 'You have not been authenticated by Apache.',
|
'LOGIN_ERROR_EXTERNAL_AUTH_APACHE' => 'You have not been authenticated by Apache.',
|
||||||
|
'LOGIN_ERROR_OAUTH_SERVICE_DOES_NOT_EXIST' => 'A non-existant OAuth service has been requested.',
|
||||||
'LOGIN_ERROR_PASSWORD' => 'You have specified an incorrect password. Please check your password and try again. If you continue to have problems please contact the %sBoard Administrator%s.',
|
'LOGIN_ERROR_PASSWORD' => 'You have specified an incorrect password. Please check your password and try again. If you continue to have problems please contact the %sBoard Administrator%s.',
|
||||||
'LOGIN_ERROR_PASSWORD_CONVERT' => 'It was not possible to convert your password when updating this bulletin board’s software. Please %srequest a new password%s. If you continue to have problems please contact the %sBoard Administrator%s.',
|
'LOGIN_ERROR_PASSWORD_CONVERT' => 'It was not possible to convert your password when updating this bulletin board’s software. Please %srequest a new password%s. If you continue to have problems please contact the %sBoard Administrator%s.',
|
||||||
'LOGIN_ERROR_USERNAME' => 'You have specified an incorrect username. Please check your username and try again. If you continue to have problems please contact the %sBoard Administrator%s.',
|
'LOGIN_ERROR_USERNAME' => 'You have specified an incorrect username. Please check your username and try again. If you continue to have problems please contact the %sBoard Administrator%s.',
|
||||||
|
@ -414,6 +423,8 @@ $lang = array_merge($lang, array(
|
||||||
2 => '<strong>%d</strong> Notifications',
|
2 => '<strong>%d</strong> Notifications',
|
||||||
),
|
),
|
||||||
'NOTIFICATION_BOOKMARK' => '%1$s replied to the topic "%2$s" you have bookmarked.',
|
'NOTIFICATION_BOOKMARK' => '%1$s replied to the topic "%2$s" you have bookmarked.',
|
||||||
|
'NOTIFICATION_GROUP_REQUEST' => '%1$s is requesting to join the group %2$s.',
|
||||||
|
'NOTIFICATION_GROUP_REQUEST_APPROVED' => 'Your request to join the group %1$s has been approved.',
|
||||||
'NOTIFICATION_PM' => '%1$s sent you a Private Message "%2$s".',
|
'NOTIFICATION_PM' => '%1$s sent you a Private Message "%2$s".',
|
||||||
'NOTIFICATION_POST' => '%1$s replied to the topic "%2$s".',
|
'NOTIFICATION_POST' => '%1$s replied to the topic "%2$s".',
|
||||||
'NOTIFICATION_POST_APPROVED' => 'Your post was approved "%2$s".',
|
'NOTIFICATION_POST_APPROVED' => 'Your post was approved "%2$s".',
|
||||||
|
|
|
@ -2,7 +2,7 @@ Subject: Forum post notification - "{FORUM_NAME}"
|
||||||
|
|
||||||
Hello {USERNAME},
|
Hello {USERNAME},
|
||||||
|
|
||||||
You are receiving this notification because you are watching the forum "{FORUM_NAME}" at "{SITENAME}". This forum has received a new reply to the topic "{TOPIC_TITLE}"<!-- IF AUTHOR_NAME --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit. You can use the following link to view the last unread reply, no more notifications will be sent until you visit the topic.
|
You are receiving this notification because you are watching the forum "{FORUM_NAME}" at "{SITENAME}". This forum has received a new reply to the topic "{TOPIC_TITLE}"<!-- IF AUTHOR_NAME !== '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit. You can use the following link to view the last unread reply, no more notifications will be sent until you visit the topic.
|
||||||
|
|
||||||
{U_NEWEST_POST}
|
{U_NEWEST_POST}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
Subject: Your request has been approved
|
|
||||||
|
|
||||||
Congratulations,
|
|
||||||
|
|
||||||
Your request to join the "{GROUP_NAME}" group on "{SITENAME}" has been approved.
|
|
||||||
Click on the following link to see your group membership.
|
|
||||||
|
|
||||||
{U_GROUP}
|
|
||||||
|
|
||||||
{EMAIL_SIG}
|
|
|
@ -12,7 +12,7 @@ Username: {USERNAME}
|
||||||
Board URL: {U_BOARD}
|
Board URL: {U_BOARD}
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
Useful information regarding the phpBB software can be found in the docs folder of your installation and on phpBB.com's support page - http://www.phpbb.com/support/
|
Useful information regarding the phpBB software can be found in the docs folder of your installation and on phpBB.com's support page - https://www.phpbb.com/support/
|
||||||
|
|
||||||
In order to keep your board safe and secure, we highly recommended keeping current with software releases. For your convenience, a mailing list is available at the page referenced above.
|
In order to keep your board safe and secure, we highly recommended keeping current with software releases. For your convenience, a mailing list is available at the page referenced above.
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ Subject: New topic notification - "{FORUM_NAME}"
|
||||||
|
|
||||||
Hello {USERNAME},
|
Hello {USERNAME},
|
||||||
|
|
||||||
You are receiving this notification because you are watching the forum "{FORUM_NAME}" at "{SITENAME}". This forum has received a new topic<!-- IF AUTHOR_NAME --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit, "{TOPIC_TITLE}". You can use the following link to view the forum, no more notifications will be sent until you visit the forum.
|
You are receiving this notification because you are watching the forum "{FORUM_NAME}" at "{SITENAME}". This forum has received a new topic<!-- IF AUTHOR_NAME !== '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit, "{TOPIC_TITLE}". You can use the following link to view the forum, no more notifications will be sent until you visit the forum.
|
||||||
|
|
||||||
{U_FORUM}
|
{U_FORUM}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ Subject: Topic reply notification - "{TOPIC_TITLE}"
|
||||||
|
|
||||||
Hello {USERNAME},
|
Hello {USERNAME},
|
||||||
|
|
||||||
You are receiving this notification because you are watching the topic "{TOPIC_TITLE}" at "{SITENAME}". This topic has received a reply<!-- IF AUTHOR_NAME --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic.
|
You are receiving this notification because you are watching the topic "{TOPIC_TITLE}" at "{SITENAME}". This topic has received a reply<!-- IF AUTHOR_NAME !== '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic.
|
||||||
|
|
||||||
If you want to view the newest post made since your last visit, click the following link:
|
If you want to view the newest post made since your last visit, click the following link:
|
||||||
{U_NEWEST_POST}
|
{U_NEWEST_POST}
|
||||||
|
|
|
@ -374,7 +374,7 @@ $lang = array_merge($lang, array(
|
||||||
|
|
||||||
// Updater
|
// Updater
|
||||||
$lang = array_merge($lang, array(
|
$lang = array_merge($lang, array(
|
||||||
'ALL_FILES_UP_TO_DATE' => 'All files are up to date with the latest phpBB version. You should now <a href="%1$s">login to your board</a> and check if everything is working fine. Do not forget to delete, rename or move your install directory! Please send us updated information about your server and board configurations from the <a href="%2$s">Send statistics</a> module in your ACP.',
|
'ALL_FILES_UP_TO_DATE' => 'All files are up to date with the latest phpBB version.',
|
||||||
'ARCHIVE_FILE' => 'Source file within archive',
|
'ARCHIVE_FILE' => 'Source file within archive',
|
||||||
|
|
||||||
'BACK' => 'Back',
|
'BACK' => 'Back',
|
||||||
|
@ -398,7 +398,7 @@ $lang = array_merge($lang, array(
|
||||||
|
|
||||||
'DATABASE_TYPE' => 'Database type',
|
'DATABASE_TYPE' => 'Database type',
|
||||||
'DATABASE_UPDATE_COMPLETE' => 'Database updater has completed!',
|
'DATABASE_UPDATE_COMPLETE' => 'Database updater has completed!',
|
||||||
'DATABASE_UPDATE_CONTINUE' => 'Continue database update.',
|
'DATABASE_UPDATE_CONTINUE' => 'Continue database update',
|
||||||
'DATABASE_UPDATE_INFO_OLD' => 'The database update file within the install directory is outdated. Please make sure you uploaded the correct version of the file.',
|
'DATABASE_UPDATE_INFO_OLD' => 'The database update file within the install directory is outdated. Please make sure you uploaded the correct version of the file.',
|
||||||
'DATABASE_UPDATE_NOT_COMPLETED' => 'The database update has not yet completed.',
|
'DATABASE_UPDATE_NOT_COMPLETED' => 'The database update has not yet completed.',
|
||||||
'DELETE_USER_REMOVE' => 'Delete user and remove posts',
|
'DELETE_USER_REMOVE' => 'Delete user and remove posts',
|
||||||
|
@ -419,8 +419,9 @@ $lang = array_merge($lang, array(
|
||||||
'DOWNLOAD_UPDATE_METHOD' => 'Download modified files archive',
|
'DOWNLOAD_UPDATE_METHOD' => 'Download modified files archive',
|
||||||
'DOWNLOAD_UPDATE_METHOD_EXPLAIN' => 'Once downloaded you should unpack the archive. You will find the modified files you need to upload to your phpBB root directory within it. Please upload the files to their respective locations then. After you have uploaded all files, please check the files again with the other button below.',
|
'DOWNLOAD_UPDATE_METHOD_EXPLAIN' => 'Once downloaded you should unpack the archive. You will find the modified files you need to upload to your phpBB root directory within it. Please upload the files to their respective locations then. After you have uploaded all files, please check the files again with the other button below.',
|
||||||
|
|
||||||
'ERROR' => 'Error',
|
|
||||||
'EDIT_USERNAME' => 'Edit username',
|
'EDIT_USERNAME' => 'Edit username',
|
||||||
|
'ERROR' => 'Error',
|
||||||
|
'EVERYTHING_UP_TO_DATE' => 'Everything is up to date with the latest phpBB version. You should now <a href="%1$s">login to your board</a> and check if everything is working fine. Do not forget to delete, rename or move your install directory! Please send us updated information about your server and board configurations from the <a href="%2$s">Send statistics</a> module in your ACP.',
|
||||||
|
|
||||||
'FILE_ALREADY_UP_TO_DATE' => 'File is already up to date.',
|
'FILE_ALREADY_UP_TO_DATE' => 'File is already up to date.',
|
||||||
'FILE_DIFF_NOT_ALLOWED' => 'File not allowed to be diffed.',
|
'FILE_DIFF_NOT_ALLOWED' => 'File not allowed to be diffed.',
|
||||||
|
@ -570,6 +571,7 @@ $lang = array_merge($lang, array(
|
||||||
'UPLOAD_METHOD' => 'Upload method',
|
'UPLOAD_METHOD' => 'Upload method',
|
||||||
|
|
||||||
'UPDATE_DB_SUCCESS' => 'Database update was successful.',
|
'UPDATE_DB_SUCCESS' => 'Database update was successful.',
|
||||||
|
'UPDATE_FILE_SUCCESS' => 'File update was successful.',
|
||||||
'USER_ACTIVE' => 'Active user',
|
'USER_ACTIVE' => 'Active user',
|
||||||
'USER_INACTIVE' => 'Inactive user',
|
'USER_INACTIVE' => 'Inactive user',
|
||||||
|
|
||||||
|
|
|
@ -270,6 +270,10 @@ $lang = array_merge($lang, array(
|
||||||
'LINK_REMOTE_SIZE' => 'Avatar dimensions',
|
'LINK_REMOTE_SIZE' => 'Avatar dimensions',
|
||||||
'LINK_REMOTE_SIZE_EXPLAIN' => 'Specify the width and height of the avatar, leave blank to attempt automatic verification.',
|
'LINK_REMOTE_SIZE_EXPLAIN' => 'Specify the width and height of the avatar, leave blank to attempt automatic verification.',
|
||||||
'LOGIN_EXPLAIN_UCP' => 'Please login in order to access the User Control Panel.',
|
'LOGIN_EXPLAIN_UCP' => 'Please login in order to access the User Control Panel.',
|
||||||
|
'LOGIN_LINK' => 'Link or register your account on an external service with your board account',
|
||||||
|
'LOGIN_LINK_EXPLAIN' => 'You have attempted to login with an external service that is not yet connected to an account on this board. You must now either link this account to an existing account or create a new account.',
|
||||||
|
'LOGIN_LINK_MISSING_DATA' => 'Data that is necessary to link your account with an external service is not available. Please restart the login process.',
|
||||||
|
'LOGIN_LINK_NO_DATA_PROVIDED' => 'No data has been provided to this page to link an external account to a forum account. Please contact the board administrator if you continue to experience problems.',
|
||||||
'LOGIN_KEY' => 'Login Key',
|
'LOGIN_KEY' => 'Login Key',
|
||||||
'LOGIN_TIME' => 'Login Time',
|
'LOGIN_TIME' => 'Login Time',
|
||||||
'LOGIN_REDIRECT' => 'You have been successfully logged in.',
|
'LOGIN_REDIRECT' => 'You have been successfully logged in.',
|
||||||
|
@ -313,6 +317,7 @@ $lang = array_merge($lang, array(
|
||||||
'NOTIFICATION_METHOD_JABBER' => 'Jabber',
|
'NOTIFICATION_METHOD_JABBER' => 'Jabber',
|
||||||
'NOTIFICATION_TYPE' => 'Notification type',
|
'NOTIFICATION_TYPE' => 'Notification type',
|
||||||
'NOTIFICATION_TYPE_BOOKMARK' => 'Someone replies to a topic you have bookmarked',
|
'NOTIFICATION_TYPE_BOOKMARK' => 'Someone replies to a topic you have bookmarked',
|
||||||
|
'NOTIFICATION_TYPE_GROUP_REQUEST' => 'Someone requests to join a group you lead',
|
||||||
'NOTIFICATION_TYPE_IN_MODERATION_QUEUE' => 'A post or topic needs approval',
|
'NOTIFICATION_TYPE_IN_MODERATION_QUEUE' => 'A post or topic needs approval',
|
||||||
'NOTIFICATION_TYPE_MODERATION_QUEUE' => 'Your topics/posts are approved or disapproved by a moderator',
|
'NOTIFICATION_TYPE_MODERATION_QUEUE' => 'Your topics/posts are approved or disapproved by a moderator',
|
||||||
'NOTIFICATION_TYPE_PM' => 'Someone sends you a private message',
|
'NOTIFICATION_TYPE_PM' => 'Someone sends you a private message',
|
||||||
|
@ -475,11 +480,19 @@ $lang = array_merge($lang, array(
|
||||||
'UCP_ADMIN_ACTIVATE' => 'Please note that you will need to enter a valid email address before your account is activated. The administrator will review your account and if approved you will receive an email at the address you specified.',
|
'UCP_ADMIN_ACTIVATE' => 'Please note that you will need to enter a valid email address before your account is activated. The administrator will review your account and if approved you will receive an email at the address you specified.',
|
||||||
'UCP_AIM' => 'AOL Instant Messenger',
|
'UCP_AIM' => 'AOL Instant Messenger',
|
||||||
'UCP_ATTACHMENTS' => 'Attachments',
|
'UCP_ATTACHMENTS' => 'Attachments',
|
||||||
|
'UCP_AUTH_LINK' => 'External accounts',
|
||||||
|
'UCP_AUTH_LINK_ASK' => 'You currently have no account associated with this external service. Click the button below to link your board account to an account with this external service.',
|
||||||
|
'UCP_AUTH_LINK_ID' => 'Unique identifier',
|
||||||
|
'UCP_AUTH_LINK_LINK' => 'Link',
|
||||||
|
'UCP_AUTH_LINK_MANAGE' => 'Manage external account associations',
|
||||||
|
'UCP_AUTH_LINK_TITLE' => 'Manage your external account associations',
|
||||||
|
'UCP_AUTH_LINK_UNLINK' => 'Unlink',
|
||||||
'UCP_COPPA_BEFORE' => 'Before %s',
|
'UCP_COPPA_BEFORE' => 'Before %s',
|
||||||
'UCP_COPPA_ON_AFTER' => 'On or after %s',
|
'UCP_COPPA_ON_AFTER' => 'On or after %s',
|
||||||
'UCP_EMAIL_ACTIVATE' => 'Please note that you will need to enter a valid email address before your account is activated. You will receive an email at the address you provide that contains an account activation link.',
|
'UCP_EMAIL_ACTIVATE' => 'Please note that you will need to enter a valid email address before your account is activated. You will receive an email at the address you provide that contains an account activation link.',
|
||||||
'UCP_ICQ' => 'ICQ number',
|
'UCP_ICQ' => 'ICQ number',
|
||||||
'UCP_JABBER' => 'Jabber address',
|
'UCP_JABBER' => 'Jabber address',
|
||||||
|
'UCP_LOGIN_LINK' => 'Set up an external account association',
|
||||||
|
|
||||||
'UCP_MAIN' => 'Overview',
|
'UCP_MAIN' => 'Overview',
|
||||||
'UCP_MAIN_ATTACHMENTS' => 'Manage attachments',
|
'UCP_MAIN_ATTACHMENTS' => 'Manage attachments',
|
||||||
|
|
|
@ -970,6 +970,18 @@ class phpbb_auth
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the auth provider wants us to link an empty account do so and redirect
|
||||||
|
if ($login['status'] == LOGIN_SUCCESS_LINK_PROFILE)
|
||||||
|
{
|
||||||
|
// If this status exists a fourth field is in the $login array called 'redirect_data'
|
||||||
|
// This data is passed along as GET data to the next page allow the account to be linked
|
||||||
|
|
||||||
|
$params = array('mode' => 'login_link');
|
||||||
|
$url = append_sid($phpbb_root_path . 'ucp.' . $phpEx, array_merge($params, $login['redirect_data']));
|
||||||
|
|
||||||
|
redirect($url);
|
||||||
|
}
|
||||||
|
|
||||||
// If login succeeded, we will log the user in... else we pass the login array through...
|
// If login succeeded, we will log the user in... else we pass the login array through...
|
||||||
if ($login['status'] == LOGIN_SUCCESS)
|
if ($login['status'] == LOGIN_SUCCESS)
|
||||||
{
|
{
|
||||||
|
|
|
@ -54,6 +54,22 @@ abstract class phpbb_auth_provider_base implements phpbb_auth_provider_interface
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_login_data()
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_auth_link_data()
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -69,4 +85,28 @@ abstract class phpbb_auth_provider_base implements phpbb_auth_provider_interface
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function login_link_has_necessary_data($login_link_data)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function link_account(array $link_data)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function unlink_account(array $link_data)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,11 @@ interface phpbb_auth_provider_interface
|
||||||
* 'error_msg' => string
|
* 'error_msg' => string
|
||||||
* 'user_row' => array
|
* 'user_row' => array
|
||||||
* )
|
* )
|
||||||
|
* A fourth key of the array may be present:
|
||||||
|
* 'redirect_data' This key is only used when 'status' is
|
||||||
|
* equal to LOGIN_SUCCESS_LINK_PROFILE and its value is an
|
||||||
|
* associative array that is turned into GET variables on
|
||||||
|
* the redirect url.
|
||||||
*/
|
*/
|
||||||
public function login($username, $password);
|
public function login($username, $password);
|
||||||
|
|
||||||
|
@ -80,9 +85,48 @@ interface phpbb_auth_provider_interface
|
||||||
* 'TEMPLATE_FILE' => string,
|
* 'TEMPLATE_FILE' => string,
|
||||||
* 'TEMPLATE_VARS' => array(...),
|
* 'TEMPLATE_VARS' => array(...),
|
||||||
* )
|
* )
|
||||||
|
* An optional third element may be added to this
|
||||||
|
* array: 'BLOCK_VAR_NAME'. If this is present,
|
||||||
|
* then its value should be a string that is used
|
||||||
|
* to designate the name of the loop used in the
|
||||||
|
* ACP template file. When this is present, an
|
||||||
|
* additional key named 'BLOCK_VARS' is required.
|
||||||
|
* This must be an array containing at least one
|
||||||
|
* array of variables that will be assigned during
|
||||||
|
* the loop in the template. An example of this is
|
||||||
|
* presented below:
|
||||||
|
* array(
|
||||||
|
* 'BLOCK_VAR_NAME' => string,
|
||||||
|
* 'BLOCK_VARS' => array(
|
||||||
|
* 'KEY IS UNIMPORTANT' => array(...),
|
||||||
|
* ),
|
||||||
|
* 'TEMPLATE_FILE' => string,
|
||||||
|
* 'TEMPLATE_VARS' => array(...),
|
||||||
|
* )
|
||||||
*/
|
*/
|
||||||
public function get_acp_template($new_config);
|
public function get_acp_template($new_config);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an array of data necessary to build custom elements on the login
|
||||||
|
* form.
|
||||||
|
*
|
||||||
|
* @return array|null If this function is not implemented on an auth
|
||||||
|
* provider then it returns null. If it is implemented
|
||||||
|
* it will return an array of up to four elements of
|
||||||
|
* which only 'TEMPLATE_FILE'. If 'BLOCK_VAR_NAME' is
|
||||||
|
* present then 'BLOCK_VARS' must also be present in
|
||||||
|
* the array. The fourth element 'VARS' is also
|
||||||
|
* optional. The array, with all four elements present
|
||||||
|
* looks like the following:
|
||||||
|
* array(
|
||||||
|
* 'TEMPLATE_FILE' => string,
|
||||||
|
* 'BLOCK_VAR_NAME' => string,
|
||||||
|
* 'BLOCK_VARS' => array(...),
|
||||||
|
* 'VARS' => array(...),
|
||||||
|
* )
|
||||||
|
*/
|
||||||
|
public function get_login_data();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs additional actions during logout.
|
* Performs additional actions during logout.
|
||||||
*
|
*
|
||||||
|
@ -102,4 +146,52 @@ interface phpbb_auth_provider_interface
|
||||||
* session should be closed, or null if not implemented.
|
* session should be closed, or null if not implemented.
|
||||||
*/
|
*/
|
||||||
public function validate_session($user);
|
public function validate_session($user);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks to see if $login_link_data contains all information except for the
|
||||||
|
* user_id of an account needed to successfully link an external account to
|
||||||
|
* a forum account.
|
||||||
|
*
|
||||||
|
* @param array $link_data Any data needed to link a phpBB account to
|
||||||
|
* an external account.
|
||||||
|
* @return string|null Returns a string with a language constant if there
|
||||||
|
* is data missing or null if there is no error.
|
||||||
|
*/
|
||||||
|
public function login_link_has_necessary_data($login_link_data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Links an external account to a phpBB account.
|
||||||
|
*
|
||||||
|
* @param array $link_data Any data needed to link a phpBB account to
|
||||||
|
* an external account.
|
||||||
|
*/
|
||||||
|
public function link_account(array $link_data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an array of data necessary to build the ucp_auth_link page
|
||||||
|
*
|
||||||
|
* @return array|null If this function is not implemented on an auth
|
||||||
|
* provider then it returns null. If it is implemented
|
||||||
|
* it will return an array of up to four elements of
|
||||||
|
* which only 'TEMPLATE_FILE'. If 'BLOCK_VAR_NAME' is
|
||||||
|
* present then 'BLOCK_VARS' must also be present in
|
||||||
|
* the array. The fourth element 'VARS' is also
|
||||||
|
* optional. The array, with all four elements present
|
||||||
|
* looks like the following:
|
||||||
|
* array(
|
||||||
|
* 'TEMPLATE_FILE' => string,
|
||||||
|
* 'BLOCK_VAR_NAME' => string,
|
||||||
|
* 'BLOCK_VARS' => array(...),
|
||||||
|
* 'VARS' => array(...),
|
||||||
|
* )
|
||||||
|
*/
|
||||||
|
public function get_auth_link_data();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unlinks an external account from a phpBB account.
|
||||||
|
*
|
||||||
|
* @param array $link_data Any data needed to unlink a phpBB account
|
||||||
|
* from a phpbb account.
|
||||||
|
*/
|
||||||
|
public function unlink_account(array $link_data);
|
||||||
}
|
}
|
||||||
|
|
618
phpBB/phpbb/auth/provider/oauth/oauth.php
Normal file
618
phpBB/phpbb/auth/provider/oauth/oauth.php
Normal file
|
@ -0,0 +1,618 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package auth
|
||||||
|
* @copyright (c) 2013 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
|
if (!defined('IN_PHPBB'))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
use OAuth\Common\Consumer\Credentials;
|
||||||
|
use OAuth\Common\Http\Uri\Uri;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OAuth authentication provider for phpBB3
|
||||||
|
*
|
||||||
|
* @package auth
|
||||||
|
*/
|
||||||
|
class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Database driver
|
||||||
|
*
|
||||||
|
* @var phpbb_db_driver
|
||||||
|
*/
|
||||||
|
protected $db;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* phpBB config
|
||||||
|
*
|
||||||
|
* @var phpbb_config
|
||||||
|
*/
|
||||||
|
protected $config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* phpBB request object
|
||||||
|
*
|
||||||
|
* @var phpbb_request
|
||||||
|
*/
|
||||||
|
protected $request;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* phpBB user
|
||||||
|
*
|
||||||
|
* @var phpbb_user
|
||||||
|
*/
|
||||||
|
protected $user;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OAuth token table
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $auth_provider_oauth_token_storage_table;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OAuth account association table
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $auth_provider_oauth_token_account_assoc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* All OAuth service providers
|
||||||
|
*
|
||||||
|
* @var phpbb_di_service_collection Contains phpbb_auth_provider_oauth_service_interface
|
||||||
|
*/
|
||||||
|
protected $service_providers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Users table
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $users_table;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cached current uri object
|
||||||
|
*
|
||||||
|
* @var \OAuth\Common\Http\Uri\UriInterface|null
|
||||||
|
*/
|
||||||
|
protected $current_uri;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* phpBB root path
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $phpbb_root_path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHP extenstion
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $php_ext;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OAuth Authentication Constructor
|
||||||
|
*
|
||||||
|
* @param phpbb_db_driver $db
|
||||||
|
* @param phpbb_config $config
|
||||||
|
* @param phpbb_request $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 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)
|
||||||
|
{
|
||||||
|
$this->db = $db;
|
||||||
|
$this->config = $config;
|
||||||
|
$this->request = $request;
|
||||||
|
$this->user = $user;
|
||||||
|
$this->auth_provider_oauth_token_storage_table = $auth_provider_oauth_token_storage_table;
|
||||||
|
$this->auth_provider_oauth_token_account_assoc = $auth_provider_oauth_token_account_assoc;
|
||||||
|
$this->service_providers = $service_providers;
|
||||||
|
$this->users_table = $users_table;
|
||||||
|
$this->phpbb_root_path = $phpbb_root_path;
|
||||||
|
$this->php_ext = $php_ext;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function init()
|
||||||
|
{
|
||||||
|
// This does not test whether or not the key and secret provided are valid.
|
||||||
|
foreach ($this->service_providers as $service_provider)
|
||||||
|
{
|
||||||
|
$credentials = $service_provider->get_service_credentials();
|
||||||
|
|
||||||
|
if (($credentials['key'] && !$credentials['secret']) || (!$credentials['key'] && $credentials['secret']))
|
||||||
|
{
|
||||||
|
return $this->user->lang['AUTH_PROVIDER_OAUTH_ERROR_ELEMENT_MISSING'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function login($username, $password)
|
||||||
|
{
|
||||||
|
// 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);
|
||||||
|
return $provider->login($username, $password);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Requst the name of the OAuth service
|
||||||
|
$service_name_original = $this->request->variable('oauth_service', '', false);
|
||||||
|
$service_name = 'auth.provider.oauth.service.' . strtolower($service_name_original);
|
||||||
|
if ($service_name_original === '' || !array_key_exists($service_name, $this->service_providers))
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'status' => LOGIN_ERROR_EXTERNAL_AUTH,
|
||||||
|
'error_msg' => 'LOGIN_ERROR_OAUTH_SERVICE_DOES_NOT_EXIST',
|
||||||
|
'user_row' => array('user_id' => ANONYMOUS),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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);
|
||||||
|
$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))
|
||||||
|
{
|
||||||
|
$this->service_providers[$service_name]->set_external_service_provider($service);
|
||||||
|
$unique_id = $this->service_providers[$service_name]->perform_auth_login();
|
||||||
|
|
||||||
|
// Check to see if this provider is already assosciated with an account
|
||||||
|
$data = array(
|
||||||
|
'provider' => $service_name_original,
|
||||||
|
'oauth_provider_id' => $unique_id
|
||||||
|
);
|
||||||
|
$sql = 'SELECT user_id FROM ' . $this->auth_provider_oauth_token_account_assoc . '
|
||||||
|
WHERE ' . $this->db->sql_build_array('SELECT', $data);
|
||||||
|
$result = $this->db->sql_query($sql);
|
||||||
|
$row = $this->db->sql_fetchrow($result);
|
||||||
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
|
if (!$row)
|
||||||
|
{
|
||||||
|
// The user does not yet exist, ask to link or create profile
|
||||||
|
return array(
|
||||||
|
'status' => LOGIN_SUCCESS_LINK_PROFILE,
|
||||||
|
'error_msg' => 'LOGIN_OAUTH_ACCOUNT_NOT_LINKED',
|
||||||
|
'user_row' => array(),
|
||||||
|
'redirect_data' => array(
|
||||||
|
'auth_provider' => 'oauth',
|
||||||
|
'login_link_oauth_service' => $service_name_original,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve the user's account
|
||||||
|
$sql = 'SELECT user_id, username, user_password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts
|
||||||
|
FROM ' . $this->users_table . '
|
||||||
|
WHERE user_id = ' . (int) $row['user_id'];
|
||||||
|
$result = $this->db->sql_query($sql);
|
||||||
|
$row = $this->db->sql_fetchrow($result);
|
||||||
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
|
if (!$row)
|
||||||
|
{
|
||||||
|
throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_ENTRY');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update token storage to store the user_id
|
||||||
|
$storage->set_user_id($row['user_id']);
|
||||||
|
|
||||||
|
// The user is now authenticated and can be logged in
|
||||||
|
return array(
|
||||||
|
'status' => LOGIN_SUCCESS,
|
||||||
|
'error_msg' => false,
|
||||||
|
'user_row' => $row,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$url = $service->getAuthorizationUri();
|
||||||
|
header('Location: ' . $url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the cached current_uri object or creates and caches it if it is
|
||||||
|
* not already created. In each case the query string is updated based on
|
||||||
|
* the $query parameter.
|
||||||
|
*
|
||||||
|
* @param string $service_name The name of the service
|
||||||
|
* @param string $query The query string of the current_uri
|
||||||
|
* used in redirects
|
||||||
|
* @return \OAuth\Common\Http\Uri\UriInterface
|
||||||
|
*/
|
||||||
|
protected function get_current_uri($service_name, $query)
|
||||||
|
{
|
||||||
|
if ($this->current_uri)
|
||||||
|
{
|
||||||
|
$this->current_uri->setQuery($query);
|
||||||
|
return $this->current_uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
$uri_factory = new \OAuth\Common\Http\Uri\UriFactory();
|
||||||
|
$current_uri = $uri_factory->createFromSuperGlobalArray($this->request->get_super_global(phpbb_request_interface::SERVER));
|
||||||
|
$current_uri->setQuery($query);
|
||||||
|
|
||||||
|
$this->current_uri = $current_uri;
|
||||||
|
return $current_uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 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)
|
||||||
|
{
|
||||||
|
$current_uri = $this->get_current_uri($service_name, $query);
|
||||||
|
|
||||||
|
// Setup the credentials for the requests
|
||||||
|
$credentials = new Credentials(
|
||||||
|
$service_credentials['key'],
|
||||||
|
$service_credentials['secret'],
|
||||||
|
$current_uri->getAbsoluteUri()
|
||||||
|
);
|
||||||
|
|
||||||
|
$service_factory = new \OAuth\ServiceFactory();
|
||||||
|
$service = $service_factory->createService($service_name, $credentials, $storage, $scopes);
|
||||||
|
|
||||||
|
if (!$service)
|
||||||
|
{
|
||||||
|
throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_SERVICE_NOT_CREATED');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $service;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_login_data()
|
||||||
|
{
|
||||||
|
$login_data = array(
|
||||||
|
'TEMPLATE_FILE' => 'login_body_oauth.html',
|
||||||
|
'BLOCK_VAR_NAME' => 'oauth',
|
||||||
|
'BLOCK_VARS' => array(),
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($this->service_providers as $service_name => $service_provider)
|
||||||
|
{
|
||||||
|
// Only include data if the credentials are set
|
||||||
|
$credentials = $service_provider->get_service_credentials();
|
||||||
|
if ($credentials['key'] && $credentials['secret'])
|
||||||
|
{
|
||||||
|
$actual_name = str_replace('auth.provider.oauth.service.', '', $service_name);
|
||||||
|
$redirect_url = build_url(false) . '&login=external&oauth_service=' . $actual_name;
|
||||||
|
$login_data['BLOCK_VARS'][$service_name] = array(
|
||||||
|
'REDIRECT_URL' => redirect($redirect_url, true),
|
||||||
|
'SERVICE_NAME' => $this->user->lang['AUTH_PROVIDER_OAUTH_SERVICE_' . strtoupper($actual_name)],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $login_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function acp()
|
||||||
|
{
|
||||||
|
$ret = array();
|
||||||
|
|
||||||
|
foreach ($this->service_providers as $service_name => $service_provider)
|
||||||
|
{
|
||||||
|
$actual_name = str_replace('auth.provider.oauth.service.', '', $service_name);
|
||||||
|
$ret[] = 'auth_oauth_' . $actual_name . '_key';
|
||||||
|
$ret[] = 'auth_oauth_' . $actual_name . '_secret';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_acp_template($new_config)
|
||||||
|
{
|
||||||
|
$ret = array(
|
||||||
|
'BLOCK_VAR_NAME' => 'oauth_services',
|
||||||
|
'BLOCK_VARS' => array(),
|
||||||
|
'TEMPLATE_FILE' => 'auth_provider_oauth.html',
|
||||||
|
'TEMPLATE_VARS' => array(),
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($this->service_providers as $service_name => $service_provider)
|
||||||
|
{
|
||||||
|
$actual_name = str_replace('auth.provider.oauth.service.', '', $service_name);
|
||||||
|
$ret['BLOCK_VARS'][$actual_name] = array(
|
||||||
|
'ACTUAL_NAME' => $this->user->lang['AUTH_PROVIDER_OAUTH_SERVICE_' . strtoupper($actual_name)],
|
||||||
|
'KEY' => $new_config['auth_oauth_' . $actual_name . '_key'],
|
||||||
|
'NAME' => $actual_name,
|
||||||
|
'SECRET' => $new_config['auth_oauth_' . $actual_name . '_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function login_link_has_necessary_data($login_link_data)
|
||||||
|
{
|
||||||
|
if (empty($login_link_data))
|
||||||
|
{
|
||||||
|
return 'LOGIN_LINK_NO_DATA_PROVIDED';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!array_key_exists('oauth_service', $login_link_data) || !$login_link_data['oauth_service'] ||
|
||||||
|
!array_key_exists('link_method', $login_link_data) || !$login_link_data['link_method'])
|
||||||
|
{
|
||||||
|
return 'LOGIN_LINK_MISSING_DATA';
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function link_account(array $link_data)
|
||||||
|
{
|
||||||
|
// Check for a valid link method (auth_link or login_link)
|
||||||
|
if (!array_key_exists('link_method', $link_data) ||
|
||||||
|
!in_array($link_data['link_method'], array(
|
||||||
|
'auth_link',
|
||||||
|
'login_link',
|
||||||
|
)))
|
||||||
|
{
|
||||||
|
return 'LOGIN_LINK_MISSING_DATA';
|
||||||
|
}
|
||||||
|
|
||||||
|
// We must have an oauth_service listed, check for it two ways
|
||||||
|
if (!array_key_exists('oauth_service', $link_data) || !$link_data['oauth_service'])
|
||||||
|
{
|
||||||
|
$link_data['oauth_service'] = $this->request->variable('oauth_service', '');
|
||||||
|
|
||||||
|
if (!$link_data['oauth_service'])
|
||||||
|
{
|
||||||
|
return 'LOGIN_LINK_MISSING_DATA';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$service_name = 'auth.provider.oauth.service.' . strtolower($link_data['oauth_service']);
|
||||||
|
if (!array_key_exists($service_name, $this->service_providers))
|
||||||
|
{
|
||||||
|
return 'LOGIN_ERROR_OAUTH_SERVICE_DOES_NOT_EXIST';
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($link_data['link_method'])
|
||||||
|
{
|
||||||
|
case 'auth_link':
|
||||||
|
return $this->link_account_auth_link($link_data, $service_name);
|
||||||
|
case 'login_link':
|
||||||
|
return $this->link_account_login_link($link_data, $service_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Performs the account linking for login_link
|
||||||
|
*
|
||||||
|
* @param array $link_data The same variable given to {@see phpbb_auth_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
|
||||||
|
* encountered, or null on success.
|
||||||
|
*/
|
||||||
|
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);
|
||||||
|
|
||||||
|
// Check for an access token, they should have one
|
||||||
|
if (!$storage->has_access_token_by_session($service_name))
|
||||||
|
{
|
||||||
|
return 'LOGIN_LINK_ERROR_OAUTH_NO_ACCESS_TOKEN';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prepare the query string
|
||||||
|
$query = 'mode=login_link&login_link_oauth_service=' . strtolower($link_data['oauth_service']);
|
||||||
|
|
||||||
|
// Prepare for an authentication request
|
||||||
|
$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);
|
||||||
|
$this->service_providers[$service_name]->set_external_service_provider($service);
|
||||||
|
|
||||||
|
// The user has already authenticated successfully, request to authenticate again
|
||||||
|
$unique_id = $this->service_providers[$service_name]->perform_token_auth();
|
||||||
|
|
||||||
|
// Insert into table, they will be able to log in after this
|
||||||
|
$data = array(
|
||||||
|
'user_id' => $link_data['user_id'],
|
||||||
|
'provider' => strtolower($link_data['oauth_service']),
|
||||||
|
'oauth_provider_id' => $unique_id,
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->link_account_perform_link($data);
|
||||||
|
// Update token storage to store the user_id
|
||||||
|
$storage->set_user_id($link_data['user_id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Performs the account linking for auth_link
|
||||||
|
*
|
||||||
|
* @param array $link_data The same variable given to {@see phpbb_auth_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
|
||||||
|
* encountered, or null on success.
|
||||||
|
*/
|
||||||
|
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);
|
||||||
|
$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))
|
||||||
|
{
|
||||||
|
$this->service_providers[$service_name]->set_external_service_provider($service);
|
||||||
|
$unique_id = $this->service_providers[$service_name]->perform_auth_login();
|
||||||
|
|
||||||
|
// Insert into table, they will be able to log in after this
|
||||||
|
$data = array(
|
||||||
|
'user_id' => $this->user->data['user_id'],
|
||||||
|
'provider' => strtolower($link_data['oauth_service']),
|
||||||
|
'oauth_provider_id' => $unique_id,
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->link_account_perform_link($data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$url = $service->getAuthorizationUri();
|
||||||
|
header('Location: ' . $url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Performs the query that inserts an account link
|
||||||
|
*
|
||||||
|
* @param array $data This array is passed to db->sql_build_array
|
||||||
|
*/
|
||||||
|
protected function link_account_perform_link(array $data)
|
||||||
|
{
|
||||||
|
$sql = 'INSERT INTO ' . $this->auth_provider_oauth_token_account_assoc . '
|
||||||
|
' . $this->db->sql_build_array('INSERT', $data);
|
||||||
|
$this->db->sql_query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
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->clearAllTokens();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_auth_link_data()
|
||||||
|
{
|
||||||
|
$block_vars = array();
|
||||||
|
|
||||||
|
// Get all external accounts tied to the current user
|
||||||
|
$data = array(
|
||||||
|
'user_id' => (int) $this->user->data['user_id'],
|
||||||
|
);
|
||||||
|
$sql = 'SELECT oauth_provider_id, provider FROM ' . $this->auth_provider_oauth_token_account_assoc . '
|
||||||
|
WHERE ' . $this->db->sql_build_array('SELECT', $data);
|
||||||
|
$result = $this->db->sql_query($sql);
|
||||||
|
$rows = $this->db->sql_fetchrowset($result);
|
||||||
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$oauth_user_ids = array();
|
||||||
|
|
||||||
|
if ($rows !== false && sizeof($rows))
|
||||||
|
{
|
||||||
|
foreach ($rows as $row)
|
||||||
|
{
|
||||||
|
$oauth_user_ids[$row['provider']] = $row['oauth_provider_id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unset($rows);
|
||||||
|
|
||||||
|
foreach ($this->service_providers as $service_name => $service_provider)
|
||||||
|
{
|
||||||
|
// Only include data if the credentials are set
|
||||||
|
$credentials = $service_provider->get_service_credentials();
|
||||||
|
if ($credentials['key'] && $credentials['secret'])
|
||||||
|
{
|
||||||
|
$actual_name = str_replace('auth.provider.oauth.service.', '', $service_name);
|
||||||
|
|
||||||
|
$block_vars[$service_name] = array(
|
||||||
|
'HIDDEN_FIELDS' => array(
|
||||||
|
'link' => (!isset($oauth_user_ids[$actual_name])),
|
||||||
|
'oauth_service' => $actual_name,
|
||||||
|
),
|
||||||
|
|
||||||
|
'SERVICE_NAME' => $this->user->lang['AUTH_PROVIDER_OAUTH_SERVICE_' . strtoupper($actual_name)],
|
||||||
|
'UNIQUE_ID' => (isset($oauth_user_ids[$actual_name])) ? $oauth_user_ids[$actual_name] : null,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'BLOCK_VAR_NAME' => 'oauth',
|
||||||
|
'BLOCK_VARS' => $block_vars,
|
||||||
|
|
||||||
|
'TEMPLATE_FILE' => 'ucp_auth_link_oauth.html',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function unlink_account(array $link_data)
|
||||||
|
{
|
||||||
|
if (!array_key_exists('oauth_service', $link_data) || !$link_data['oauth_service'])
|
||||||
|
{
|
||||||
|
return 'LOGIN_LINK_MISSING_DATA';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove the link
|
||||||
|
$sql = 'DELETE FROM ' . $this->auth_provider_oauth_token_account_assoc . "
|
||||||
|
WHERE provider = '" . $this->db->sql_escape($link_data['oauth_service']) . "'
|
||||||
|
AND user_id = " . (int) $this->user->data['user_id'];
|
||||||
|
$this->db->sql_query($sql);
|
||||||
|
|
||||||
|
// 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->clearToken($service_name);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
55
phpBB/phpbb/auth/provider/oauth/service/base.php
Normal file
55
phpBB/phpbb/auth/provider/oauth/service/base.php
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package auth
|
||||||
|
* @copyright (c) 2013 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
|
if (!defined('IN_PHPBB'))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base OAuth abstract class that all OAuth services should implement
|
||||||
|
*
|
||||||
|
* @package auth
|
||||||
|
*/
|
||||||
|
abstract class phpbb_auth_provider_oauth_service_base implements phpbb_auth_provider_oauth_service_interface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* External OAuth service provider
|
||||||
|
*
|
||||||
|
* @var \OAuth\Common\Service\ServiceInterface
|
||||||
|
*/
|
||||||
|
protected $service_provider;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_external_service_provider()
|
||||||
|
{
|
||||||
|
return $this->service_provider;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_auth_scope()
|
||||||
|
{
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function set_external_service_provider(\OAuth\Common\Service\ServiceInterface $service_provider)
|
||||||
|
{
|
||||||
|
$this->service_provider = $service_provider;
|
||||||
|
}
|
||||||
|
}
|
98
phpBB/phpbb/auth/provider/oauth/service/bitly.php
Normal file
98
phpBB/phpbb/auth/provider/oauth/service/bitly.php
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package auth
|
||||||
|
* @copyright (c) 2013 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
|
if (!defined('IN_PHPBB'))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bitly OAuth service
|
||||||
|
*
|
||||||
|
* @package auth
|
||||||
|
*/
|
||||||
|
class phpbb_auth_provider_oauth_service_bitly extends phpbb_auth_provider_oauth_service_base
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* phpBB config
|
||||||
|
*
|
||||||
|
* @var phpbb_config
|
||||||
|
*/
|
||||||
|
protected $config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* phpBB request
|
||||||
|
*
|
||||||
|
* @var phpbb_request
|
||||||
|
*/
|
||||||
|
protected $request;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param phpbb_config $config
|
||||||
|
* @param phpbb_request $request
|
||||||
|
*/
|
||||||
|
public function __construct(phpbb_config $config, phpbb_request $request)
|
||||||
|
{
|
||||||
|
$this->config = $config;
|
||||||
|
$this->request = $request;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_bitly_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_bitly_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function perform_auth_login()
|
||||||
|
{
|
||||||
|
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Bitly))
|
||||||
|
{
|
||||||
|
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
|
||||||
|
$this->service_provider->requestAccessToken($this->request->variable('code', ''));
|
||||||
|
|
||||||
|
// Send a request with it
|
||||||
|
$result = json_decode($this->service_provider->request('user/info'), true);
|
||||||
|
|
||||||
|
// Return the unique identifier returned from bitly
|
||||||
|
return $result['data']['login'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function perform_token_auth()
|
||||||
|
{
|
||||||
|
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Bitly))
|
||||||
|
{
|
||||||
|
throw new phpbb_auth_provider_oauth_service_exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send a request with it
|
||||||
|
$result = json_decode($this->service_provider->request('user/info'), true);
|
||||||
|
|
||||||
|
// Return the unique identifier returned from bitly
|
||||||
|
return $result['data']['login'];
|
||||||
|
}
|
||||||
|
}
|
25
phpBB/phpbb/auth/provider/oauth/service/exception.php
Normal file
25
phpBB/phpbb/auth/provider/oauth/service/exception.php
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package auth
|
||||||
|
* @copyright (c) 2013 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
|
if (!defined('IN_PHPBB'))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OAuth service exception class
|
||||||
|
*
|
||||||
|
* @package auth
|
||||||
|
*/
|
||||||
|
class phpbb_auth_provider_oauth_service_exception extends RuntimeException
|
||||||
|
{
|
||||||
|
}
|
98
phpBB/phpbb/auth/provider/oauth/service/facebook.php
Normal file
98
phpBB/phpbb/auth/provider/oauth/service/facebook.php
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package auth
|
||||||
|
* @copyright (c) 2013 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
|
if (!defined('IN_PHPBB'))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Facebook OAuth service
|
||||||
|
*
|
||||||
|
* @package auth
|
||||||
|
*/
|
||||||
|
class phpbb_auth_provider_oauth_service_facebook extends phpbb_auth_provider_oauth_service_base
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* phpBB config
|
||||||
|
*
|
||||||
|
* @var phpbb_config
|
||||||
|
*/
|
||||||
|
protected $config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* phpBB request
|
||||||
|
*
|
||||||
|
* @var phpbb_request
|
||||||
|
*/
|
||||||
|
protected $request;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param phpbb_config $config
|
||||||
|
* @param phpbb_request $request
|
||||||
|
*/
|
||||||
|
public function __construct(phpbb_config $config, phpbb_request $request)
|
||||||
|
{
|
||||||
|
$this->config = $config;
|
||||||
|
$this->request = $request;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_facebook_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_facebook_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function perform_auth_login()
|
||||||
|
{
|
||||||
|
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Facebook))
|
||||||
|
{
|
||||||
|
throw new phpbb_auth_provider_oauth_service_exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||||
|
}
|
||||||
|
|
||||||
|
// This was a callback request, get the token
|
||||||
|
$this->service_provider->requestAccessToken($this->request->variable('code', ''));
|
||||||
|
|
||||||
|
// Send a request with it
|
||||||
|
$result = json_decode($this->service_provider->request('/me'), true);
|
||||||
|
|
||||||
|
// Return the unique identifier
|
||||||
|
return $result['id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function perform_token_auth()
|
||||||
|
{
|
||||||
|
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Facebook))
|
||||||
|
{
|
||||||
|
throw new phpbb_auth_provider_oauth_service_exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send a request with it
|
||||||
|
$result = json_decode($this->service_provider->request('/me'), true);
|
||||||
|
|
||||||
|
// Return the unique identifier
|
||||||
|
return $result['id'];
|
||||||
|
}
|
||||||
|
}
|
109
phpBB/phpbb/auth/provider/oauth/service/google.php
Normal file
109
phpBB/phpbb/auth/provider/oauth/service/google.php
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package auth
|
||||||
|
* @copyright (c) 2013 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
|
if (!defined('IN_PHPBB'))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Google OAuth service
|
||||||
|
*
|
||||||
|
* @package auth
|
||||||
|
*/
|
||||||
|
class phpbb_auth_provider_oauth_service_google extends phpbb_auth_provider_oauth_service_base
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* phpBB config
|
||||||
|
*
|
||||||
|
* @var phpbb_config
|
||||||
|
*/
|
||||||
|
protected $config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* phpBB request
|
||||||
|
*
|
||||||
|
* @var phpbb_request
|
||||||
|
*/
|
||||||
|
protected $request;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param phpbb_config $config
|
||||||
|
* @param phpbb_request $request
|
||||||
|
*/
|
||||||
|
public function __construct(phpbb_config $config, phpbb_request $request)
|
||||||
|
{
|
||||||
|
$this->config = $config;
|
||||||
|
$this->request = $request;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_auth_scope()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'userinfo_email',
|
||||||
|
'userinfo_profile',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_google_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_google_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function perform_auth_login()
|
||||||
|
{
|
||||||
|
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Google))
|
||||||
|
{
|
||||||
|
throw new phpbb_auth_provider_oauth_service_exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||||
|
}
|
||||||
|
|
||||||
|
// This was a callback request, get the token
|
||||||
|
$this->service_provider->requestAccessToken($this->request->variable('code', ''));
|
||||||
|
|
||||||
|
// Send a request with it
|
||||||
|
$result = json_decode($this->service_provider->request('https://www.googleapis.com/oauth2/v1/userinfo'), true);
|
||||||
|
|
||||||
|
// Return the unique identifier
|
||||||
|
return $result['id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function perform_token_auth()
|
||||||
|
{
|
||||||
|
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Google))
|
||||||
|
{
|
||||||
|
throw new phpbb_auth_provider_oauth_service_exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send a request with it
|
||||||
|
$result = json_decode($this->service_provider->request('https://www.googleapis.com/oauth2/v1/userinfo'), true);
|
||||||
|
|
||||||
|
// Return the unique identifier
|
||||||
|
return $result['id'];
|
||||||
|
}
|
||||||
|
}
|
77
phpBB/phpbb/auth/provider/oauth/service/interface.php
Normal file
77
phpBB/phpbb/auth/provider/oauth/service/interface.php
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package auth
|
||||||
|
* @copyright (c) 2013 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
|
if (!defined('IN_PHPBB'))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OAuth service interface
|
||||||
|
*
|
||||||
|
* @package auth
|
||||||
|
*/
|
||||||
|
interface phpbb_auth_provider_oauth_service_interface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Returns an array of the scopes necessary for auth
|
||||||
|
*
|
||||||
|
* @return array An array of the required scopes
|
||||||
|
*/
|
||||||
|
public function get_auth_scope();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the external library service provider once it has been set
|
||||||
|
*
|
||||||
|
* @param \OAuth\Common\Service\ServiceInterface|null
|
||||||
|
*/
|
||||||
|
public function get_external_service_provider();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an array containing the service credentials belonging to requested
|
||||||
|
* service.
|
||||||
|
*
|
||||||
|
* @return array An array containing the 'key' and the 'secret' of the
|
||||||
|
* service in the form:
|
||||||
|
* array(
|
||||||
|
* 'key' => string
|
||||||
|
* 'secret' => string
|
||||||
|
* )
|
||||||
|
*/
|
||||||
|
public function get_service_credentials();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the results of the authentication in json format
|
||||||
|
*
|
||||||
|
* @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.
|
||||||
|
*/
|
||||||
|
public function perform_auth_login();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
* @return string The unique identifier returned by the service provider
|
||||||
|
* that is used to authenticate the user with phpBB.
|
||||||
|
*/
|
||||||
|
public function perform_token_auth();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the external library service provider
|
||||||
|
*
|
||||||
|
* @param \OAuth\Common\Service\ServiceInterface $service
|
||||||
|
*/
|
||||||
|
public function set_external_service_provider(\OAuth\Common\Service\ServiceInterface $service_provider);
|
||||||
|
}
|
366
phpBB/phpbb/auth/provider/oauth/token_storage.php
Normal file
366
phpBB/phpbb/auth/provider/oauth/token_storage.php
Normal file
|
@ -0,0 +1,366 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package auth
|
||||||
|
* @copyright (c) 2013 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
|
if (!defined('IN_PHPBB'))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
use OAuth\OAuth1\Token\StdOAuth1Token;
|
||||||
|
use OAuth\Common\Token\TokenInterface;
|
||||||
|
use OAuth\Common\Storage\TokenStorageInterface;
|
||||||
|
use OAuth\Common\Storage\Exception\StorageException;
|
||||||
|
use OAuth\Common\Storage\Exception\TokenNotFoundException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OAuth storage wrapper for phpbb's cache
|
||||||
|
*
|
||||||
|
* @package auth
|
||||||
|
*/
|
||||||
|
class phpbb_auth_provider_oauth_token_storage implements TokenStorageInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Cache driver.
|
||||||
|
*
|
||||||
|
* @var phpbb_db_driver
|
||||||
|
*/
|
||||||
|
protected $db;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* phpBB user
|
||||||
|
*
|
||||||
|
* @var phpbb_user
|
||||||
|
*/
|
||||||
|
protected $user;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OAuth token table
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $auth_provider_oauth_table;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var object|TokenInterface
|
||||||
|
*/
|
||||||
|
protected $cachedToken;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates token storage for phpBB.
|
||||||
|
*
|
||||||
|
* @param phpbb_db_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)
|
||||||
|
{
|
||||||
|
$this->db = $db;
|
||||||
|
$this->user = $user;
|
||||||
|
$this->auth_provider_oauth_table = $auth_provider_oauth_table;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function retrieveAccessToken($service)
|
||||||
|
{
|
||||||
|
$service = $this->get_service_name_for_db($service);
|
||||||
|
|
||||||
|
if ($this->cachedToken instanceOf TokenInterface)
|
||||||
|
{
|
||||||
|
return $this->cachedToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'user_id' => (int) $this->user->data['user_id'],
|
||||||
|
'provider' => $service,
|
||||||
|
);
|
||||||
|
|
||||||
|
if ((int) $this->user->data['user_id'] === ANONYMOUS)
|
||||||
|
{
|
||||||
|
$data['session_id'] = $this->user->data['session_id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->_retrieve_access_token($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function storeAccessToken($service, TokenInterface $token)
|
||||||
|
{
|
||||||
|
$service = $this->get_service_name_for_db($service);
|
||||||
|
|
||||||
|
$this->cachedToken = $token;
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'user_id' => (int) $this->user->data['user_id'],
|
||||||
|
'provider' => $service,
|
||||||
|
'oauth_token' => $this->json_encode_token($token),
|
||||||
|
'session_id' => $this->user->data['session_id'],
|
||||||
|
);
|
||||||
|
|
||||||
|
$sql = 'INSERT INTO ' . $this->auth_provider_oauth_table . '
|
||||||
|
' . $this->db->sql_build_array('INSERT', $data);
|
||||||
|
$this->db->sql_query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function hasAccessToken($service)
|
||||||
|
{
|
||||||
|
$service = $this->get_service_name_for_db($service);
|
||||||
|
|
||||||
|
if ($this->cachedToken) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'user_id' => (int) $this->user->data['user_id'],
|
||||||
|
'provider' => $service,
|
||||||
|
);
|
||||||
|
|
||||||
|
if ((int) $this->user->data['user_id'] === ANONYMOUS)
|
||||||
|
{
|
||||||
|
$data['session_id'] = $this->user->data['session_id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->_has_acess_token($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function clearToken($service)
|
||||||
|
{
|
||||||
|
$service = $this->get_service_name_for_db($service);
|
||||||
|
|
||||||
|
$this->cachedToken = null;
|
||||||
|
|
||||||
|
$sql = 'DELETE FROM ' . $this->auth_provider_oauth_table . '
|
||||||
|
WHERE user_id = ' . (int) $this->user->data['user_id'] . "
|
||||||
|
AND provider = '" . $this->db->sql_escape($service) . "'";
|
||||||
|
|
||||||
|
if ((int) $this->user->data['user_id'] === ANONYMOUS)
|
||||||
|
{
|
||||||
|
$sql .= " AND session_id = '" . $this->db->sql_escape($this->user->data['session_id']) . "'";
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->db->sql_query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function clearAllTokens()
|
||||||
|
{
|
||||||
|
$this->cachedToken = null;
|
||||||
|
|
||||||
|
$sql = 'DELETE FROM ' . $this->auth_provider_oauth_table . '
|
||||||
|
WHERE user_id = ' . (int) $this->user->data['user_id'];
|
||||||
|
|
||||||
|
if ((int) $this->user->data['user_id'] === ANONYMOUS)
|
||||||
|
{
|
||||||
|
$sql .= " AND session_id = '" . $this->db->sql_escape($this->user->data['session_id']) . "'";
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->db->sql_query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the user_id field in the database assosciated with the token
|
||||||
|
*
|
||||||
|
* @param int $user_id
|
||||||
|
*/
|
||||||
|
public function set_user_id($user_id)
|
||||||
|
{
|
||||||
|
if (!$this->cachedToken)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = 'UPDATE ' . $this->auth_provider_oauth_table . '
|
||||||
|
SET ' . $this->db->sql_build_array('UPDATE', array(
|
||||||
|
'user_id' => (int) $user_id
|
||||||
|
)) . '
|
||||||
|
WHERE user_id = ' . (int) $this->user->data['user_id'] . "
|
||||||
|
AND session_id = '" . $this->db->sql_escape($this->user->data['session_id']) . "'";
|
||||||
|
$this->db->sql_query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks to see if an access token exists solely by the session_id of the user
|
||||||
|
*
|
||||||
|
* @return bool true if they have token, false if they don't
|
||||||
|
*/
|
||||||
|
public function has_access_token_by_session($service)
|
||||||
|
{
|
||||||
|
$service = $this->get_service_name_for_db($service);
|
||||||
|
|
||||||
|
if ($this->cachedToken)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'session_id' => $this->user->data['session_id'],
|
||||||
|
'provider' => $service,
|
||||||
|
);
|
||||||
|
|
||||||
|
return $this->_has_acess_token($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A helper function that performs the query for has access token functions
|
||||||
|
*
|
||||||
|
* @param array $data
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
protected function _has_acess_token($data)
|
||||||
|
{
|
||||||
|
return (bool) $this->get_access_token_row($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function retrieve_access_token_by_session($service)
|
||||||
|
{
|
||||||
|
$service = $this->get_service_name_for_db($service);
|
||||||
|
|
||||||
|
if ($this->cachedToken instanceOf TokenInterface) {
|
||||||
|
return $this->cachedToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'session_id' => $this->user->data['session_id'],
|
||||||
|
'provider' => $service,
|
||||||
|
);
|
||||||
|
|
||||||
|
return $this->_retrieve_access_token($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A helper function that performs the query for retrieve access token functions
|
||||||
|
* Also checks if the token is a valid token
|
||||||
|
*
|
||||||
|
* @param array $data
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
protected function _retrieve_access_token($data)
|
||||||
|
{
|
||||||
|
$row = $this->get_access_token_row($data);
|
||||||
|
|
||||||
|
if (!$row)
|
||||||
|
{
|
||||||
|
throw new TokenNotFoundException('AUTH_PROVIDER_OAUTH_TOKEN_ERROR_NOT_STORED');
|
||||||
|
}
|
||||||
|
|
||||||
|
$token = $this->json_decode_token($row['oauth_token']);
|
||||||
|
|
||||||
|
// Ensure that the token was serialized/unserialized correctly
|
||||||
|
if (!($token instanceof TokenInterface))
|
||||||
|
{
|
||||||
|
$this->clearToken();
|
||||||
|
throw new TokenNotFoundException('AUTH_PROVIDER_OAUTH_TOKEN_ERROR_INCORRECTLY_STORED');
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->cachedToken = $token;
|
||||||
|
return $token;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A helper function that performs the query for retrieving an access token
|
||||||
|
*
|
||||||
|
* @param array $data
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
protected function get_access_token_row($data)
|
||||||
|
{
|
||||||
|
$sql = 'SELECT oauth_token FROM ' . $this->auth_provider_oauth_table . '
|
||||||
|
WHERE ' . $this->db->sql_build_array('SELECT', $data);
|
||||||
|
$result = $this->db->sql_query($sql);
|
||||||
|
$row = $this->db->sql_fetchrow($result);
|
||||||
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
|
return $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function json_encode_token(TokenInterface $token)
|
||||||
|
{
|
||||||
|
$members = array(
|
||||||
|
'accessToken' => $token->getAccessToken(),
|
||||||
|
'endOfLife' => $token->getEndOfLife(),
|
||||||
|
'extraParams' => $token->getExtraParams(),
|
||||||
|
'refreshToken' => $token->getRefreshToken(),
|
||||||
|
|
||||||
|
'token_class' => get_class($token),
|
||||||
|
);
|
||||||
|
|
||||||
|
// Handle additional data needed for OAuth1 tokens
|
||||||
|
if ($token instanceof StdOAuth1Token)
|
||||||
|
{
|
||||||
|
$members['requestToken'] = $token->getRequestToken();
|
||||||
|
$members['requestTokenSecret'] = $token->getRequestTokenSecret();
|
||||||
|
$members['accessTokenSecret'] = $token->getAccessTokenSecret();
|
||||||
|
}
|
||||||
|
|
||||||
|
return json_encode($members);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function json_decode_token($json)
|
||||||
|
{
|
||||||
|
$token_data = json_decode($json, true);
|
||||||
|
|
||||||
|
if ($token_data === null)
|
||||||
|
{
|
||||||
|
throw new TokenNotFoundException('AUTH_PROVIDER_OAUTH_TOKEN_ERROR_INCORRECTLY_STORED');
|
||||||
|
}
|
||||||
|
|
||||||
|
$token_class = $token_data['token_class'];
|
||||||
|
$access_token = $token_data['accessToken'];
|
||||||
|
$refresh_token = $token_data['refreshToken'];
|
||||||
|
$endOfLife = $token_data['endOfLife'];
|
||||||
|
$extra_params = $token_data['extraParams'];
|
||||||
|
|
||||||
|
// Create the token
|
||||||
|
$token = new $token_class($access_token, $refresh_token, TokenInterface::EOL_NEVER_EXPIRES, $extra_params);
|
||||||
|
$token->setEndOfLife($endOfLife);
|
||||||
|
|
||||||
|
// Handle OAuth 1.0 specific elements
|
||||||
|
if ($token instanceof StdOAuth1Token)
|
||||||
|
{
|
||||||
|
$token->setRequestToken($token_data['requestToken']);
|
||||||
|
$token->setRequestTokenSecret($token_data['requestTokenSecret']);
|
||||||
|
$token->setAccessTokenSecret($token_data['accessTokenSecret']);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $token;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the name of the service as it must be stored in the database.
|
||||||
|
*
|
||||||
|
* @param string $service The name of the OAuth service
|
||||||
|
* @return string The name of the OAuth service as it needs to be stored
|
||||||
|
* in the database.
|
||||||
|
*/
|
||||||
|
protected function get_service_name_for_db($service)
|
||||||
|
{
|
||||||
|
// Enforce the naming convention for oauth services
|
||||||
|
if (strpos($service, 'auth.provider.oauth.service.') !== 0)
|
||||||
|
{
|
||||||
|
$service = 'auth.provider.oauth.service.' . strtolower($service);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $service;
|
||||||
|
}
|
||||||
|
}
|
70
phpBB/phpbb/cache/driver/file.php
vendored
70
phpBB/phpbb/cache/driver/file.php
vendored
|
@ -205,28 +205,34 @@ class phpbb_cache_driver_file extends phpbb_cache_driver_base
|
||||||
function purge()
|
function purge()
|
||||||
{
|
{
|
||||||
// Purge all phpbb cache files
|
// Purge all phpbb cache files
|
||||||
$dir = @opendir($this->cache_dir);
|
try
|
||||||
|
{
|
||||||
if (!$dir)
|
$iterator = new DirectoryIterator($this->cache_dir);
|
||||||
|
}
|
||||||
|
catch (Exception $e)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (($entry = readdir($dir)) !== false)
|
foreach ($iterator as $fileInfo)
|
||||||
{
|
{
|
||||||
if (strpos($entry, 'container_') !== 0 &&
|
if ($fileInfo->isDot())
|
||||||
strpos($entry, 'url_matcher') !== 0 &&
|
|
||||||
strpos($entry, 'sql_') !== 0 &&
|
|
||||||
strpos($entry, 'data_') !== 0 &&
|
|
||||||
strpos($entry, 'ctpl_') !== 0 &&
|
|
||||||
strpos($entry, 'tpl_') !== 0)
|
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
$filename = $fileInfo->getFilename();
|
||||||
$this->remove_file($this->cache_dir . $entry);
|
if ($fileInfo->isDir())
|
||||||
|
{
|
||||||
|
$this->remove_dir($fileInfo->getPathname());
|
||||||
|
}
|
||||||
|
elseif (strpos($filename, 'container_') === 0 ||
|
||||||
|
strpos($filename, 'url_matcher') === 0 ||
|
||||||
|
strpos($filename, 'sql_') === 0 ||
|
||||||
|
strpos($filename, 'data_') === 0)
|
||||||
|
{
|
||||||
|
$this->remove_file($fileInfo->getPathname());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
closedir($dir);
|
|
||||||
|
|
||||||
unset($this->vars);
|
unset($this->vars);
|
||||||
unset($this->var_expires);
|
unset($this->var_expires);
|
||||||
|
@ -241,6 +247,44 @@ class phpbb_cache_driver_file extends phpbb_cache_driver_base
|
||||||
$this->is_modified = false;
|
$this->is_modified = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove directory
|
||||||
|
*
|
||||||
|
* @param string $dir Directory to remove
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
protected function remove_dir($dir)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$iterator = new DirectoryIterator($dir);
|
||||||
|
}
|
||||||
|
catch (Exception $e)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($iterator as $fileInfo)
|
||||||
|
{
|
||||||
|
if ($fileInfo->isDot())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($fileInfo->isDir())
|
||||||
|
{
|
||||||
|
$this->remove_dir($fileInfo->getPathname());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->remove_file($fileInfo->getPathname());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@rmdir($dir);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroy cache data
|
* Destroy cache data
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -360,6 +360,11 @@ class phpbb_content_visibility
|
||||||
// Sync the first/last topic information if needed
|
// Sync the first/last topic information if needed
|
||||||
if (!$is_starter && $is_latest)
|
if (!$is_starter && $is_latest)
|
||||||
{
|
{
|
||||||
|
if (!function_exists('update_post_information'))
|
||||||
|
{
|
||||||
|
include($this->phpbb_root_path . 'includes/functions_posting.' . $this->php_ext);
|
||||||
|
}
|
||||||
|
|
||||||
// update_post_information can only update the last post info ...
|
// update_post_information can only update the last post info ...
|
||||||
if ($topic_id)
|
if ($topic_id)
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,6 +35,12 @@ class phpbb_controller_helper
|
||||||
*/
|
*/
|
||||||
protected $user;
|
protected $user;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request object
|
||||||
|
* @var phpbb_request
|
||||||
|
*/
|
||||||
|
protected $request;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* phpBB root path
|
* phpBB root path
|
||||||
* @var string
|
* @var string
|
||||||
|
@ -55,10 +61,11 @@ class phpbb_controller_helper
|
||||||
* @param string $phpbb_root_path phpBB root path
|
* @param string $phpbb_root_path phpBB root path
|
||||||
* @param string $php_ext PHP extension
|
* @param string $php_ext PHP extension
|
||||||
*/
|
*/
|
||||||
public function __construct(phpbb_template $template, phpbb_user $user, $phpbb_root_path, $php_ext)
|
public function __construct(phpbb_template $template, phpbb_user $user, phpbb_request_interface $request, $phpbb_root_path, $php_ext)
|
||||||
{
|
{
|
||||||
$this->template = $template;
|
$this->template = $template;
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
$this->request = $request;
|
||||||
$this->phpbb_root_path = $phpbb_root_path;
|
$this->phpbb_root_path = $phpbb_root_path;
|
||||||
$this->php_ext = $php_ext;
|
$this->php_ext = $php_ext;
|
||||||
}
|
}
|
||||||
|
@ -102,22 +109,16 @@ class phpbb_controller_helper
|
||||||
$route = substr($route, 0, $route_delim);
|
$route = substr($route, 0, $route_delim);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_array($params) && !empty($params))
|
$request_uri = $this->request->variable('REQUEST_URI', '', false, phpbb_request::SERVER);
|
||||||
{
|
$script_name = $this->request->variable('SCRIPT_NAME', '', false, phpbb_request::SERVER);
|
||||||
$params = array_merge(array(
|
|
||||||
'controller' => $route,
|
|
||||||
), $params);
|
|
||||||
}
|
|
||||||
else if (is_string($params) && $params)
|
|
||||||
{
|
|
||||||
$params = 'controller=' . $route . (($is_amp) ? '&' : '&') . $params;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$params = array('controller' => $route);
|
|
||||||
}
|
|
||||||
|
|
||||||
return append_sid($this->phpbb_root_path . 'app.' . $this->php_ext . $route_params, $params, $is_amp, $session_id);
|
// If the app.php file is being used (no rewrite) keep it in the URL.
|
||||||
|
// Otherwise, don't include it.
|
||||||
|
$route_prefix = $this->phpbb_root_path;
|
||||||
|
$parts = explode('/', $script_name);
|
||||||
|
$route_prefix .= strpos($request_uri, $script_name) === 0 ? array_pop($parts) . '/' : '';
|
||||||
|
|
||||||
|
return append_sid($route_prefix . "$route" . $route_params, $params, $is_amp, $session_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -38,23 +38,23 @@ class phpbb_controller_resolver implements ControllerResolverInterface
|
||||||
protected $container;
|
protected $container;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* phpbb_style object
|
* phpbb_template object
|
||||||
* @var phpbb_style
|
* @var phpbb_template
|
||||||
*/
|
*/
|
||||||
protected $style;
|
protected $template;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct method
|
* Construct method
|
||||||
*
|
*
|
||||||
* @param phpbb_user $user User Object
|
* @param phpbb_user $user User Object
|
||||||
* @param ContainerInterface $container ContainerInterface object
|
* @param ContainerInterface $container ContainerInterface object
|
||||||
* @param phpbb_style $style
|
* @param phpbb_template $template
|
||||||
*/
|
*/
|
||||||
public function __construct(phpbb_user $user, ContainerInterface $container, phpbb_style $style = null)
|
public function __construct(phpbb_user $user, ContainerInterface $container, phpbb_template $template = null)
|
||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
$this->container = $container;
|
$this->container = $container;
|
||||||
$this->style = $style;
|
$this->template = $template;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -96,13 +96,13 @@ class phpbb_controller_resolver implements ControllerResolverInterface
|
||||||
$controller_dir = explode('_', get_class($controller_object));
|
$controller_dir = explode('_', get_class($controller_object));
|
||||||
|
|
||||||
// 0 phpbb, 1 ext, 2 vendor, 3 extension name, ...
|
// 0 phpbb, 1 ext, 2 vendor, 3 extension name, ...
|
||||||
if (!is_null($this->style) && isset($controller_dir[3]) && $controller_dir[1] === 'ext')
|
if (!is_null($this->template) && isset($controller_dir[3]) && $controller_dir[1] === 'ext')
|
||||||
{
|
{
|
||||||
$controller_style_dir = 'ext/' . $controller_dir[2] . '/' . $controller_dir[3] . '/styles';
|
$controller_style_dir = 'ext/' . $controller_dir[2] . '/' . $controller_dir[3] . '/styles';
|
||||||
|
|
||||||
if (is_dir($controller_style_dir))
|
if (is_dir($controller_style_dir))
|
||||||
{
|
{
|
||||||
$this->style->set_style(array($controller_style_dir, 'styles'));
|
$this->template->set_style(array($controller_style_dir, 'styles'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_1 extends phpbb_db_migration
|
||||||
{
|
{
|
||||||
public function effectively_installed()
|
public function effectively_installed()
|
||||||
{
|
{
|
||||||
return version_compare($this->config['version'], '3.0.1', '>=');
|
return phpbb_version_compare($this->config['version'], '3.0.1', '>=');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function depends_on()
|
static public function depends_on()
|
||||||
|
|
|
@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_10 extends phpbb_db_migration
|
||||||
{
|
{
|
||||||
public function effectively_installed()
|
public function effectively_installed()
|
||||||
{
|
{
|
||||||
return version_compare($this->config['version'], '3.0.10', '>=');
|
return phpbb_version_compare($this->config['version'], '3.0.10', '>=');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function depends_on()
|
static public function depends_on()
|
||||||
|
|
|
@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_10_rc1 extends phpbb_db_migration
|
||||||
{
|
{
|
||||||
public function effectively_installed()
|
public function effectively_installed()
|
||||||
{
|
{
|
||||||
return version_compare($this->config['version'], '3.0.10-rc1', '>=');
|
return phpbb_version_compare($this->config['version'], '3.0.10-RC1', '>=');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function depends_on()
|
static public function depends_on()
|
||||||
|
@ -24,7 +24,7 @@ class phpbb_db_migration_data_30x_3_0_10_rc1 extends phpbb_db_migration
|
||||||
return array(
|
return array(
|
||||||
array('config.add', array('email_max_chunk_size', 50)),
|
array('config.add', array('email_max_chunk_size', 50)),
|
||||||
|
|
||||||
array('config.update', array('version', '3.0.10-rc1')),
|
array('config.update', array('version', '3.0.10-RC1')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_10_rc2 extends phpbb_db_migration
|
||||||
{
|
{
|
||||||
public function effectively_installed()
|
public function effectively_installed()
|
||||||
{
|
{
|
||||||
return version_compare($this->config['version'], '3.0.10-rc2', '>=');
|
return phpbb_version_compare($this->config['version'], '3.0.10-RC2', '>=');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function depends_on()
|
static public function depends_on()
|
||||||
|
@ -22,7 +22,7 @@ class phpbb_db_migration_data_30x_3_0_10_rc2 extends phpbb_db_migration
|
||||||
public function update_data()
|
public function update_data()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
array('config.update', array('version', '3.0.10-rc2')),
|
array('config.update', array('version', '3.0.10-RC2')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_10_rc3 extends phpbb_db_migration
|
||||||
{
|
{
|
||||||
public function effectively_installed()
|
public function effectively_installed()
|
||||||
{
|
{
|
||||||
return version_compare($this->config['version'], '3.0.10-rc3', '>=');
|
return phpbb_version_compare($this->config['version'], '3.0.10-RC3', '>=');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function depends_on()
|
static public function depends_on()
|
||||||
|
@ -22,7 +22,7 @@ class phpbb_db_migration_data_30x_3_0_10_rc3 extends phpbb_db_migration
|
||||||
public function update_data()
|
public function update_data()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
array('config.update', array('version', '3.0.10-rc3')),
|
array('config.update', array('version', '3.0.10-RC3')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_11 extends phpbb_db_migration
|
||||||
{
|
{
|
||||||
public function effectively_installed()
|
public function effectively_installed()
|
||||||
{
|
{
|
||||||
return version_compare($this->config['version'], '3.0.11', '>=');
|
return phpbb_version_compare($this->config['version'], '3.0.11', '>=');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function depends_on()
|
static public function depends_on()
|
||||||
|
|
|
@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_11_rc1 extends phpbb_db_migration
|
||||||
{
|
{
|
||||||
public function effectively_installed()
|
public function effectively_installed()
|
||||||
{
|
{
|
||||||
return version_compare($this->config['version'], '3.0.11-rc1', '>=');
|
return phpbb_version_compare($this->config['version'], '3.0.11-RC1', '>=');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function depends_on()
|
static public function depends_on()
|
||||||
|
@ -25,7 +25,7 @@ class phpbb_db_migration_data_30x_3_0_11_rc1 extends phpbb_db_migration
|
||||||
array('custom', array(array(&$this, 'cleanup_deactivated_styles'))),
|
array('custom', array(array(&$this, 'cleanup_deactivated_styles'))),
|
||||||
array('custom', array(array(&$this, 'delete_orphan_private_messages'))),
|
array('custom', array(array(&$this, 'delete_orphan_private_messages'))),
|
||||||
|
|
||||||
array('config.update', array('version', '3.0.11-rc1')),
|
array('config.update', array('version', '3.0.11-RC1')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_11_rc2 extends phpbb_db_migration
|
||||||
{
|
{
|
||||||
public function effectively_installed()
|
public function effectively_installed()
|
||||||
{
|
{
|
||||||
return version_compare($this->config['version'], '3.0.11-rc2', '>=');
|
return phpbb_version_compare($this->config['version'], '3.0.11-RC2', '>=');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function depends_on()
|
static public function depends_on()
|
||||||
|
@ -44,7 +44,7 @@ class phpbb_db_migration_data_30x_3_0_11_rc2 extends phpbb_db_migration
|
||||||
public function update_data()
|
public function update_data()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
array('config.update', array('version', '3.0.11-rc2')),
|
array('config.update', array('version', '3.0.11-RC2')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ class phpbb_db_migration_data_30x_3_0_12_rc1 extends phpbb_db_migration
|
||||||
{
|
{
|
||||||
public function effectively_installed()
|
public function effectively_installed()
|
||||||
{
|
{
|
||||||
return version_compare($this->config['version'], '3.0.12-rc1', '>=');
|
return phpbb_version_compare($this->config['version'], '3.0.12-RC1', '>=');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function depends_on()
|
static public function depends_on()
|
||||||
|
@ -28,7 +28,7 @@ class phpbb_db_migration_data_30x_3_0_12_rc1 extends phpbb_db_migration
|
||||||
array('custom', array(array(&$this, 'update_bots'))),
|
array('custom', array(array(&$this, 'update_bots'))),
|
||||||
array('custom', array(array(&$this, 'disable_bots_from_receiving_pms'))),
|
array('custom', array(array(&$this, 'disable_bots_from_receiving_pms'))),
|
||||||
|
|
||||||
array('config.update', array('version', '3.0.12-rc1')),
|
array('config.update', array('version', '3.0.12-RC1')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ class phpbb_db_migration_data_30x_3_0_12_rc1 extends phpbb_db_migration
|
||||||
WHERE user_id = $bot_user_id";
|
WHERE user_id = $bot_user_id";
|
||||||
$this->sql_query($sql);
|
$this->sql_query($sql);
|
||||||
|
|
||||||
user_delete('remove', $bot_user_id);
|
user_delete('retain', $bot_user_id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_1_rc1 extends phpbb_db_migration
|
||||||
{
|
{
|
||||||
public function effectively_installed()
|
public function effectively_installed()
|
||||||
{
|
{
|
||||||
return version_compare($this->config['version'], '3.0.1-rc1', '>=');
|
return phpbb_version_compare($this->config['version'], '3.0.1-RC1', '>=');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update_schema()
|
public function update_schema()
|
||||||
|
@ -74,7 +74,7 @@ class phpbb_db_migration_data_30x_3_0_1_rc1 extends phpbb_db_migration
|
||||||
array('custom', array(array(&$this, 'fix_unset_last_view_time'))),
|
array('custom', array(array(&$this, 'fix_unset_last_view_time'))),
|
||||||
array('custom', array(array(&$this, 'reset_smiley_size'))),
|
array('custom', array(array(&$this, 'reset_smiley_size'))),
|
||||||
|
|
||||||
array('config.update', array('version', '3.0.1-rc1')),
|
array('config.update', array('version', '3.0.1-RC1')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_2 extends phpbb_db_migration
|
||||||
{
|
{
|
||||||
public function effectively_installed()
|
public function effectively_installed()
|
||||||
{
|
{
|
||||||
return version_compare($this->config['version'], '3.0.2', '>=');
|
return phpbb_version_compare($this->config['version'], '3.0.2', '>=');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function depends_on()
|
static public function depends_on()
|
||||||
|
|
|
@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_2_rc1 extends phpbb_db_migration
|
||||||
{
|
{
|
||||||
public function effectively_installed()
|
public function effectively_installed()
|
||||||
{
|
{
|
||||||
return version_compare($this->config['version'], '3.0.2-rc1', '>=');
|
return phpbb_version_compare($this->config['version'], '3.0.2-RC1', '>=');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function depends_on()
|
static public function depends_on()
|
||||||
|
@ -26,7 +26,7 @@ class phpbb_db_migration_data_30x_3_0_2_rc1 extends phpbb_db_migration
|
||||||
array('config.add', array('check_attachment_content', '1')),
|
array('config.add', array('check_attachment_content', '1')),
|
||||||
array('config.add', array('mime_triggers', 'body|head|html|img|plaintext|a href|pre|script|table|title')),
|
array('config.add', array('mime_triggers', 'body|head|html|img|plaintext|a href|pre|script|table|title')),
|
||||||
|
|
||||||
array('config.update', array('version', '3.0.2-rc1')),
|
array('config.update', array('version', '3.0.2-RC1')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_2_rc2 extends phpbb_db_migration
|
||||||
{
|
{
|
||||||
public function effectively_installed()
|
public function effectively_installed()
|
||||||
{
|
{
|
||||||
return version_compare($this->config['version'], '3.0.2-rc2', '>=');
|
return phpbb_version_compare($this->config['version'], '3.0.2-RC2', '>=');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function depends_on()
|
static public function depends_on()
|
||||||
|
@ -74,7 +74,7 @@ class phpbb_db_migration_data_30x_3_0_2_rc2 extends phpbb_db_migration
|
||||||
public function update_data()
|
public function update_data()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
array('config.update', array('version', '3.0.2-rc2')),
|
array('config.update', array('version', '3.0.2-RC2')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_3 extends phpbb_db_migration
|
||||||
{
|
{
|
||||||
public function effectively_installed()
|
public function effectively_installed()
|
||||||
{
|
{
|
||||||
return version_compare($this->config['version'], '3.0.3', '>=');
|
return phpbb_version_compare($this->config['version'], '3.0.3', '>=');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function depends_on()
|
static public function depends_on()
|
||||||
|
|
|
@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_3_rc1 extends phpbb_db_migration
|
||||||
{
|
{
|
||||||
public function effectively_installed()
|
public function effectively_installed()
|
||||||
{
|
{
|
||||||
return version_compare($this->config['version'], '3.0.3-rc1', '>=');
|
return phpbb_version_compare($this->config['version'], '3.0.3-RC1', '>=');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function depends_on()
|
static public function depends_on()
|
||||||
|
@ -60,7 +60,7 @@ class phpbb_db_migration_data_30x_3_0_3_rc1 extends phpbb_db_migration
|
||||||
array('permission.add', array('u_masspm_group', true, 'u_masspm')),
|
array('permission.add', array('u_masspm_group', true, 'u_masspm')),
|
||||||
array('custom', array(array(&$this, 'correct_acp_email_permissions'))),
|
array('custom', array(array(&$this, 'correct_acp_email_permissions'))),
|
||||||
|
|
||||||
array('config.update', array('version', '3.0.3-rc1')),
|
array('config.update', array('version', '3.0.3-RC1')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_4 extends phpbb_db_migration
|
||||||
{
|
{
|
||||||
public function effectively_installed()
|
public function effectively_installed()
|
||||||
{
|
{
|
||||||
return version_compare($this->config['version'], '3.0.4', '>=');
|
return phpbb_version_compare($this->config['version'], '3.0.4', '>=');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function depends_on()
|
static public function depends_on()
|
||||||
|
|
|
@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_4_rc1 extends phpbb_db_migration
|
||||||
{
|
{
|
||||||
public function effectively_installed()
|
public function effectively_installed()
|
||||||
{
|
{
|
||||||
return version_compare($this->config['version'], '3.0.4-rc1', '>=');
|
return phpbb_version_compare($this->config['version'], '3.0.4-RC1', '>=');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function depends_on()
|
static public function depends_on()
|
||||||
|
@ -76,7 +76,7 @@ class phpbb_db_migration_data_30x_3_0_4_rc1 extends phpbb_db_migration
|
||||||
return array(
|
return array(
|
||||||
array('custom', array(array(&$this, 'update_custom_profile_fields'))),
|
array('custom', array(array(&$this, 'update_custom_profile_fields'))),
|
||||||
|
|
||||||
array('config.update', array('version', '3.0.4-rc1')),
|
array('config.update', array('version', '3.0.4-RC1')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue