[BUGFIX] Proper handling of allowedTables='*' in FormEngine 50/36650/2
authorGeorg Ringer <georg.ringer@gmail.com>
Wed, 4 Feb 2015 13:00:36 +0000 (14:00 +0100)
committerMathias Schreiber <mathias.schreiber@wmdb.de>
Thu, 5 Feb 2015 13:43:23 +0000 (14:43 +0100)
The output of FormEngine needs to be changed if all tables are
allowed for a relation.

Change-Id: Ib83c39120a3c20d99982e80b9a40b9f0fb7a4a72
Resolves: #64849
Releases: master
Reviewed-on: http://review.typo3.org/36650
Reviewed-by: Göran Bodenschatz <coding@46halbe.de>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Frederic Gaus <gaus@flagbit.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
typo3/sysext/backend/Classes/Form/FormEngine.php

index 082634c..72f723c 100644 (file)
@@ -2530,8 +2530,12 @@ class FormEngine {
                $allowedTables = '';
                if (is_array($params['allowedTables']) && !empty($params['allowedTables'])) {
                        $allowedTables .= '<div class="help-block">';
-                       foreach ($params['allowedTables'] as $item) {
-                               $allowedTables .= '<a href="#" onClick="' . htmlspecialchars($item['onClick']) . '" class="btn btn-default">' . $item['icon'] . ' ' . $item['name'] . '</a> ';
+                       foreach ($params['allowedTables'] as $key => $item) {
+                               if (is_array($item)) {
+                                       $allowedTables .= '<a href="#" onClick="' . htmlspecialchars($item['onClick']) . '" class="btn btn-default">' . $item['icon'] . ' ' . htmlspecialchars($item['name']) . '</a> ';
+                               } elseif($key === 'name') {
+                                       $allowedTables .= '<span>' . htmlspecialchars($item) . '</span> ';
+                               }
                        }
                        $allowedTables .= '</div>';
                }