Added feature #3687: Disable versioning and moreoptions-menuitem via contextMenu...
authorJeff Segars <jsegars@alumni.rice.edu>
Sun, 14 Sep 2008 19:51:32 +0000 (19:51 +0000)
committerJeff Segars <jsegars@alumni.rice.edu>
Sun, 14 Sep 2008 19:51:32 +0000 (19:51 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4113 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/extra_page_cm_options/class.tx_extrapagecmoptions.php
typo3/sysext/version/class.tx_version_cm1.php

index b087cae..fa0a7b4 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-09-14  Jeff Segars  <jeff@webempoweredchurch.org>
+
+       * Added feature #3687: Disable "versioning" and "moreoptions"-menuitem via contextMenu.[key].disableItems in User TSconfig (thanks to Susanne Moog)
+
 2008-09-14  Dmitry Dulepov  <dmitry@typo3.org>
 
        * Reverted change from 12.09.2008 (bug #8985). I mistakenly assumed that another core developer gave +1 to it. I had two non-core +1s only.
index be8acab..b966d5b 100755 (executable)
@@ -83,8 +83,8 @@ class tx_extrapagecmoptions {
                $subname = t3lib_div::_GP('subname');
 
                        // Detecting menu level
-               if (!$backRef->cmLevel) {       // LEVEL: Primary menu.
-
+               // LEVEL: Primary menu.
+               if (!in_array('moreoptions', $backRef->disabledItems) && !$backRef->cmLevel) {
                                // Creating menu items here:
                        if ($backRef->editOK)   {
                                $LL = $this->includeLL();
index 10daace..f21f5b6 100755 (executable)
@@ -69,7 +69,9 @@ class tx_version_cm1 {
                if (!$backRef->cmLevel && $uid>0 && $BE_USER->check('modules','web_txversionM1'))       {
 
                                // Returns directly, because the clicked item was not from the pages table
-                       if (!$TCA[$table] || !$TCA[$table]['ctrl']['versioningWS'])     return $menuItems;
+                       if (in_array('versioning', $backRef->disabledItems) || !$TCA[$table] || !$TCA[$table]['ctrl']['versioningWS']) {
+                               return $menuItems;
+                       }
 
                                // Adds the regular item
                        $LL = $this->includeLL();