mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/13489] Update migrations
PHPBB3-13489
This commit is contained in:
@@ -13,7 +13,10 @@
|
||||
|
||||
namespace phpbb\db\migration;
|
||||
|
||||
abstract class profilefield_base_migration extends \phpbb\db\migration\migration
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
||||
abstract class profilefield_base_migration extends \phpbb\db\migration\migration implements ContainerAwareInterface
|
||||
{
|
||||
protected $profilefield_name;
|
||||
|
||||
@@ -40,6 +43,11 @@ abstract class profilefield_base_migration extends \phpbb\db\migration\migration
|
||||
|
||||
protected $user_column_name;
|
||||
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
protected $container;
|
||||
|
||||
public function effectively_installed()
|
||||
{
|
||||
return $this->db_tools->sql_column_exists($this->table_prefix . 'profile_fields_data', 'pf_' . $this->profilefield_name);
|
||||
@@ -237,11 +245,18 @@ abstract class profilefield_base_migration extends \phpbb\db\migration\migration
|
||||
|
||||
if ($profile_row === null)
|
||||
{
|
||||
global $phpbb_container;
|
||||
$manager = $phpbb_container->get('profilefields.manager');
|
||||
$manager = $this->container->get('profilefields.manager');
|
||||
$profile_row = $manager->build_insert_sql_array(array());
|
||||
}
|
||||
|
||||
return $profile_row;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user