aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md2
-rw-r--r--README.md12
-rwxr-xr-xcomposer.pharbin1075373 -> 1585196 bytes
-rw-r--r--phpBB/includes/acp/acp_attachments.php2
-rw-r--r--phpBB/includes/acp/acp_forums.php2
-rw-r--r--phpBB/includes/acp/acp_modules.php2
-rw-r--r--phpBB/includes/functions_admin.php33
-rw-r--r--phpBB/includes/functions_convert.php16
-rw-r--r--phpBB/install/database_update.php2
-rw-r--r--phpBB/install/install_convert.php2
-rw-r--r--phpBB/memberlist.php13
-rw-r--r--phpBB/phpbb/db/migration/data/v310/alpha1.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/alpha2.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/alpha3.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/beta1.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/beta2.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/beta3.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/beta4.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/gold.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/rc1.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/rc2.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/rc3.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/rc4.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/rc5.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/rc6.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v311.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v312.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v312rc1.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v313.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v313rc1.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v313rc2.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v314.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v314rc1.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v314rc2.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v315.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v315rc1.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v316.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v316rc1.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v317.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v317pl1.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v317rc1.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v318.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v318rc1.php5
-rw-r--r--phpBB/phpbb/db/tools.php2
-rw-r--r--phpBB/posting.php3
-rwxr-xr-xtravis/setup-phpbb.sh5
46 files changed, 226 insertions, 30 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 6996ca22d3..3fceabda10 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,5 +2,5 @@
1. [Create an account on phpBB.com](http://www.phpbb.com/community/ucp.php?mode=register)
2. [Create a ticket (unless there already is one)](http://tracker.phpbb.com/secure/CreateIssue!default.jspa)
-3. Read our [Coding guidelines](https://wiki.phpbb.com/Coding_guidelines) and [Git Contribution Guidelines](http://wiki.phpbb.com/Git); if you're new to git, also read [the introduction guide](http://wiki.phpbb.com/display/DEV/Working+with+Git)
+3. Read our [Coding guidelines](https://wiki.phpbb.com/Coding_guidelines) and [Git Contribution Guidelines](http://wiki.phpbb.com/Git)
4. Send us a pull request
diff --git a/README.md b/README.md
index 1770a0b7c8..f465d7496e 100644
--- a/README.md
+++ b/README.md
@@ -2,34 +2,34 @@
## ABOUT
-phpBB is a free bulletin board written in PHP.
+phpBB is a free open-source bulletin board written in PHP.
## COMMUNITY
-Find support and lots more on [phpBB.com](http://www.phpbb.com)! Discuss the development on [area51](http://area51.phpbb.com/phpBB/index.php).
+Get your copy of phpBB, find support and lots more on [phpBB.com](http://www.phpbb.com)! Discuss the development on [area51](http://area51.phpbb.com/phpBB/index.php).
## INSTALLING DEPENDENCIES
To be able to run an installation from the repo (and not from a pre-built package) you need to run the following commands to install phpBB's dependencies.
cd phpBB
- php ../composer.phar install --dev
+ php ../composer.phar install
## CONTRIBUTE
1. [Create an account on phpBB.com](http://www.phpbb.com/community/ucp.php?mode=register)
2. [Create a ticket (unless there already is one)](http://tracker.phpbb.com/secure/CreateIssue!default.jspa)
-3. [Read our Git Contribution Guidelines](http://wiki.phpbb.com/Git); if you're new to git, also read [the introduction guide](http://wiki.phpbb.com/display/DEV/Working+with+Git)
+3. Read our [Coding guidelines](https://wiki.phpbb.com/Coding_guidelines) and [Git Contribution Guidelines](http://wiki.phpbb.com/Git)
4. Send us a pull request
## AUTOMATED TESTING
-We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis build below:
+We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis builds below:
* [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=master)](http://travis-ci.org/phpbb/phpbb) **master** - Latest development version
+* [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=3.2.x)](http://travis-ci.org/phpbb/phpbb) **3.2.x** - Development of version 3.2.x
* [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=3.1.x)](http://travis-ci.org/phpbb/phpbb) **3.1.x** - Development of version 3.1.x
-* [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=3.0.x)](http://travis-ci.org/phpbb/phpbb) **3.0.x** - Development of version 3.0.x
## LICENSE
diff --git a/composer.phar b/composer.phar
index a3bd28e4f4..fca2a8d72d 100755
--- a/composer.phar
+++ b/composer.phar
Binary files differ
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index 8e8ace8337..816387967a 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -1426,7 +1426,7 @@ class acp_attachments
$row['group_name'] = $user->lang['NOT_ASSIGNED'];
$group_name[] = $row;
- for ($i = 0; $i < sizeof($group_name); $i++)
+ for ($i = 0, $groups_size = sizeof($group_name); $i < $groups_size; $i++)
{
if ($default_group === false)
{
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 7e664c6263..98273f06d9 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -1411,7 +1411,7 @@ class acp_forums
$diff = sizeof($moved_forums) * 2;
$moved_ids = array();
- for ($i = 0; $i < sizeof($moved_forums); ++$i)
+ for ($i = 0, $size = sizeof($moved_forums); $i < $size; ++$i)
{
$moved_ids[] = $moved_forums[$i]['forum_id'];
}
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php
index ea6b388328..55ea26b9d3 100644
--- a/phpBB/includes/acp/acp_modules.php
+++ b/phpBB/includes/acp/acp_modules.php
@@ -888,7 +888,7 @@ class acp_modules
$diff = sizeof($moved_modules) * 2;
$moved_ids = array();
- for ($i = 0; $i < sizeof($moved_modules); ++$i)
+ for ($i = 0, $size = sizeof($moved_modules); $i < $size; ++$i)
{
$moved_ids[] = $moved_modules[$i]['module_id'];
}
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index b3641a2b45..4ecb7b9354 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -3320,18 +3320,47 @@ function tidy_database()
*/
function add_permission_language()
{
- global $user, $phpEx, $phpbb_extension_manager;
+ global $config, $user, $phpEx, $phpbb_extension_manager;
// add permission language files from extensions
$finder = $phpbb_extension_manager->get_finder();
- $lang_files = $finder
+ // We grab the language files from the default, English and user's language.
+ // So we can fall back to the other files like we do when using add_lang()
+ $default_lang_files = $english_lang_files = $user_lang_files = array();
+
+ // Search for board default language if it's not the user language
+ if ($config['default_lang'] != $user->lang_name)
+ {
+ $default_lang_files = $finder
+ ->prefix('permissions_')
+ ->suffix(".$phpEx")
+ ->core_path('language/' . basename($config['default_lang']) . '/')
+ ->extension_directory('/language/' . basename($config['default_lang']))
+ ->find();
+ }
+
+ // Search for english, if its not the default or user language
+ if ($config['default_lang'] != 'en' && $user->lang_name != 'en')
+ {
+ $english_lang_files = $finder
+ ->prefix('permissions_')
+ ->suffix(".$phpEx")
+ ->core_path('language/en/')
+ ->extension_directory('/language/en')
+ ->find();
+ }
+
+ // Find files in the user's language
+ $user_lang_files = $finder
->prefix('permissions_')
->suffix(".$phpEx")
->core_path('language/' . $user->lang_name . '/')
->extension_directory('/language/' . $user->lang_name)
->find();
+ $lang_files = array_merge($english_lang_files, $default_lang_files, $user_lang_files);
+
foreach ($lang_files as $lang_file => $ext_name)
{
if ($ext_name === '/')
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index b380273f0c..da4820134d 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -479,7 +479,7 @@ function import_avatar_gallery($gallery_name = '', $subdirs_as_galleries = false
$dir->close();
}
- for ($i = 0; $i < sizeof($dirlist); ++$i)
+ for ($i = 0, $end = sizeof($dirlist); $i < $end; ++$i)
{
$dir = $dirlist[$i];
@@ -1427,7 +1427,7 @@ function get_path($src_path, $src_url, $test_file)
$path_array = array();
$phpbb_parts = explode('/', $script_path);
- for ($i = 0; $i < sizeof($url_parts); ++$i)
+ for ($i = 0, $end = sizeof($url_parts); $i < $end; ++$i)
{
if ($i < sizeof($phpbb_parts[$i]) && $url_parts[$i] == $phpbb_parts[$i])
{
@@ -1437,7 +1437,7 @@ function get_path($src_path, $src_url, $test_file)
else
{
$path = '';
- for ($j = $i; $j < sizeof($phpbb_parts); ++$j)
+ for ($j = $i, $end2 = sizeof($phpbb_parts); $j < $end2; ++$j)
{
$path .= '../';
}
@@ -2269,7 +2269,7 @@ function convert_bbcode($message, $convert_size = true, $extended_bbcodes = fals
"\n\n"
);
- for ($i = 0; $i < sizeof($str_from); ++$i)
+ for ($i = 0, $end = sizeof($str_from); $i < $end; ++$i)
{
$origx[] = '#\\' . str_replace(']', '\\]', $str_from[$i]) . '#is';
$replx[] = $str_to[$i];
@@ -2278,7 +2278,7 @@ function convert_bbcode($message, $convert_size = true, $extended_bbcodes = fals
if (preg_match_all('#\[email=([^\]]+)\](.*?)\[/email\]#i', $message, $m))
{
- for ($i = 0; $i < sizeof($m[1]); ++$i)
+ for ($i = 0, $end = sizeof($m[1]); $i < $end; ++$i)
{
if ($m[1][$i] == $m[2][$i])
{
@@ -2339,7 +2339,7 @@ function copy_file($src, $trg, $overwrite = false, $die_on_failure = true, $sour
$parts = explode('/', $trg);
unset($parts[sizeof($parts) - 1]);
- for ($i = 0; $i < sizeof($parts); ++$i)
+ for ($i = 0, $end = sizeof($parts); $i < $end; ++$i)
{
$path .= $parts[$i] . '/';
@@ -2436,7 +2436,7 @@ function copy_dir($src, $trg, $copy_subdirs = true, $overwrite = false, $die_on_
if ($copy_subdirs)
{
- for ($i = 0; $i < sizeof($dirlist); ++$i)
+ for ($i = 0, $end = sizeof($dirlist); $i < $end; ++$i)
{
$dir = $dirlist[$i];
@@ -2471,7 +2471,7 @@ function copy_dir($src, $trg, $copy_subdirs = true, $overwrite = false, $die_on_
$convert->p_master->error(sprintf($str, implode('<br />', $bad_dirs)), __LINE__, __FILE__);
}
- for ($i = 0; $i < sizeof($filelist); ++$i)
+ for ($i = 0, $end = sizeof($filelist); $i < $end; ++$i)
{
copy_file($src . $filelist[$i], $trg . $filelist[$i], $overwrite, $die_on_failure, $source_relative_path);
}
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 42cc27e60b..0ea6eeffd7 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -31,7 +31,6 @@ function phpbb_end_update($cache, $config)
</p>
</div>
</div>
- <span class="corners-bottom"><span></span></span>
</div>
</div>
</div>
@@ -153,7 +152,6 @@ header('Content-type: text/html; charset=UTF-8');
<div id="page-body">
<div id="acp">
<div class="panel">
- <span class="corners-top"><span></span></span>
<div id="content">
<div id="main" class="install-body">
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php
index a0f8a928de..10b05eb559 100644
--- a/phpBB/install/install_convert.php
+++ b/phpBB/install/install_convert.php
@@ -932,7 +932,7 @@ class install_convert extends module
$val = array($val);
}
- for ($j = 0; $j < sizeof($val); ++$j)
+ for ($j = 0, $size = sizeof($val); $j < $size; ++$j)
{
if (preg_match('/LEFT JOIN ([a-z0-9_]+) AS ([a-z0-9_]+)/i', $val[$j], $m))
{
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 70e834b682..b93476b3bb 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -90,6 +90,12 @@ $default_key = 'c';
$sort_key = request_var('sk', $default_key);
$sort_dir = request_var('sd', 'a');
+$user_types = array(USER_NORMAL, USER_FOUNDER);
+if ($auth->acl_get('a_user'))
+{
+ $user_types[] = USER_INACTIVE;
+}
+
// What do you want to do today? ... oops, I think that line is taken ...
switch ($mode)
{
@@ -834,7 +840,7 @@ switch ($mode)
$sql = 'SELECT username, user_id, user_colour
FROM ' . USERS_TABLE . '
- WHERE ' . $db->sql_in_set('user_type', array(USER_NORMAL, USER_FOUNDER)) . '
+ WHERE ' . $db->sql_in_set('user_type', $user_types) . '
AND username_clean ' . $db->sql_like_expression(utf8_clean_string($username_chars) . $db->get_any_char());
$result = $db->sql_query_limit($sql, 10);
$user_list = array();
@@ -1229,11 +1235,6 @@ switch ($mode)
);
extract($phpbb_dispatcher->trigger_event('core.memberlist_modify_sql_query_data', compact($vars)));
- $user_types = array(USER_NORMAL, USER_FOUNDER);
- if ($auth->acl_get('a_user'))
- {
- $user_types[] = USER_INACTIVE;
- }
// Count the users ...
$sql = 'SELECT COUNT(u.user_id) AS total_users
FROM ' . USERS_TABLE . " u$sql_from
diff --git a/phpBB/phpbb/db/migration/data/v310/alpha1.php b/phpBB/phpbb/db/migration/data/v310/alpha1.php
index 1df85bc64c..4a48d2830a 100644
--- a/phpBB/phpbb/db/migration/data/v310/alpha1.php
+++ b/phpBB/phpbb/db/migration/data/v310/alpha1.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class alpha1 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-a1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/alpha2.php b/phpBB/phpbb/db/migration/data/v310/alpha2.php
index 78bc755ec9..bfbcc4f6f5 100644
--- a/phpBB/phpbb/db/migration/data/v310/alpha2.php
+++ b/phpBB/phpbb/db/migration/data/v310/alpha2.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class alpha2 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-a2', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/alpha3.php b/phpBB/phpbb/db/migration/data/v310/alpha3.php
index 574d19d2f4..bb0f904fd4 100644
--- a/phpBB/phpbb/db/migration/data/v310/alpha3.php
+++ b/phpBB/phpbb/db/migration/data/v310/alpha3.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class alpha3 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-a3', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/beta1.php b/phpBB/phpbb/db/migration/data/v310/beta1.php
index 84887bd58e..9feba5235d 100644
--- a/phpBB/phpbb/db/migration/data/v310/beta1.php
+++ b/phpBB/phpbb/db/migration/data/v310/beta1.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class beta1 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-b1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/beta2.php b/phpBB/phpbb/db/migration/data/v310/beta2.php
index 458e305c7b..d5e31ce4cb 100644
--- a/phpBB/phpbb/db/migration/data/v310/beta2.php
+++ b/phpBB/phpbb/db/migration/data/v310/beta2.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class beta2 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-b2', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/beta3.php b/phpBB/phpbb/db/migration/data/v310/beta3.php
index a6c62bf936..78c61e8e90 100644
--- a/phpBB/phpbb/db/migration/data/v310/beta3.php
+++ b/phpBB/phpbb/db/migration/data/v310/beta3.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class beta3 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-b3', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/beta4.php b/phpBB/phpbb/db/migration/data/v310/beta4.php
index 3e91d95178..e634785c38 100644
--- a/phpBB/phpbb/db/migration/data/v310/beta4.php
+++ b/phpBB/phpbb/db/migration/data/v310/beta4.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class beta4 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-b4', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/gold.php b/phpBB/phpbb/db/migration/data/v310/gold.php
index e84c7ee951..188851f87d 100644
--- a/phpBB/phpbb/db/migration/data/v310/gold.php
+++ b/phpBB/phpbb/db/migration/data/v310/gold.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class gold extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/rc1.php b/phpBB/phpbb/db/migration/data/v310/rc1.php
index 10ba7fefff..751208c6ca 100644
--- a/phpBB/phpbb/db/migration/data/v310/rc1.php
+++ b/phpBB/phpbb/db/migration/data/v310/rc1.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class rc1 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-RC1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/rc2.php b/phpBB/phpbb/db/migration/data/v310/rc2.php
index e1323659da..5cd0393a13 100644
--- a/phpBB/phpbb/db/migration/data/v310/rc2.php
+++ b/phpBB/phpbb/db/migration/data/v310/rc2.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class rc2 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-RC2', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/rc3.php b/phpBB/phpbb/db/migration/data/v310/rc3.php
index 0e6a452251..9fb483ef6a 100644
--- a/phpBB/phpbb/db/migration/data/v310/rc3.php
+++ b/phpBB/phpbb/db/migration/data/v310/rc3.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class rc3 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-RC3', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/rc4.php b/phpBB/phpbb/db/migration/data/v310/rc4.php
index 47de8291c1..0d756c762c 100644
--- a/phpBB/phpbb/db/migration/data/v310/rc4.php
+++ b/phpBB/phpbb/db/migration/data/v310/rc4.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class rc4 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-RC4', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/rc5.php b/phpBB/phpbb/db/migration/data/v310/rc5.php
index 5b6f70e32e..d92537d877 100644
--- a/phpBB/phpbb/db/migration/data/v310/rc5.php
+++ b/phpBB/phpbb/db/migration/data/v310/rc5.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class rc5 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-RC5', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/rc6.php b/phpBB/phpbb/db/migration/data/v310/rc6.php
index b84f2edcc9..1df502a1e4 100644
--- a/phpBB/phpbb/db/migration/data/v310/rc6.php
+++ b/phpBB/phpbb/db/migration/data/v310/rc6.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class rc6 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-RC6', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v311.php b/phpBB/phpbb/db/migration/data/v31x/v311.php
index 00844dd4c0..b9d6ed3053 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v311.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v311.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v311 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v312.php b/phpBB/phpbb/db/migration/data/v31x/v312.php
index bf49935f4d..114c2b959b 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v312.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v312.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v312 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.2', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v312rc1.php b/phpBB/phpbb/db/migration/data/v31x/v312rc1.php
index d4b133fc01..e2408d432b 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v312rc1.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v312rc1.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v312rc1 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.2-RC1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v313.php b/phpBB/phpbb/db/migration/data/v31x/v313.php
index 5a4e21a9b7..b86788da16 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v313.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v313.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v313 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.3', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v313rc1.php b/phpBB/phpbb/db/migration/data/v31x/v313rc1.php
index e50754f805..b1dcc03364 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v313rc1.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v313rc1.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v313rc1 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.3-RC1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v313rc2.php b/phpBB/phpbb/db/migration/data/v31x/v313rc2.php
index d832d6f502..b701dca5ed 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v313rc2.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v313rc2.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v313rc2 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.3-RC2', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v314.php b/phpBB/phpbb/db/migration/data/v31x/v314.php
index b7793ca569..82dbbf29c9 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v314.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v314.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v314 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.4', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v314rc1.php b/phpBB/phpbb/db/migration/data/v31x/v314rc1.php
index 10cdbe3f9c..e7baf0c2ce 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v314rc1.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v314rc1.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v314rc1 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.4-RC1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v314rc2.php b/phpBB/phpbb/db/migration/data/v31x/v314rc2.php
index b75b7a9be8..3fc5bf2ad5 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v314rc2.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v314rc2.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v314rc2 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.4-RC2', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v315.php b/phpBB/phpbb/db/migration/data/v31x/v315.php
index 778cdf717e..d5eacf8dd3 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v315.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v315.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v315 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.5', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v315rc1.php b/phpBB/phpbb/db/migration/data/v31x/v315rc1.php
index 4cf4472aa7..a58b6a0f2a 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v315rc1.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v315rc1.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v315rc1 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.5-RC1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v316.php b/phpBB/phpbb/db/migration/data/v31x/v316.php
index cec113eff2..b3e0060ced 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v316.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v316.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v316 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.6', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v316rc1.php b/phpBB/phpbb/db/migration/data/v31x/v316rc1.php
index 487cd05e5d..6badfb68d4 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v316rc1.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v316rc1.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v316rc1 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.6-RC1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v317.php b/phpBB/phpbb/db/migration/data/v31x/v317.php
index 15ba2a1feb..d95be06ba6 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v317.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v317.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v317 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.7', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v317pl1.php b/phpBB/phpbb/db/migration/data/v31x/v317pl1.php
index 2e1b0e9b9d..1cb39b03f0 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v317pl1.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v317pl1.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v317pl1 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.7-pl1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v317rc1.php b/phpBB/phpbb/db/migration/data/v31x/v317rc1.php
index fa24819094..77759daa66 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v317rc1.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v317rc1.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v317rc1 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.7-RC1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v318.php b/phpBB/phpbb/db/migration/data/v31x/v318.php
index b254279a5d..7663529d3a 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v318.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v318.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v318 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.8', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v318rc1.php b/phpBB/phpbb/db/migration/data/v31x/v318rc1.php
index 8bae95c7d6..2cab5c96d4 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v318rc1.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v318rc1.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v318rc1 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.8-RC1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/tools.php b/phpBB/phpbb/db/tools.php
index e76e7b0e18..832a0c510c 100644
--- a/phpBB/phpbb/db/tools.php
+++ b/phpBB/phpbb/db/tools.php
@@ -2340,7 +2340,7 @@ class tools
if (!empty($column_data['default']))
{
// Add new default value constraint
- $statements[] = 'ALTER TABLE [' . $table_name . '] ADD CONSTRAINT [DF_' . $table_name . '_' . $column_name . '_1] ' . $this->db->sql_escape($column_data['default']) . ' FOR [' . $column_name . ']';
+ $statements[] = 'ALTER TABLE [' . $table_name . '] ADD CONSTRAINT [DF_' . $table_name . '_' . $column_name . '_1] ' . $column_data['default'] . ' FOR [' . $column_name . ']';
}
if (!empty($indexes))
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 263809e998..653740ae1c 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -1589,6 +1589,9 @@ $message_parser->decode_message($post_data['bbcode_uid']);
if ($generate_quote)
{
+ // Remove attachment bbcode tags from the quoted message to avoid mixing with the new post attachments if any
+ $message_parser->message = preg_replace('#\[attachment=([0-9]+)\](.*?)\[\/attachment\]#uis', '\\2', $message_parser->message);
+
if ($config['allow_bbcode'])
{
$message_parser->message = '[quote=&quot;' . $post_data['quote_username'] . '&quot;]' . censor_text(trim($message_parser->message)) . "[/quote]\n";
diff --git a/travis/setup-phpbb.sh b/travis/setup-phpbb.sh
index 8cb2f4cd68..4daa754481 100755
--- a/travis/setup-phpbb.sh
+++ b/travis/setup-phpbb.sh
@@ -37,5 +37,10 @@ then
fi
cd phpBB
+if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.4', '<');"` == "1" ]
+then
+ php ../composer.phar config disable-tls true
+fi
php ../composer.phar install --dev --no-interaction
+
cd ..