mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-17 06:08:19 +01:00
Merge branch 'prep-release-3.3.4' into 3.3.x
This commit is contained in:
commit
ecc79ea2ec
13
.github/workflows/tests.yml
vendored
13
.github/workflows/tests.yml
vendored
@ -83,7 +83,8 @@ jobs:
|
|||||||
- name: Check commit message
|
- name: Check commit message
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
git-tools/commit-msg-hook-range.sh $(git rev-list --merges -n 1 HEAD^1)..$GITHUB_SHA
|
git fetch origin $GITHUB_BASE_REF &> /dev/null
|
||||||
|
git-tools/commit-msg-hook-range.sh $(git rev-parse origin/$GITHUB_BASE_REF)..$GITHUB_SHA
|
||||||
|
|
||||||
# Tests for MySQL and MariaDB
|
# Tests for MySQL and MariaDB
|
||||||
mysql-tests:
|
mysql-tests:
|
||||||
@ -242,6 +243,16 @@ jobs:
|
|||||||
db: "postgres:12"
|
db: "postgres:12"
|
||||||
- php: '7.1'
|
- php: '7.1'
|
||||||
db: "postgres:13"
|
db: "postgres:13"
|
||||||
|
- php: '7.2'
|
||||||
|
db: "postgres:13"
|
||||||
|
- php: '7.3'
|
||||||
|
db: "postgres:13"
|
||||||
|
- php: '7.4'
|
||||||
|
db: "postgres:13"
|
||||||
|
- php: '8.0'
|
||||||
|
db: "postgres:12"
|
||||||
|
- php: '8.0'
|
||||||
|
db: "postgres:13"
|
||||||
|
|
||||||
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
|
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<!-- a few settings for the build -->
|
<!-- a few settings for the build -->
|
||||||
<property name="newversion" value="3.3.5-dev" />
|
<property name="newversion" value="3.3.5-dev" />
|
||||||
<property name="prevversion" value="3.3.3" />
|
<property name="prevversion" value="3.3.3" />
|
||||||
<property name="olderversions" value="3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9, 3.2.10, 3.2.11, 3.3.0, 3.3.1, 3.3.2" />
|
<property name="olderversions" value="3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9, 3.2.10, 3.2.11, 3.3.0, 3.3.1, 3.3.2, 3.3.4-RC1" />
|
||||||
<!-- no configuration should be needed beyond this point -->
|
<!-- no configuration should be needed beyond this point -->
|
||||||
|
|
||||||
<property name="oldversions" value="${olderversions}, ${prevversion}" />
|
<property name="oldversions" value="${olderversions}, ${prevversion}" />
|
||||||
|
@ -50,6 +50,7 @@
|
|||||||
<ol>
|
<ol>
|
||||||
<li><a href="#changelog">Changelog</a>
|
<li><a href="#changelog">Changelog</a>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li><a href="#v334rc1">Changes since 3.3.4-RC1</a></li>
|
||||||
<li><a href="#v333">Changes since 3.3.3</a></li>
|
<li><a href="#v333">Changes since 3.3.3</a></li>
|
||||||
<li><a href="#v332">Changes since 3.3.2</a></li>
|
<li><a href="#v332">Changes since 3.3.2</a></li>
|
||||||
<li><a href="#v331">Changes since 3.3.1</a></li>
|
<li><a href="#v331">Changes since 3.3.1</a></li>
|
||||||
@ -155,6 +156,16 @@
|
|||||||
<div class="inner">
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
<a name="v334rc1"></a><h3>Changes since 3.3.4-RC1</h3>
|
||||||
|
<h4>Bug</h4>
|
||||||
|
<ul>
|
||||||
|
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16735">PHPBB3-16735</a>] - Trying to access array offset on value of type bool</li>
|
||||||
|
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16739">PHPBB3-16739</a>] - Wrong variable in report_pm.txt subject</li>
|
||||||
|
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16740">PHPBB3-16740</a>] - Installation errors in php 8 when using postgresql</li>
|
||||||
|
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16743">PHPBB3-16743</a>] - Properly check if TMP file exists - PHP 8</li>
|
||||||
|
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16747">PHPBB3-16747</a>] - Typo in phpBB/language/en/email/post_in_queue.txt </li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<a name="v333"></a><h3>Changes since 3.3.3</h3>
|
<a name="v333"></a><h3>Changes since 3.3.3</h3>
|
||||||
<h4>Bug</h4>
|
<h4>Bug</h4>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -247,7 +247,10 @@ define('BANLIST_TABLE', $table_prefix . 'banlist');
|
|||||||
define('BBCODES_TABLE', $table_prefix . 'bbcodes');
|
define('BBCODES_TABLE', $table_prefix . 'bbcodes');
|
||||||
define('BOOKMARKS_TABLE', $table_prefix . 'bookmarks');
|
define('BOOKMARKS_TABLE', $table_prefix . 'bookmarks');
|
||||||
define('BOTS_TABLE', $table_prefix . 'bots');
|
define('BOTS_TABLE', $table_prefix . 'bots');
|
||||||
@define('CONFIG_TABLE', $table_prefix . 'config');
|
if (!defined('CONFIG_TABLE'))
|
||||||
|
{
|
||||||
|
define('CONFIG_TABLE', $table_prefix . 'config');
|
||||||
|
}
|
||||||
define('CONFIG_TEXT_TABLE', $table_prefix . 'config_text');
|
define('CONFIG_TEXT_TABLE', $table_prefix . 'config_text');
|
||||||
define('CONFIRM_TABLE', $table_prefix . 'confirm');
|
define('CONFIRM_TABLE', $table_prefix . 'confirm');
|
||||||
define('DISALLOW_TABLE', $table_prefix . 'disallow');
|
define('DISALLOW_TABLE', $table_prefix . 'disallow');
|
||||||
|
@ -16,10 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
define('IN_PHPBB', true);
|
define('IN_PHPBB', true);
|
||||||
define('IN_INSTALL', true);
|
define('IN_INSTALL', true);
|
||||||
if (!defined('PHPBB_ENVIRONMENT'))
|
|
||||||
{
|
|
||||||
define('PHPBB_ENVIRONMENT', 'production');
|
|
||||||
}
|
|
||||||
$phpbb_root_path = '../';
|
$phpbb_root_path = '../';
|
||||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ if (php_sapi_name() !== 'cli')
|
|||||||
define('IN_PHPBB', true);
|
define('IN_PHPBB', true);
|
||||||
define('IN_INSTALL', true);
|
define('IN_INSTALL', true);
|
||||||
define('PHPBB_ENVIRONMENT', 'production');
|
define('PHPBB_ENVIRONMENT', 'production');
|
||||||
define('PHPBB_VERSION', '3.3.4-RC1');
|
define('PHPBB_VERSION', '3.3.4');
|
||||||
$phpbb_root_path = __DIR__ . '/../';
|
$phpbb_root_path = __DIR__ . '/../';
|
||||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Subject: Post needs aprroval - "{TOPIC_TITLE}"
|
Subject: Post needs approval - "{TOPIC_TITLE}"
|
||||||
|
|
||||||
Hello {USERNAME},
|
Hello {USERNAME},
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Subject: Post needs aprroval - "{TOPIC_TITLE}"
|
Subject: Post needs approval - "{TOPIC_TITLE}"
|
||||||
|
|
||||||
Hello {USERNAME},
|
Hello {USERNAME},
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Subject: Private Message report - "{TOPIC_TITLE}"
|
Subject: Private Message report - "{SUBJECT}"
|
||||||
|
|
||||||
Hello {USERNAME},
|
Hello {USERNAME},
|
||||||
|
|
||||||
|
@ -153,8 +153,12 @@ class db extends base
|
|||||||
}
|
}
|
||||||
|
|
||||||
$login_error_attempts = 'LOGIN_ERROR_ATTEMPTS';
|
$login_error_attempts = 'LOGIN_ERROR_ATTEMPTS';
|
||||||
$show_captcha = ($this->config['max_login_attempts'] && $row['user_login_attempts'] >= $this->config['max_login_attempts']) ||
|
|
||||||
($this->config['ip_login_limit_max'] && $attempts >= $this->config['ip_login_limit_max']);
|
$user_login_attempts = (is_array($row) && $this->config['max_login_attempts'] && $row['user_login_attempts'] >= $this->config['max_login_attempts']);
|
||||||
|
$ip_login_attempts = ($this->config['ip_login_limit_max'] && $attempts >= $this->config['ip_login_limit_max']);
|
||||||
|
|
||||||
|
$show_captcha = $user_login_attempts || $ip_login_attempts;
|
||||||
|
|
||||||
if ($show_captcha)
|
if ($show_captcha)
|
||||||
{
|
{
|
||||||
$captcha = $this->captcha_factory->get_instance($this->config['captcha_plugin']);
|
$captcha = $this->captcha_factory->get_instance($this->config['captcha_plugin']);
|
||||||
|
@ -277,9 +277,10 @@ class postgres extends \phpbb\db\driver\driver
|
|||||||
$query_id = $this->query_result;
|
$query_id = $this->query_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cache && $cache->sql_exists($query_id))
|
$safe_query_id = $this->clean_query_id($query_id);
|
||||||
|
if ($cache && $cache->sql_exists($safe_query_id))
|
||||||
{
|
{
|
||||||
return $cache->sql_fetchrow($query_id);
|
return $cache->sql_fetchrow($safe_query_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ($query_id) ? pg_fetch_assoc($query_id, null) : false;
|
return ($query_id) ? pg_fetch_assoc($query_id, null) : false;
|
||||||
@ -297,14 +298,47 @@ class postgres extends \phpbb\db\driver\driver
|
|||||||
$query_id = $this->query_result;
|
$query_id = $this->query_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cache && $cache->sql_exists($query_id))
|
$safe_query_id = $this->clean_query_id($query_id);
|
||||||
|
if ($cache && $cache->sql_exists($safe_query_id))
|
||||||
{
|
{
|
||||||
return $cache->sql_rowseek($rownum, $query_id);
|
return $cache->sql_rowseek($rownum, $safe_query_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ($query_id) ? @pg_result_seek($query_id, $rownum) : false;
|
return ($query_id) ? @pg_result_seek($query_id, $rownum) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
function sql_fetchfield($field, $rownum = false, $query_id = false)
|
||||||
|
{
|
||||||
|
global $cache;
|
||||||
|
|
||||||
|
if ($query_id === false)
|
||||||
|
{
|
||||||
|
$query_id = $this->query_result;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($query_id)
|
||||||
|
{
|
||||||
|
if ($rownum !== false)
|
||||||
|
{
|
||||||
|
$this->sql_rowseek($rownum, $query_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
$safe_query_id = $this->clean_query_id($query_id);
|
||||||
|
if ($cache && !is_object($query_id) && $cache->sql_exists($safe_query_id))
|
||||||
|
{
|
||||||
|
return $cache->sql_fetchfield($safe_query_id, $field);
|
||||||
|
}
|
||||||
|
|
||||||
|
$row = $this->sql_fetchrow($query_id);
|
||||||
|
return (isset($row[$field])) ? $row[$field] : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@ -346,14 +380,15 @@ class postgres extends \phpbb\db\driver\driver
|
|||||||
$query_id = $this->query_result;
|
$query_id = $this->query_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
|
$safe_query_id = $this->clean_query_id($query_id);
|
||||||
|
if ($cache && !is_object($query_id) && $cache->sql_exists($safe_query_id))
|
||||||
{
|
{
|
||||||
return $cache->sql_freeresult($query_id);
|
return $cache->sql_freeresult($safe_query_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->open_queries[(int) $query_id]))
|
if (isset($this->open_queries[$safe_query_id]))
|
||||||
{
|
{
|
||||||
unset($this->open_queries[(int) $query_id]);
|
unset($this->open_queries[$safe_query_id]);
|
||||||
return pg_free_result($query_id);
|
return pg_free_result($query_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -431,6 +466,11 @@ class postgres extends \phpbb\db\driver\driver
|
|||||||
*/
|
*/
|
||||||
function _sql_close()
|
function _sql_close()
|
||||||
{
|
{
|
||||||
|
// Released resources are already closed, return true in this case
|
||||||
|
if (!is_resource($this->db_connect_id))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return @pg_close($this->db_connect_id);
|
return @pg_close($this->db_connect_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -505,4 +545,16 @@ class postgres extends \phpbb\db\driver\driver
|
|||||||
{
|
{
|
||||||
return '"' . $msg . '"';
|
return '"' . $msg . '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ensure query ID can be used by cache
|
||||||
|
*
|
||||||
|
* @param resource|int|string $query_id Mixed type query id
|
||||||
|
*
|
||||||
|
* @return int|string Query id in string or integer format
|
||||||
|
*/
|
||||||
|
private function clean_query_id($query_id)
|
||||||
|
{
|
||||||
|
return is_resource($query_id) ? (int) $query_id : $query_id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
36
phpBB/phpbb/db/migration/data/v33x/v334.php
Normal file
36
phpBB/phpbb/db/migration/data/v33x/v334.php
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* This file is part of the phpBB Forum Software package.
|
||||||
|
*
|
||||||
|
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||||
|
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||||
|
*
|
||||||
|
* For full copyright and license information, please see
|
||||||
|
* the docs/CREDITS.txt file.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace phpbb\db\migration\data\v33x;
|
||||||
|
|
||||||
|
class v334 extends \phpbb\db\migration\migration
|
||||||
|
{
|
||||||
|
public function effectively_installed()
|
||||||
|
{
|
||||||
|
return version_compare($this->config['version'], '3.3.4', '>=');
|
||||||
|
}
|
||||||
|
|
||||||
|
static public function depends_on()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'\phpbb\db\migration\data\v33x\v334rc1',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update_data()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
['config.update', ['version', '3.3.4']],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -96,6 +96,24 @@ class postgres extends tools
|
|||||||
return $tables;
|
return $tables;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
function sql_table_exists($table_name)
|
||||||
|
{
|
||||||
|
$sql = "SELECT CAST(EXISTS(
|
||||||
|
SELECT FROM information_schema.tables
|
||||||
|
WHERE table_schema = 'public'
|
||||||
|
AND table_name = '" . $this->db->sql_escape($table_name) . "'
|
||||||
|
) AS INTEGER)";
|
||||||
|
$result = $this->db->sql_query_limit($sql, 1);
|
||||||
|
$row = $this->db->sql_fetchrow($result);
|
||||||
|
$table_exists = (booL) $row['exists'];
|
||||||
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
|
return $table_exists;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
@ -476,7 +476,10 @@ class filespec
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove temporary filename
|
// Remove temporary filename
|
||||||
@unlink($this->filename);
|
if (file_exists($this->filename))
|
||||||
|
{
|
||||||
|
@unlink($this->filename);
|
||||||
|
}
|
||||||
|
|
||||||
if (count($this->error))
|
if (count($this->error))
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,7 @@ abstract class phpbb_database_test_case extends TestCase
|
|||||||
|
|
||||||
static protected $install_schema_file;
|
static protected $install_schema_file;
|
||||||
|
|
||||||
static protected $phpunit_version;
|
static protected $phpunit_version;
|
||||||
|
|
||||||
public function __construct($name = NULL, array $data = [], $dataName = '')
|
public function __construct($name = NULL, array $data = [], $dataName = '')
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user