1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Chamilo\CoreBundle\Migrations\Schema\V200; |
4
|
|
|
|
5
|
|
|
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo; |
6
|
|
|
use Doctrine\DBAL\Schema\Schema; |
7
|
|
|
|
8
|
|
|
class Version20240506164100 extends AbstractMigrationChamilo |
9
|
|
|
{ |
10
|
|
|
|
11
|
|
|
/** |
12
|
|
|
* @inheritDoc |
13
|
|
|
*/ |
14
|
|
|
public function up(Schema $schema): void |
15
|
|
|
{ |
16
|
|
|
$selectedMailValue = $this->getMailConfigurationValueFromFile('SMTP_UNIQUE_SENDER') ? 'true' : 'false'; |
17
|
|
|
|
18
|
|
|
$this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url, access_url_changeable, access_url_locked) VALUES ('smtp_unique_sender', null, null, 'mail', '$selectedMailValue', 'smtp_unique_sender', null, '', null, 1, 1, 1)"); |
19
|
|
|
|
20
|
|
|
$selectedMailValue = $this->getMailConfigurationValueFromFile('SMTP_FROM_EMAIL'); |
21
|
|
|
|
22
|
|
|
$this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url, access_url_changeable, access_url_locked) VALUES ('smtp_from_email', null, null, 'mail', '$selectedMailValue', 'smtp_from_email', null, '', null, 1, 1, 1)"); |
23
|
|
|
|
24
|
|
|
$selectedMailValue = $this->getMailConfigurationValueFromFile('SMTP_FROM_NAME'); |
25
|
|
|
|
26
|
|
|
$this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url, access_url_changeable, access_url_locked) VALUES ('smtp_from_name', null, null, 'mail', '$selectedMailValue', 'smtp_from_name', null, '', null, 1, 1, 1)"); |
27
|
|
|
} |
28
|
|
|
} |