Browse Source

Merge pull request #1292 from jloguercio/1.11.x

Removed allow_browser_sniffer settings from platform - Refs #8319
José Loguercio 8 years ago
parent
commit
3f0be83ea7
2 changed files with 39 additions and 3 deletions
  1. 39 0
      app/Migrations/Schema/V111/Version20160713180000.php
  2. 0 3
      main/install/data.sql

+ 39 - 0
app/Migrations/Schema/V111/Version20160713180000.php

@@ -0,0 +1,39 @@
+<?php
+/* For licensing terms, see /license.txt */
+
+namespace Application\Migrations\Schema\V111;
+
+use Application\Migrations\AbstractMigrationChamilo;
+use Doctrine\DBAL\Schema\Schema;
+use Doctrine\DBAL\Types\Type;
+
+/**
+ * Class Version20160713180000
+ * Add option to use SVG icons instead of their PNG version
+ * @package Application\Migrations\Schema\V111
+ */
+class Version20160713180000 extends AbstractMigrationChamilo
+{
+    /**
+     * @param Schema $schema
+     * @throws \Doctrine\DBAL\DBALException
+     * @throws \Doctrine\DBAL\Schema\SchemaException
+     */
+    public function up(Schema $schema)
+    {
+        $this->addSql("DELETE FROM settings_current WHERE variable = 'allow_browser_sniffer'");
+        $this->addSql("DELETE FROM settings_options WHERE variable = 'allow_browser_sniffer'");
+    }
+
+    /**
+     * @param Schema $schema
+     * @throws \Doctrine\DBAL\DBALException
+     * @throws \Doctrine\DBAL\Schema\SchemaException
+     */
+    public function down(Schema $schema)
+    {
+        $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('allow_browser_sniffer', NULL, 'radio', 'Tuning', 'false', 'AllowBrowserSnifferTitle','AllowBrowserSnifferComment',NULL,NULL, 0)");
+        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_browser_sniffer','true','Yes') ");
+        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_browser_sniffer','false','No') ");
+    }
+}

+ 0 - 3
main/install/data.sql

@@ -269,7 +269,6 @@ VALUES
 ('languagePriority4', NULL, 'radio', 'Languages', 'platform_lang','LanguagePriority4Title', 'LanguagePriority4Comment', NULL, NULL, 0),
 ('login_is_email', NULL, 'radio', 'Platform', 'false', 'LoginIsEmailTitle', 'LoginIsEmailComment', NULL, NULL, 0),
 ('courses_default_creation_visibility', NULL, 'radio', 'Course', '2', 'CoursesDefaultCreationVisibilityTitle', 'CoursesDefaultCreationVisibilityComment', NULL, NULL, 1),
-('allow_browser_sniffer', NULL, 'radio', 'Tuning', 'false', 'AllowBrowserSnifferTitle', 'AllowBrowserSnifferComment', NULL, NULL, 0),
 ('gradebook_enable_grade_model', NULL, 'radio', 'Gradebook', 'false', 'GradebookEnableGradeModelTitle', 'GradebookEnableGradeModelComment', NULL, NULL, 1),
 ('teachers_can_change_grade_model_settings', NULL, 'radio', 'Gradebook', 'true', 'TeachersCanChangeGradeModelSettingsTitle', 'TeachersCanChangeGradeModelSettingsComment', NULL, NULL, 1),
 ('gradebook_default_weight', NULL, 'textfield', 'Gradebook', '100', 'GradebookDefaultWeightTitle', 'GradebookDefaultWeightComment', NULL, NULL, 0),
@@ -596,8 +595,6 @@ VALUES
 ('courses_default_creation_visibility', '2', 'OpenToThePlatform'),
 ('courses_default_creation_visibility', '1', 'Private'),
 ('courses_default_creation_visibility', '0', 'CourseVisibilityClosed'),
-('allow_browser_sniffer', 'true', 'Yes'),
-('allow_browser_sniffer', 'false', 'No'),
 ('teachers_can_change_score_settings', 'true', 'Yes'),
 ('teachers_can_change_score_settings', 'false', 'No'),
 ('teachers_can_change_grade_model_settings', 'true', 'Yes'),