1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* For licensing terms, see /license.txt */ |
4
|
|
|
|
5
|
|
|
declare(strict_types=1); |
6
|
|
|
|
7
|
|
|
namespace Chamilo\CoreBundle\Migrations\Schema\V200; |
8
|
|
|
|
9
|
|
|
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo; |
10
|
|
|
use Doctrine\DBAL\Schema\Schema; |
11
|
|
|
|
12
|
|
|
class Version20240506164100 extends AbstractMigrationChamilo |
13
|
|
|
{ |
14
|
|
|
/** |
15
|
|
|
* @inheritDoc |
16
|
|
|
*/ |
17
|
|
|
public function up(Schema $schema): void |
18
|
|
|
{ |
19
|
|
|
$selectedMailValue = $this->getMailConfigurationValueFromFile('SMTP_UNIQUE_SENDER') ? 'true' : 'false'; |
20
|
|
|
|
21
|
|
|
$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)"); |
22
|
|
|
|
23
|
|
|
$selectedMailValue = $this->getMailConfigurationValueFromFile('SMTP_FROM_EMAIL'); |
24
|
|
|
|
25
|
|
|
$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)"); |
26
|
|
|
|
27
|
|
|
$selectedMailValue = $this->getMailConfigurationValueFromFile('SMTP_FROM_NAME'); |
28
|
|
|
|
29
|
|
|
$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)"); |
30
|
|
|
} |
31
|
|
|
} |