[BUGFIX] Do not access clip object when clipboard disabled 72/46272/2
authorChristian Weiske <weiske@mogic.com>
Thu, 28 Jan 2016 07:10:52 +0000 (08:10 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 29 Jan 2016 20:20:41 +0000 (21:20 +0100)
Resolves: #72978
Releases: master, 7.6

Change-Id: I19b17127081f59ff50301355f4459be290ce0603
Reviewed-on: https://review.typo3.org/46272
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php

index 71638c0..d2bb592 100644 (file)
@@ -404,7 +404,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList
                 $buttonBar->addButton($editButton, ButtonBar::BUTTON_POSITION_LEFT, 20);
             }
             // Paste
-            if (($localCalcPerms & Permission::PAGE_NEW || $localCalcPerms & Permission::CONTENT_EDIT) && $this->editLockPermissions()) {
+            if ($this->showClipboard && ($localCalcPerms & Permission::PAGE_NEW || $localCalcPerms & Permission::CONTENT_EDIT) && $this->editLockPermissions()) {
                 $elFromTable = $this->clipObj->elFromTable('');
                 if (!empty($elFromTable)) {
                     $onClick = 'return ' . $this->clipObj->confirmMsg('pages', $this->pageRow, 'into', $elFromTable);