1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Merge branch '3.2.x'

This commit is contained in:
Marc Alexander
2018-11-11 13:56:25 +01:00
25 changed files with 142 additions and 376 deletions

View File

@@ -0,0 +1,31 @@
<?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 remove_imagick extends \phpbb\db\migration\migration
{
static public function depends_on()
{
return array(
'\phpbb\db\migration\data\v32x\v324rc1',
);
}
public function update_data()
{
return array(
array('config.remove', array('img_imagick')),
);
}
}

View File

@@ -23,6 +23,7 @@ class v322rc1 extends \phpbb\db\migration\migration
static public function depends_on()
{
return array(
'\phpbb\db\migration\data\v32x\v321',
'\phpbb\db\migration\data\v32x\fix_user_styles',
'\phpbb\db\migration\data\v32x\update_prosilver_bitfield',
'\phpbb\db\migration\data\v32x\email_force_sender',

View File

@@ -23,6 +23,7 @@ class v323rc1 extends \phpbb\db\migration\migration
static public function depends_on()
{
return array(
'\phpbb\db\migration\data\v32x\v322',
'\phpbb\db\migration\data\v32x\enable_accurate_pm_button',
);
}

View File

@@ -0,0 +1,38 @@
<?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 v324 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
return phpbb_version_compare($this->config['version'], '3.2.4', '>=');
}
static public function depends_on()
{
return array(
'\phpbb\db\migration\data\v32x\v324rc1',
'\phpbb\db\migration\data\v32x\remove_imagick',
);
}
public function update_data()
{
return array(
array('config.update', array('version', '3.2.4')),
);
}
}

View File

@@ -23,6 +23,7 @@ class v324rc1 extends \phpbb\db\migration\migration
static public function depends_on()
{
return array(
'\phpbb\db\migration\data\v32x\v323',
'\phpbb\db\migration\data\v32x\forum_topics_per_page_type',
);
}

View File

@@ -150,10 +150,6 @@ class add_config_settings extends \phpbb\install\task_base
'INSERT INTO ' . $this->config_table . " (config_name, config_value)
VALUES ('default_lang', '" . $this->db->sql_escape($this->install_config->get('default_lang')) . "')",
'UPDATE ' . $this->config_table . "
SET config_value = '" . $this->db->sql_escape($this->install_config->get('img_imagick')) . "'
WHERE config_name = 'img_imagick'",
'UPDATE ' . $this->config_table . "
SET config_value = '" . $this->db->sql_escape($this->install_config->get('server_name')) . "'
WHERE config_name = 'server_name'",

View File

@@ -1,89 +0,0 @@
<?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\install\module\obtain_data\task;
class obtain_imagick_path extends \phpbb\install\task_base implements \phpbb\install\task_interface
{
/**
* @var \phpbb\install\helper\config
*/
protected $config;
/**
* Constructor
*
* @param \phpbb\install\helper\config $config Installer's config
*/
public function __construct(\phpbb\install\helper\config $config)
{
$this->config = $config;
parent::__construct(true);
}
/**
* {@inheritdoc}
*/
public function run()
{
// Can we find ImageMagick anywhere on the system?
$exe = (DIRECTORY_SEPARATOR == '\\') ? '.exe' : '';
$magic_home = getenv('MAGICK_HOME');
$img_imagick = '';
if (empty($magic_home))
{
$locations = array('C:/WINDOWS/', 'C:/WINNT/', 'C:/WINDOWS/SYSTEM/', 'C:/WINNT/SYSTEM/', 'C:/WINDOWS/SYSTEM32/', 'C:/WINNT/SYSTEM32/', '/usr/bin/', '/usr/sbin/', '/usr/local/bin/', '/usr/local/sbin/', '/opt/', '/usr/imagemagick/', '/usr/bin/imagemagick/');
$path_locations = str_replace('\\', '/', (explode(($exe) ? ';' : ':', getenv('PATH'))));
$locations = array_merge($path_locations, $locations);
foreach ($locations as $location)
{
// The path might not end properly, fudge it
if (substr($location, -1, 1) !== '/')
{
$location .= '/';
}
if (@file_exists($location) && @is_readable($location . 'mogrify' . $exe) && @filesize($location . 'mogrify' . $exe) > 3000)
{
$img_imagick = str_replace('\\', '/', $location);
continue;
}
}
}
else
{
$img_imagick = str_replace('\\', '/', $magic_home);
}
$this->config->set('img_imagick', $img_imagick);
}
/**
* {@inheritdoc}
*/
static public function get_step_count()
{
return 0;
}
/**
* {@inheritdoc}
*/
public function get_task_lang_name()
{
return '';
}
}