Made FE group lookups possible when lockToDomain is NULL in DB (e.g. when using Oracle).
authorKarsten Dambekalns <karsten.dambekalns@typo3.org>
Wed, 28 Jun 2006 11:13:43 +0000 (11:13 +0000)
committerKarsten Dambekalns <karsten.dambekalns@typo3.org>
Wed, 28 Jun 2006 11:13:43 +0000 (11:13 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1539 709f56b5-9817-0410-a4d7-c38de5d9e867

t3lib/class.t3lib_userauthgroup.php
typo3/sysext/sv/class.tx_sv_auth.php

index b85439f..d46f277 100755 (executable)
@@ -1169,7 +1169,7 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
                global $TYPO3_CONF_VARS;
 
                        // Fetching records of the groups in $grList (which are not blocked by lockedToDomain either):
-               $lockToDomain_SQL = ' AND (lockToDomain=\'\' OR lockToDomain=\''.t3lib_div::getIndpEnv('HTTP_HOST').'\')';
+               $lockToDomain_SQL = ' AND (lockToDomain=\'\' OR lockToDomain IS NULL OR lockToDomain=\''.t3lib_div::getIndpEnv('HTTP_HOST').'\')';
                $whereSQL = 'deleted=0 AND hidden=0 AND pid=0 AND uid IN ('.$grList.')'.$lockToDomain_SQL;
 
                        // Hook for manipulation of the WHERE sql sentence which controls which BE-groups are included
index abeebb8..691dac7 100644 (file)
@@ -154,7 +154,7 @@ class tx_sv_auth extends tx_sv_authbase     {
 
                                if ($this->writeDevLog)         t3lib_div::devLog('Get usergroups with id: '.$list, 'tx_sv_auth');
 
-                               $lockToDomain_SQL = ' AND (lockToDomain=\'\' OR lockToDomain=\''.$this->authInfo['HTTP_HOST'].'\')';
+                               $lockToDomain_SQL = ' AND (lockToDomain=\'\' OR lockToDomain IS NULL OR lockToDomain=\''.$this->authInfo['HTTP_HOST'].'\')';
                                if (!$this->authInfo['showHiddenRecords'])      $hiddenP = 'AND hidden=0 ';
                                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $this->db_groups['table'], 'deleted=0 '.$hiddenP.' AND uid IN ('.$list.')'.$lockToDomain_SQL);
                                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))      {
@@ -186,7 +186,7 @@ class tx_sv_auth extends tx_sv_authbase     {
        function getSubGroups($grList, $idList='', &$groups)    {
 
                        // Fetching records of the groups in $grList (which are not blocked by lockedToDomain either):
-               $lockToDomain_SQL = ' AND (lockToDomain=\'\' OR lockToDomain=\''.$this->authInfo['HTTP_HOST'].'\')';
+               $lockToDomain_SQL = ' AND (lockToDomain=\'\' OR lockToDomain IS NULL OR lockToDomain=\''.$this->authInfo['HTTP_HOST'].'\')';
                if (!$this->authInfo['showHiddenRecords'])      $hiddenP = 'AND hidden=0 ';
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,subgroup', 'fe_groups', 'deleted=0 '.$hiddenP.' AND uid IN ('.$grList.')'.$lockToDomain_SQL);