Minor cleanup, non-functional
authorMichael Stucki <michael.stucki@typo3.org>
Fri, 16 Feb 2007 11:33:32 +0000 (11:33 +0000)
committerMichael Stucki <michael.stucki@typo3.org>
Fri, 16 Feb 2007 11:33:32 +0000 (11:33 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2043 709f56b5-9817-0410-a4d7-c38de5d9e867

t3lib/class.t3lib_tcemain.php
t3lib/class.t3lib_userauth.php
t3lib/class.t3lib_userauthgroup.php
typo3/init.php
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/cms/tslib/class.tslib_feuserauth.php

index 25bd772..81f9848 100755 (executable)
@@ -332,7 +332,7 @@ class t3lib_TCEmain {
        var $remapStack = array();                                      // array used for remapping uids and values at the end of process_datamap
        var $updateRefIndexStack = array();                     // array used for additional calls to $this->updateRefIndex
        var $callFromImpExp = false;                            // tells, that this TCEmain was called from tx_impext - this variable is set by tx_impexp
-       
+
                // Various
        var $fileFunc;                                                          // For "singleTon" file-manipulation object
        var $checkValue_currentRecord=array();          // Set to "currentRecord" during checking of values.
@@ -941,7 +941,7 @@ class t3lib_TCEmain {
                        }
                } else {
                        $currentRecord = $checkValueRecord = $this->recordInfo($table,$id,'*'); // We must use the current values as basis for this!
-                       
+
                        t3lib_BEfunc::fixVersioningPid($table,$currentRecord);  // This is done to make the pid positive for offline versions; Necessary to have diff-view for pages_language_overlay in workspaces.
 
                                // Get original language record if available:
@@ -1453,7 +1453,7 @@ class t3lib_TCEmain       {
        function checkValue_group_select_file($valueArray,$tcaFieldConf,$curValue,$uploadedFileArray,$status,$table,$id,$recFID)        {
 
                if (!$this->bypassFileHandling) {       // If filehandling should NOT be bypassed, do processing:
-                       
+
                                // If any files are uploaded, add them to value array
                        if (is_array($uploadedFileArray) &&
                                $uploadedFileArray['name'] &&
@@ -1589,7 +1589,7 @@ class t3lib_TCEmain       {
                                        }
                                }
                        }
-                       
+
                                // If MM relations for the files, we will set the relations as MM records and change the valuearray to contain a single entry with a count of the number of files!
                        if ($tcaFieldConf['MM'])        {
                                $dbAnalysis = t3lib_div::makeInstance('t3lib_loadDBGroup');
@@ -3190,7 +3190,7 @@ class t3lib_TCEmain       {
                                                                                $pass = !t3lib_BEfunc::getRecordsByField($table,$TCA[$table]['ctrl']['transOrigPointerField'],$uid,'AND pid='.intval($row['pid']).' AND '.$TCA[$table]['ctrl']['languageField'].'='.intval($langRec['uid']));
                                                                                $Ttable = $table;
                                                                        }
-                                                                       
+
                                                                        if ($pass)      {
 
                                                                                        // Initialize:
@@ -3221,13 +3221,13 @@ class t3lib_TCEmain     {
                                                                                                $excludeFields[] = $fN;
                                                                                        }
                                                                                }
-                                                                               
+
                                                                                if ($Ttable === $table) {
-                                                                               
+
                                                                                                // Execute the copy:
                                                                                        $this->copyRecord($table,$uid,-$uid,1,$overrideValues,implode(',',$excludeFields));
                                                                                } else {
-                                                                                       
+
                                                                                                // Create new record:
                                                                                        $copyTCE = t3lib_div::makeInstance('t3lib_TCEmain');
                                                                                        $copyTCE->stripslashes_values = 0;
@@ -3335,7 +3335,7 @@ class t3lib_TCEmain       {
                        $this->deleteRecord($table, $uid, $noRecordCheck, $forceHardDelete);
                }
        }
-       
+
        /**
         * Delete versions for element from any table
         *
@@ -3441,7 +3441,7 @@ class t3lib_TCEmain       {
                                                        $this->log($table,$uid,3,0,100,'Delete: Zero rows in result when trying to read filenames from record which should be deleted');
                                                }
                                        }
-                                               
+
                                                // Delete the hard way...:
                                        $GLOBALS['TYPO3_DB']->exec_DELETEquery($table, 'uid='.intval($uid));
                                }
@@ -3485,16 +3485,16 @@ class t3lib_TCEmain     {
                        } else $this->log($table,$uid,3,0,1,'Attempt to delete record without delete-permissions');
                }
        }
-       
+
        /**
         * Call back function for deleting file relations for flexform fields in records which are being completely deleted.
         */
        function deleteRecord_flexFormCallBack($dsArr, $dataValue, $PA, $structurePath, &$pObj) {
-               
+
                        // Use reference index object to find files in fields:
                $refIndexObj = t3lib_div::makeInstance('t3lib_refindex');
                $files = $refIndexObj->getRelations_procFiles($dataValue, $dsArr['TCEforms']['config'], $PA['uid']);
-               
+
                        // Traverse files and delete them:
                if (is_array($files))   {
                        foreach($files as $dat) {
@@ -4418,7 +4418,7 @@ $this->log($table,$id,6,0,0,'Stage raised...',30,array('comment'=>$comment,'stag
         */
        function doesRecordExist($table,$id,$perms)     {
                global $TCA;
-               
+
                if ($this->bypassAccessCheckForRecords) {
                        return is_array(t3lib_BEfunc::getRecordRaw($table,'uid='.intval($id),'uid'));
                }
index e66e468..acb662b 100755 (executable)
@@ -513,7 +513,7 @@ class t3lib_userAuth {
 
                                if ($this->writeDevLog && $serviceChain)        t3lib_div::devLog($subType.' auth services called: '.$serviceChain, 't3lib_userAuth');
 
-                               if($authenticated) {
+                               if ($authenticated) {
                                                // leave foreach() because a user is authenticated
                                        break;
                                }
@@ -1071,12 +1071,12 @@ class t3lib_userAuth {
 
                                if ((string)$loginData['uident'] === (string)md5($user[$this->username_column].':'.$user[$this->userident_column].':'.$loginData['chalvalue'])) {
                                        $OK = TRUE;
-                               };
+                               }
                        break;
                        default:        // normal
                                if ((string)$loginData['uident'] === (string)$user[$this->userident_column])    {
                                        $OK = TRUE;
-                               };
+                               }
                        break;
                }
 
index 28760e5..86d25fa 100755 (executable)
@@ -250,13 +250,13 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
        function isInWebMount($id,$readPerms='',$exitOnError=0) {
                if (!$GLOBALS['TYPO3_CONF_VARS']['BE']['lockBeUserToDBmounts'] || $this->isAdmin())     return 1;
                $id = intval($id);
-               
+
                        // Check if input id is an offline version page in which case we will map id to the online version:
                $checkRec = t3lib_beFUnc::getRecord('pages',$id,'pid,t3ver_oid');
                if ($checkRec['pid']==-1)       {
                        $id = intval($checkRec['t3ver_oid']);
                }
-               
+
                if (!$readPerms)        $readPerms = $this->getPagePermsClause(1);
                if ($id>0)      {
                        $wM = $this->returnWebmounts();
@@ -320,14 +320,14 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
 
        /**
         * Returns a WHERE-clause for the pages-table where user permissions according to input argument, $perms, is validated.
-        * $perms is the 'mask' used to select. Fx. if $perms is 1 then you'll get all pages that a user can actually see!
+        * $perms is the "mask" used to select. Fx. if $perms is 1 then you'll get all pages that a user can actually see!
         *              2^0 = show (1)
         *              2^1 = edit (2)
         *              2^2 = delete (4)
         *              2^3 = new (8)
         * If the user is 'admin' " 1=1" is returned (no effect)
         * If the user is not set at all (->user is not an array), then " 1=0" is returned (will cause no selection results at all)
-        * The 95% use of this function is "->getPagePermsClause(1)" which will return WHERE clauses for *selecting* pages in backend listings - in other words will this check read permissions.
+        * The 95% use of this function is "->getPagePermsClause(1)" which will return WHERE clauses for *selecting* pages in backend listings - in other words this will check read permissions.
         *
         * @param       integer         Permission mask to use, see function description
         * @return      string          Part of where clause. Prefix " AND " to this.
@@ -343,7 +343,9 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
                        $str= ' ('.
                                '(pages.perms_everybody & '.$perms.' = '.$perms.')'.    // Everybody
                                'OR(pages.perms_userid = '.$this->user['uid'].' AND pages.perms_user & '.$perms.' = '.$perms.')';       // User
-                       if ($this->groupList){$str.='OR(pages.perms_groupid in ('.$this->groupList.') AND pages.perms_group & '.$perms.' = '.$perms.')';}       // Group (if any is set)
+                       if ($this->groupList)   {
+                               $str.= 'OR(pages.perms_groupid in ('.$this->groupList.') AND pages.perms_group & '.$perms.' = '.$perms.')';     // Group (if any is set)
+                       }
                        $str.=')';
 
                        // ****************
index 60ef219..65a0403 100755 (executable)
@@ -273,11 +273,11 @@ if (defined('TYPO3_enterInstallScript') && TYPO3_enterInstallScript)      {
 // *************************
 // Connect to the database
 // *************************
-if ($GLOBALS['TYPO3_DB']->sql_pconnect(TYPO3_db_host, TYPO3_db_username, TYPO3_db_password))   {
+if ($TYPO3_DB->sql_pconnect(TYPO3_db_host, TYPO3_db_username, TYPO3_db_password))      {
        if (!TYPO3_db)  {
                t3lib_BEfunc::typo3PrintError ('No database selected','Database Error');
                exit;
-       } elseif (!$GLOBALS['TYPO3_DB']->sql_select_db(TYPO3_db))       {
+       } elseif (!$TYPO3_DB->sql_select_db(TYPO3_db))  {
                t3lib_BEfunc::typo3PrintError ('Cannot connect to the current database, "'.TYPO3_db.'"','Database Error');
                exit;
        }
index 84b4f11..c5e04f0 100755 (executable)
@@ -5335,10 +5335,9 @@ class tslib_cObj {
        /**
         * Based on the input "TypoLink" TypoScript configuration this will return the generated URL
         *
-        *       ' @see typoLink()
-        *
         * @param       array           TypoScript properties for "typolink"
         * @return      string          The URL of the link-tag that typolink() would by itself return
+        * @see typoLink()
         */
        function typoLink_URL($conf)    {
                $this->typolink('|',$conf);
index 8a9636b..b192ddd 100755 (executable)
                                $c = count($temp);
                                for ($i=0; $i<$c; $i++) {
                                        if ($temp[$i]['uid'])   {
-                                               $p = $this->csConvObj->crop('utf-8',$this->csConvObj->utf8_encode($temp[$i]['title'],$this->renderCharset),$len,"\xE2\x80\xA6");        // U+2026; HORIZONTAL ELLIPSIS 
+                                               $p = $this->csConvObj->crop('utf-8',$this->csConvObj->utf8_encode($temp[$i]['title'],$this->renderCharset),$len,"\xE2\x80\xA6");        // U+2026; HORIZONTAL ELLIPSIS
                                                $path .= '/' . rawurlencode($p);
                                        }
                                }
index e37b6aa..faacd39 100644 (file)
@@ -149,7 +149,7 @@ class tslib_feUserAuth extends t3lib_userAuth {
 
                parent::start();
        }
+
        /**
         * Returns a new session record for the current user for insertion into the DB.
         *