[BUGFIX] Re-add dbal extension manager message class 49/23949/2
authorAlexander Stehlik <alexander.stehlik@googlemail.com>
Sat, 21 Sep 2013 13:09:04 +0000 (15:09 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 26 Sep 2013 12:42:10 +0000 (14:42 +0200)
The MessageDisplay class that is used to display a hint in the extension
settings of the dbal extension was removed with commit
2e3c9d5e25e5beadafebca949de3e05eeb6f120a.

This commit re-adds the class to prevent a PHP error.

Resolves: #52167
Releases: 6.2
Change-Id: I1fa8749ffb93eab45646948ff336bf3d331aa92c
Reviewed-on: https://review.typo3.org/23949
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/dbal/Classes/ExtensionManager/MessageDisplay.php [new file with mode: 0644]

diff --git a/typo3/sysext/dbal/Classes/ExtensionManager/MessageDisplay.php b/typo3/sysext/dbal/Classes/ExtensionManager/MessageDisplay.php
new file mode 100644 (file)
index 0000000..2f7602c
--- /dev/null
@@ -0,0 +1,59 @@
+<?php
+namespace TYPO3\CMS\Dbal\ExtensionManager;
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2009-2013 Xavier Perseguers <xavier@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+/**
+ * Class that renders fields for the Extension Manager configuration.
+ *
+ * @author Xavier Perseguers <xavier@typo3.org>
+ */
+class MessageDisplay {
+
+       /**
+        * Renders a message for EM.
+        *
+        * @return string
+        */
+       public function displayMessage() {
+               $out = '
+                       <div>
+                               <div class="typo3-message message-information">
+                                       <div class="message-header">PostgreSQL</div>
+                                       <div class="message-body">
+                                               If you use a PostgreSQL database, make sure to run SQL scripts located in<br />
+                                               <tt>' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('dbal') . 'res/postgresql/</tt><br />
+                                               to ensure best compatibility with TYPO3.
+                                       </div>
+                               </div>
+                       </div>
+               ';
+               return $out;
+       }
+
+}
+
+?>
\ No newline at end of file