[BUGFIX] Allow to show all tables of a given pid in List Record Tasks 96/44096/2
authorMathias Schreiber <mathias.schreiber@wmdb.de>
Fri, 16 Oct 2015 08:25:36 +0000 (10:25 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Fri, 16 Oct 2015 12:28:29 +0000 (14:28 +0200)
The setting "Only show tables" in the List Records task is no mandatory
setting, but the application logic treated it as if it was.
Now you can show all tables on a given pid again.

Resolves: #23909
Releases: master
Change-Id: I8196b670e592579cb1c8262702e2192c01777087
Reviewed-on: http://review.typo3.org/44096
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/sys_action/Classes/ActionTask.php
typo3/sysext/taskcenter/Classes/Controller/TaskModuleController.php

index 031cc41..f1d6638 100644 (file)
@@ -796,7 +796,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface
         $content = '';
         $this->id = (int)$record['t3_listPid'];
         $this->table = $record['t3_tables'];
-        if ($this->id == 0 || $this->table == '') {
+        if ($this->id == 0) {
             $flashMessage = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessage::class, $this->getLanguageService()->getLL('action_notReady', true), $this->getLanguageService()->getLL('action_error'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
             $content .= '<br />' . $flashMessage->render();
             return $content;
index d3aa608..81c1099 100644 (file)
@@ -18,7 +18,6 @@ use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use TYPO3\CMS\Backend\Module\BaseScriptClass;
 use TYPO3\CMS\Backend\Template\Components\ButtonBar;
-use TYPO3\CMS\Backend\Template\DocumentTemplate;
 use TYPO3\CMS\Backend\Template\ModuleTemplate;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Imaging\Icon;
@@ -273,11 +272,11 @@ class TaskModuleController extends BaseScriptClass
      * Render a list of items as a nicely formated definition list including a
      * link, icon, title and description.
      * The keys of a single item are:
-     * - title:                                Title of the item
-     * - link:                                 Link to the task
-     * - icon:                                 Path to the icon or Icon as HTML if it begins with <img
-     * - description:  Description of the task, using htmlspecialchars()
-     * - descriptionHtml:      Description allowing HTML tags which will override the
+     * - title:             Title of the item
+     * - link:              Link to the task
+     * - icon:              Path to the icon or Icon as HTML if it begins with <img
+     * - description:       Description of the task, using htmlspecialchars()
+     * - descriptionHtml:   Description allowing HTML tags which will override the
      * description
      *
      * @param array $items List of items to be displayed in the definition list.
@@ -310,7 +309,7 @@ class TaskModuleController extends BaseScriptClass
                 // Check for custom icon
                 if (!empty($item['icon'])) {
                     if (strpos($item['icon'], '<img ') === false) {
-                        $absIconPath = GeneralUtility::getFileAbsFilename($item['icon']);
+                        $absIconPath = GeneralUtility::getFileAbsFileName($item['icon']);
                         // If the file indeed exists, assemble relative path to it
                         if (file_exists($absIconPath)) {
                             $icon = '../' . str_replace(PATH_site, '', $absIconPath);
@@ -384,7 +383,7 @@ class TaskModuleController extends BaseScriptClass
                     $taskDescriptionHtml = '';
                     // Check for custom icon
                     if (!empty($task['icon'])) {
-                        $icon = GeneralUtility::getFileAbsFilename($task['icon']);
+                        $icon = GeneralUtility::getFileAbsFileName($task['icon']);
                     }
                     if (class_exists($taskClass)) {
                         $taskInstance = GeneralUtility::makeInstance($taskClass, $this);
@@ -477,10 +476,9 @@ class TaskModuleController extends BaseScriptClass
      * Returns HTML code to dislay an url in an iframe at the right side of the taskcenter
      *
      * @param string $url Url to display
-     * @param int $max
      * @return string Code that inserts the iframe (HTML)
      */
-    public function urlInIframe($url, $max = 0)
+    public function urlInIframe($url)
     {
         return '<iframe scrolling="auto"  width="100%" src="' . $url . '" name="list_frame" id="list_frame" frameborder="no"></iframe>';
     }