[TASK] Change naming in context preset in Install Tool 30/40730/3
authorBenjamin Mack <benni@typo3.org>
Mon, 29 Jun 2015 19:13:55 +0000 (21:13 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 29 Jun 2015 19:48:11 +0000 (21:48 +0200)
Due to the similar naming logic, the preset for configuring optimal
debugging output conflicts with the ApplicationContext set as an
environment variable (TYPO3_CONTEXT), is changed from
"Production" and "Development" to "Live" and "Debug".

Resolves: #67820
Releases: master
Change-Id: I01f0db39532222a8cbeb3a45a745ce6fd977e137
Reviewed-on: http://review.typo3.org/40730
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers <xavier@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/install/Classes/Configuration/Context/ContextFeature.php
typo3/sysext/install/Classes/Configuration/Context/DebugPreset.php [new file with mode: 0644]
typo3/sysext/install/Classes/Configuration/Context/DevelopmentPreset.php [deleted file]
typo3/sysext/install/Classes/Configuration/Context/LivePreset.php [new file with mode: 0644]
typo3/sysext/install/Classes/Configuration/Context/ProductionPreset.php [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Configuration/Context.html
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Configuration/Context/Debug.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Configuration/Context/Development.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Configuration/Context/Live.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Configuration/Context/Production.html [deleted file]

index 11237d7..5127967 100644 (file)
@@ -30,8 +30,8 @@ class ContextFeature extends Configuration\AbstractFeature implements Configurat
         * @var array List of preset classes
         */
        protected $presetRegistry = array(
-               \TYPO3\CMS\Install\Configuration\Context\ProductionPreset::class,
-               \TYPO3\CMS\Install\Configuration\Context\DevelopmentPreset::class,
+               \TYPO3\CMS\Install\Configuration\Context\LivePreset::class,
+               \TYPO3\CMS\Install\Configuration\Context\DebugPreset::class,
                \TYPO3\CMS\Install\Configuration\Context\CustomPreset::class,
        );
 }
diff --git a/typo3/sysext/install/Classes/Configuration/Context/DebugPreset.php b/typo3/sysext/install/Classes/Configuration/Context/DebugPreset.php
new file mode 100644 (file)
index 0000000..9b628c0
--- /dev/null
@@ -0,0 +1,74 @@
+<?php
+namespace TYPO3\CMS\Install\Configuration\Context;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Install\Configuration;
+
+/**
+ * Debug preset
+ */
+class DebugPreset extends Configuration\AbstractPreset {
+
+       /**
+        * @var string Name of preset
+        */
+       protected $name = 'Debug';
+
+       /**
+        * @var int Priority of preset
+        */
+       protected $priority = 50;
+
+       /**
+        * @var array Configuration values handled by this preset
+        */
+       protected $configurationValues = array(
+               'BE/debug' => TRUE,
+               'FE/debug' => TRUE,
+               'SYS/devIPmask' => '*',
+               'SYS/displayErrors' => 1,
+               'SYS/enableDeprecationLog' => 'file',
+               'SYS/sqlDebug' => 1,
+               'SYS/systemLogLevel' => 0,
+               // E_WARNING | E_RECOVERABLE_ERROR | E_DEPRECATED | E_USER_DEPRECATED
+               'SYS/exceptionalErrors' => 28674,
+               'SYS/clearCacheSystem' => TRUE,
+       );
+
+       /**
+        * Development preset is always available
+        *
+        * @return bool TRUE if mbstring PHP module is loaded
+        */
+       public function isAvailable() {
+               return TRUE;
+       }
+
+       /**
+        * If context is set to development, priority
+        * of this preset is raised.
+        *
+        * @return int Priority of preset
+        */
+       public function getPriority() {
+               $context = \TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext();
+               $priority = $this->priority;
+               if ($context->isDevelopment()) {
+                       $priority = $priority + 20;
+               }
+               return $priority;
+       }
+
+}
diff --git a/typo3/sysext/install/Classes/Configuration/Context/DevelopmentPreset.php b/typo3/sysext/install/Classes/Configuration/Context/DevelopmentPreset.php
deleted file mode 100644 (file)
index 4dbb8ed..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-namespace TYPO3\CMS\Install\Configuration\Context;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Install\Configuration;
-
-/**
- * Development preset
- */
-class DevelopmentPreset extends Configuration\AbstractPreset {
-
-       /**
-        * @var string Name of preset
-        */
-       protected $name = 'Development';
-
-       /**
-        * @var int Priority of preset
-        */
-       protected $priority = 50;
-
-       /**
-        * @var array Configuration values handled by this preset
-        */
-       protected $configurationValues = array(
-               'BE/debug' => TRUE,
-               'FE/debug' => TRUE,
-               'SYS/devIPmask' => '*',
-               'SYS/displayErrors' => 1,
-               'SYS/enableDeprecationLog' => 'file',
-               'SYS/sqlDebug' => 1,
-               'SYS/systemLogLevel' => 0,
-               // E_WARNING | E_RECOVERABLE_ERROR | E_DEPRECATED | E_USER_DEPRECATED
-               'SYS/exceptionalErrors' => 28674,
-               'SYS/clearCacheSystem' => TRUE,
-       );
-
-       /**
-        * Development preset is always available
-        *
-        * @return bool TRUE if mbstring PHP module is loaded
-        */
-       public function isAvailable() {
-               return TRUE;
-       }
-
-       /**
-        * If context is set to development, priority
-        * of this preset is raised.
-        *
-        * @return int Priority of preset
-        */
-       public function getPriority() {
-               $context = \TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext();
-               $priority = $this->priority;
-               if ($context->isDevelopment()) {
-                       $priority = $priority + 20;
-               }
-               return $priority;
-       }
-
-}
diff --git a/typo3/sysext/install/Classes/Configuration/Context/LivePreset.php b/typo3/sysext/install/Classes/Configuration/Context/LivePreset.php
new file mode 100644 (file)
index 0000000..41477b8
--- /dev/null
@@ -0,0 +1,72 @@
+<?php
+namespace TYPO3\CMS\Install\Configuration\Context;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Install\Configuration;
+
+/**
+ * Live preset
+ */
+class LivePreset extends Configuration\AbstractPreset {
+
+       /**
+        * @var string Name of preset
+        */
+       protected $name = 'Live';
+
+       /**
+        * @var int Priority of preset
+        */
+       protected $priority = 50;
+
+       /**
+        * @var array Configuration values handled by this preset
+        */
+       protected $configurationValues = array(
+               'BE/debug' => FALSE,
+               'FE/debug' => FALSE,
+               'SYS/devIPmask' => '',
+               'SYS/displayErrors' => 0,
+               'SYS/enableDeprecationLog' => FALSE,
+               'SYS/sqlDebug' => 0,
+               'SYS/systemLogLevel' => 2,
+               'SYS/clearCacheSystem' => FALSE,
+       );
+
+       /**
+        * Production preset is always available
+        *
+        * @return bool TRUE if mbstring PHP module is loaded
+        */
+       public function isAvailable() {
+               return TRUE;
+       }
+
+       /**
+        * If context is set to production, priority
+        * of this preset is raised.
+        *
+        * @return int Priority of preset
+        */
+       public function getPriority() {
+               $context = \TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext();
+               $priority = $this->priority;
+               if ($context->isProduction()) {
+                       $priority = $priority + 20;
+               }
+               return $priority;
+       }
+
+}
diff --git a/typo3/sysext/install/Classes/Configuration/Context/ProductionPreset.php b/typo3/sysext/install/Classes/Configuration/Context/ProductionPreset.php
deleted file mode 100644 (file)
index be22cee..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-namespace TYPO3\CMS\Install\Configuration\Context;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Install\Configuration;
-
-/**
- * Production preset
- */
-class ProductionPreset extends Configuration\AbstractPreset {
-
-       /**
-        * @var string Name of preset
-        */
-       protected $name = 'Production';
-
-       /**
-        * @var int Priority of preset
-        */
-       protected $priority = 50;
-
-       /**
-        * @var array Configuration values handled by this preset
-        */
-       protected $configurationValues = array(
-               'BE/debug' => FALSE,
-               'FE/debug' => FALSE,
-               'SYS/devIPmask' => '',
-               'SYS/displayErrors' => 0,
-               'SYS/enableDeprecationLog' => FALSE,
-               'SYS/sqlDebug' => 0,
-               'SYS/systemLogLevel' => 2,
-               'SYS/clearCacheSystem' => FALSE,
-       );
-
-       /**
-        * Production preset is always available
-        *
-        * @return bool TRUE if mbstring PHP module is loaded
-        */
-       public function isAvailable() {
-               return TRUE;
-       }
-
-       /**
-        * If context is set to production, priority
-        * of this preset is raised.
-        *
-        * @return int Priority of preset
-        */
-       public function getPriority() {
-               $context = \TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext();
-               $priority = $this->priority;
-               if ($context->isProduction()) {
-                       $priority = $priority + 20;
-               }
-               return $priority;
-       }
-
-}
index 4245535..65fa66e 100644 (file)
@@ -1,6 +1,6 @@
 <div class="toggleGroup">
        <div class="toggleButton">
-               <h4>Development / Production settings</h4>
+               <h4>Debug settings</h4>
        </div>
 
        <div class="toggleData" style="display:none">
@@ -8,9 +8,9 @@
                        <p>
                                In this panel it is possible to select a configuration preset which optimizes multiple settings
                                to be suited best for production or development environments.
-                               The "Production" preset configures your TYPO3 installation for maximum performance
+                               The "Live" preset configures your TYPO3 installation for maximum performance
                                and suppresses debug and error messages, so that nothing is disclosed to website visitors.
-                               The "Development" preset enables most debug and error messages which is helpful during development.
+                               The "Debug" preset enables most debug and error messages which is helpful during development.
                                As a third option it is possible to manually customize each setting for specific needs.
                        </p>
                        <f:for each="{feature.presetsOrderedByPriority}" as="preset">
diff --git a/typo3/sysext/install/Resources/Private/Partials/Action/Tool/Configuration/Context/Debug.html b/typo3/sysext/install/Resources/Private/Partials/Action/Tool/Configuration/Context/Debug.html
new file mode 100644 (file)
index 0000000..0ab8367
--- /dev/null
@@ -0,0 +1,25 @@
+<div class="typo3-message message-ok">
+       <div class="header-container">
+               <div class="message-header">
+                       <input
+                               type="radio"
+                               class="t3-install-tool-configuration-radio"
+                               id="t3-install-tool-configuration-context-debug"
+                               name="install[values][{feature.name}][enable]"
+                               value="{preset.name}"
+                               {f:if(condition:'{preset.isActive}', then:'checked="checked"')}
+                       />
+                       <label
+                               for="t3-install-tool-configuration-context-debug"
+                               class="t3-install-tool-configuration-radio-label"
+                       >
+                               <strong>Debug</strong>
+                               {f:if(condition:'{preset.isActive}', then:' [Active]')}
+                       </label>
+               </div>
+       </div>
+       <div class="message-body>">
+               Enable debug output, deprecation logs, and set logging to info level.
+       </div>
+</div>
+<p></p>
diff --git a/typo3/sysext/install/Resources/Private/Partials/Action/Tool/Configuration/Context/Development.html b/typo3/sysext/install/Resources/Private/Partials/Action/Tool/Configuration/Context/Development.html
deleted file mode 100644 (file)
index 639aeb9..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<div class="typo3-message message-ok">
-       <div class="header-container">
-               <div class="message-header">
-                       <input
-                               type="radio"
-                               class="t3-install-tool-configuration-radio"
-                               id="t3-install-tool-configuration-context-development"
-                               name="install[values][{feature.name}][enable]"
-                               value="{preset.name}"
-                               {f:if(condition:'{preset.isActive}', then:'checked="checked"')}
-                       />
-                       <label
-                               for="t3-install-tool-configuration-context-development"
-                               class="t3-install-tool-configuration-radio-label"
-                       >
-                               <strong>
-                                       Development
-                               </strong>
-                               {f:if(condition:'{preset.isActive}', then:' [Active]')}
-                       </label>
-               </div>
-       </div>
-       <div class="message-body>">
-               Development settings enable debug output, deprecation logs,
-               and set logging to info level.
-       </div>
-</div>
-<p></p>
\ No newline at end of file
diff --git a/typo3/sysext/install/Resources/Private/Partials/Action/Tool/Configuration/Context/Live.html b/typo3/sysext/install/Resources/Private/Partials/Action/Tool/Configuration/Context/Live.html
new file mode 100644 (file)
index 0000000..ec8061d
--- /dev/null
@@ -0,0 +1,25 @@
+<div class="typo3-message message-ok">
+       <div class="header-container">
+               <div class="message-header">
+                       <input
+                               type="radio"
+                               class="t3-install-tool-configuration-radio"
+                               id="t3-install-tool-configuration-context-live"
+                               name="install[values][{feature.name}][enable]"
+                               value="{preset.name}"
+                               {f:if(condition:'{preset.isActive}', then:'checked="checked"')}
+                       />
+                       <label
+                               for="t3-install-tool-configuration-context-live"
+                               class="t3-install-tool-configuration-radio-label"
+                       >
+                               <strong>Live</strong>
+                               {f:if(condition:'{preset.isActive}', then:' [Active]')}
+                       </label>
+               </div>
+       </div>
+       <div class="message-body>">
+               Turn off debug output, deprecation logs, and set logging to warnings and errors only.
+       </div>
+</div>
+<p></p>
diff --git a/typo3/sysext/install/Resources/Private/Partials/Action/Tool/Configuration/Context/Production.html b/typo3/sysext/install/Resources/Private/Partials/Action/Tool/Configuration/Context/Production.html
deleted file mode 100644 (file)
index 63ccb64..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<div class="typo3-message message-ok">
-       <div class="header-container">
-               <div class="message-header">
-                       <input
-                               type="radio"
-                               class="t3-install-tool-configuration-radio"
-                               id="t3-install-tool-configuration-context-production"
-                               name="install[values][{feature.name}][enable]"
-                               value="{preset.name}"
-                               {f:if(condition:'{preset.isActive}', then:'checked="checked"')}
-                       />
-                       <label
-                               for="t3-install-tool-configuration-context-production"
-                               class="t3-install-tool-configuration-radio-label"
-                       >
-                               <strong>
-                                       Production
-                               </strong>
-                               {f:if(condition:'{preset.isActive}', then:' [Active]')}
-                       </label>
-               </div>
-       </div>
-       <div class="message-body>">
-               Production settings turn off debug output, deprecation logs,
-               and set logging to warnings and errors only.
-       </div>
-</div>
-<p></p>
\ No newline at end of file