|
1
|
|
|
<?php |
|
2
|
|
|
/* For licensing terms, see /license.txt */ |
|
3
|
|
|
|
|
4
|
|
|
namespace Chamilo\CoreBundle\Migrations\Schema\V111; |
|
5
|
|
|
|
|
6
|
|
|
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo; |
|
7
|
|
|
use Doctrine\DBAL\Schema\Schema; |
|
8
|
|
|
use Doctrine\DBAL\Types\Type; |
|
9
|
|
|
|
|
10
|
|
|
/** |
|
11
|
|
|
* Class Version20160712150000 |
|
12
|
|
|
* Add option to use SVG icons instead of their PNG version |
|
13
|
|
|
* @package Chamilo\CoreBundle\Migrations\Schema\V111 |
|
14
|
|
|
*/ |
|
15
|
|
|
class Version20160712150000 extends AbstractMigrationChamilo |
|
16
|
|
|
{ |
|
17
|
|
|
/** |
|
18
|
|
|
* @param Schema $schema |
|
19
|
|
|
* @throws \Doctrine\DBAL\DBALException |
|
20
|
|
|
* @throws \Doctrine\DBAL\Schema\SchemaException |
|
21
|
|
|
*/ |
|
22
|
|
|
public function up(Schema $schema) |
|
23
|
|
|
{ |
|
24
|
|
|
$this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('icons_mode_svg', NULL, 'radio', 'Tuning', 'false', 'IconsModeSVGTitle','IconsModeSVGComment','',NULL, 1)"); |
|
25
|
|
|
$this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('icons_mode_svg','true','Yes') "); |
|
26
|
|
|
$this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('icons_mode_svg','false','No') "); |
|
27
|
|
|
} |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* @param Schema $schema |
|
31
|
|
|
* @throws \Doctrine\DBAL\DBALException |
|
32
|
|
|
* @throws \Doctrine\DBAL\Schema\SchemaException |
|
33
|
|
|
*/ |
|
34
|
|
|
public function down(Schema $schema) |
|
35
|
|
|
{ |
|
36
|
|
|
$this->addSql("DELETE FROM settings_current WHERE variable = 'icons_mode_svg'"); |
|
37
|
|
|
$this->addSql("DELETE FROM settings_options WHERE variable = 'icons_mode_svg'"); |
|
38
|
|
|
} |
|
39
|
|
|
} |
|
40
|
|
|
|