Merged new PageTree (version for TYPO3 4.5 Beta 3) - added new classes
authorsteffenk <steffenk@735d13b6-9817-0410-8766-e36946ffe9aa>
Wed, 22 Dec 2010 01:28:20 +0000 (01:28 +0000)
committersteffenk <steffenk@735d13b6-9817-0410-8766-e36946ffe9aa>
Wed, 22 Dec 2010 01:28:20 +0000 (01:28 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/be_acl/trunk@41368 735d13b6-9817-0410-8766-e36946ffe9aa

ext_conf_template.txt
ext_emconf.php
res/class.tx_beacl_userauthgroup.php

index c1f34e2..4369c85 100644 (file)
@@ -2,4 +2,7 @@
 disableOldPermissionSystem = 0\r
 \r
 # cat=basic/enable; type=boolean; label=enable selector for users/groups - VERY useful if there are many ACLs\r
-enableFilterSelector = 1
\ No newline at end of file
+enableFilterSelector = 1\r
+\r
+# cat=basic/enable; type=string; label=define tables where changes lead to automatic ACL cache clear (comma-seperated list)\r
+tablesForCacheClear = pages
\ No newline at end of file
index a573127..df907c8 100644 (file)
@@ -3,7 +3,7 @@
 ########################################################################
 # Extension Manager/Repository config file for ext "be_acl".
 #
-# Auto generated 30-11-2010 10:58
+# Auto generated 02-12-2010 10:59
 #
 # Manual updates:
 # Only the data in the array - everything else is removed by next
@@ -15,7 +15,7 @@ $EM_CONF[$_EXTKEY] = array(
        'description' => 'Backend Access Control Lists',
        'category' => 'be',
        'shy' => 0,
-       'version' => '1.4.2',
+       'version' => '1.4.3',
        'dependencies' => 'cms,lang',
        'conflicts' => '',
        'priority' => '',
@@ -44,7 +44,7 @@ $EM_CONF[$_EXTKEY] = array(
                'suggests' => array(
                ),
        ),
-       '_md5_values_when_last_written' => 'a:16:{s:16:"ext_autoload.php";s:4:"001a";s:21:"ext_conf_template.txt";s:4:"23d5";s:12:"ext_icon.gif";s:4:"1bea";s:17:"ext_localconf.php";s:4:"5dcf";s:14:"ext_tables.php";s:4:"aceb";s:14:"ext_tables.sql";s:4:"1076";s:21:"icon_tx_beacl_acl.gif";s:4:"1bea";s:16:"locallang_db.php";s:4:"0f61";s:7:"tca.php";s:4:"01cc";s:14:"doc/manual.sxw";s:4:"4db3";s:19:"doc/wizard_form.dat";s:4:"e68f";s:20:"doc/wizard_form.html";s:4:"4e9b";s:10:"res/acl.js";s:4:"80ec";s:36:"res/class.tx_beacl_userauthgroup.php";s:4:"cd63";s:38:"res/class.ux_sc_mod_web_perm_index.php";s:4:"4bb6";s:22:"res/locallang_perm.php";s:4:"9a96";}',
+       '_md5_values_when_last_written' => 'a:16:{s:16:"ext_autoload.php";s:4:"001a";s:21:"ext_conf_template.txt";s:4:"ed55";s:12:"ext_icon.gif";s:4:"1bea";s:17:"ext_localconf.php";s:4:"5dcf";s:14:"ext_tables.php";s:4:"aceb";s:14:"ext_tables.sql";s:4:"1076";s:21:"icon_tx_beacl_acl.gif";s:4:"1bea";s:16:"locallang_db.php";s:4:"0f61";s:7:"tca.php";s:4:"01cc";s:14:"doc/manual.sxw";s:4:"4db3";s:19:"doc/wizard_form.dat";s:4:"e68f";s:20:"doc/wizard_form.html";s:4:"4e9b";s:10:"res/acl.js";s:4:"80ec";s:36:"res/class.tx_beacl_userauthgroup.php";s:4:"e954";s:38:"res/class.ux_sc_mod_web_perm_index.php";s:4:"4bb6";s:22:"res/locallang_perm.php";s:4:"9a96";}',
        'suggests' => array(
        ),
 );
index 7666af7..192fda9 100644 (file)
@@ -43,7 +43,7 @@ class tx_beacl_userAuthGroup {
        public function calcPerms($params, $that) {
                $row = $params['row'];
 
-               $beAclConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['be_acl']);
+               $beAclConfig = $this->getConfig();
                if (!$beAclConfig['disableOldPermissionSystem']) {
                        $out = $params['outputPermissions'];
                } else {
@@ -248,7 +248,9 @@ class tx_beacl_userAuthGroup {
         * @return void
         */
        public function processDatamap_afterDatabaseOperations($status, $table, $id, &$fieldArray, &$pObj) {
-               if ($table == 'pages') {
+               $beAclConfig = $this->getConfig();
+               $tables = t3lib_div::trimExplode(',', $beAclConfig['tablesForCacheClear'], TRUE);
+               if (in_array($table, $tables)) {
                        $this->clearBeaAclCache();
                }
        }
@@ -264,9 +266,11 @@ class tx_beacl_userAuthGroup {
         * @return void
         */
        public function processCmdmap_postProcess ($command, $table ,$id, $value, &$pObj) {
-                       if ($command == 'delete' && $table == 'pages') {
-                               $this->clearBeaAclCache();
-                       }
+               $beAclConfig = $this->getConfig();
+               $tables = t3lib_div::trimExplode(',', $beAclConfig['tablesForCacheClear'], TRUE);
+               if ($command == 'delete' && in_array($table, $tables)) {
+                       $this->clearBeaAclCache();
+               }
        }
 
        /**
@@ -284,6 +288,14 @@ class tx_beacl_userAuthGroup {
                        }
                        closedir($handle);
        }
+
+       /**
+        * Gets the ext config
+        * @return array
+        */
+       protected function getConfig() {
+               return unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['be_acl']);
+       }
 }
 
 ?>
\ No newline at end of file