mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 01:06:48 +02:00
Merge branch '3.2.x'
This commit is contained in:
36
phpBB/phpbb/db/migration/data/v31x/v3112.php
Normal file
36
phpBB/phpbb/db/migration/data/v31x/v3112.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\v31x;
|
||||
|
||||
class v3112 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
return phpbb_version_compare($this->config['version'], '3.1.12', '>=');
|
||||
}
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array(
|
||||
'\phpbb\db\migration\data\v31x\v3111',
|
||||
);
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('config.update', array('version', '3.1.12')),
|
||||
);
|
||||
}
|
||||
}
|
37
phpBB/phpbb/db/migration/data/v32x/v322.php
Normal file
37
phpBB/phpbb/db/migration/data/v32x/v322.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?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\v32x;
|
||||
|
||||
class v322 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
return phpbb_version_compare($this->config['version'], '3.2.2', '>=');
|
||||
}
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array(
|
||||
'\phpbb\db\migration\data\v31x\v3112',
|
||||
'\phpbb\db\migration\data\v32x\v322rc1',
|
||||
);
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('config.update', array('version', '3.2.2')),
|
||||
);
|
||||
}
|
||||
}
|
@@ -86,7 +86,8 @@ class download_updated_files extends task_base
|
||||
{
|
||||
$file_update_info = $this->installer_config->get('update_files', array());
|
||||
|
||||
if (count($file_update_info) > 0)
|
||||
// Display download box only if the archive won't be empty
|
||||
if (!empty($file_update_info) && !(isset($file_update_info['delete']) && count($file_update_info) == 1))
|
||||
{
|
||||
// Render download box
|
||||
$this->iohandler->add_download_link(
|
||||
|
@@ -64,11 +64,24 @@ class type_url extends type_string
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!preg_match('#^' . get_preg_expression('url') . '$#iu', $field_value))
|
||||
if (!preg_match('#^' . get_preg_expression('url_http') . '$#iu', $field_value))
|
||||
{
|
||||
return $this->user->lang('FIELD_INVALID_URL', $this->get_field_name($field_data['lang_name']));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function get_profile_value($field_value, $field_data)
|
||||
{
|
||||
if (!preg_match('#^' . get_preg_expression('url_http') . '$#iu', $field_value))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return parent::get_profile_value($field_value, $field_data);
|
||||
}
|
||||
}
|
||||
|
@@ -498,7 +498,7 @@ class fulltext_postgres extends \phpbb\search\base
|
||||
);
|
||||
extract($this->phpbb_dispatcher->trigger_event('core.search_postgres_keywords_main_query_before', compact($vars)));
|
||||
|
||||
$sql_select = ($type == 'posts') ? 'p.post_id' : 'DISTINCT t.topic_id';
|
||||
$sql_select = ($type == 'posts') ? 'p.post_id' : 'DISTINCT t.topic_id, ' . $sort_by_sql[$sort_key];
|
||||
$sql_from = ($join_topic) ? TOPICS_TABLE . ' t, ' : '';
|
||||
$field = ($type == 'posts') ? 'post_id' : 'topic_id';
|
||||
|
||||
|
Reference in New Issue
Block a user