[FEATURE] Option to disable exports (csv / t3d) in dblist 80/18780/5
authorKai Vogel <kai.vogel@speedprogs.de>
Thu, 7 Mar 2013 15:57:21 +0000 (16:57 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 25 Mar 2013 19:58:58 +0000 (20:58 +0100)
This patch adds an TSConfig option to disable csv and t3d (impexp)
export in single table view in list module. This option is for
example important to disable batch download of sensitive data via
csv or t3d exports.

Resolves: #46110
Releases: 6.1
Change-Id: I8471e2b55563cf157f3b8aee08d882cab487d55d
Reviewed-on: https://review.typo3.org/18780
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php

index 095611d..a0e1e6a 100644 (file)
@@ -213,7 +213,9 @@ class DatabaseRecordList extends \TYPO3\CMS\Recordlist\RecordList\AbstractDataba
                        }
                        // Cache
                        $buttons['cache'] = '<a href="' . htmlspecialchars(($this->listURL() . '&clear_cache=1')) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.clear_cache', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-system-cache-clear') . '</a>';
-                       if ($this->table) {
+                       if ($this->table && (!isset($GLOBALS['SOBE']->modTSconfig['properties']['noExportRecordsLinks'])
+                               || (isset($GLOBALS['SOBE']->modTSconfig['properties']['noExportRecordsLinks']) && !$GLOBALS['SOBE']->modTSconfig['properties']['noExportRecordsLinks']))
+                       ) {
                                // CSV
                                $buttons['csv'] = '<a href="' . htmlspecialchars(($this->listURL() . '&csv=1')) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.csv', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('mimetypes-text-csv') . '</a>';
                                // Export