Fixed bug #14675: Replace calls to t3lib_BEfunc:: within t3lib_BEfunc to self:: due...
authorSteffen Kamper <info@sk-typo3.de>
Wed, 9 Jun 2010 17:31:02 +0000 (17:31 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Wed, 9 Jun 2010 17:31:02 +0000 (17:31 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7852 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_befunc.php

index bee1dc2..d126152 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2010-06-08  Steffen Kamper  <info@sk-typo3.de>
 
+       * Fixed bug #14675: Replace calls to t3lib_BEfunc:: within t3lib_BEfunc to self:: due to performance reasons (Thanks to Senastian Michaelsen)
        * Follow-up to bug #13611: Replace calls to t3lib_div:: within t3lib_div to self:: du to performance reasons (Thanks to Senastian Michaelsen)
        * Fixed bug #14555: early thrown debug messages are not visible (BE only) (Thanks to Stefan Galinski)
        * Fixed bug #14628: Open t3lib_db for own instance
index 452fb2b..cd458fa 100644 (file)
@@ -231,7 +231,7 @@ final class t3lib_BEfunc {
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
                                $fields,
                                $table,
-                               'uid='.intval($uid).($useDeleteClause ? t3lib_BEfunc::deleteClause($table) : '').$where
+                               'uid=' . intval($uid) . ($useDeleteClause ? self::deleteClause($table) : '') . $where
                        );
                        $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
                        $GLOBALS['TYPO3_DB']->sql_free_result($res);
@@ -254,8 +254,8 @@ final class t3lib_BEfunc {
        public static function getRecordWSOL($table, $uid, $fields = '*', $where = '', $useDeleteClause = true) {
                if ($fields !== '*') {
                        $internalFields = t3lib_div::uniqueList($fields.',uid,pid'.($table == 'pages' ? ',t3ver_swapmode' : ''));
-                       $row = t3lib_BEfunc::getRecord($table, $uid, $internalFields, $where, $useDeleteClause);
-                       t3lib_BEfunc::workspaceOL($table, $row);
+                       $row = self::getRecord($table, $uid, $internalFields, $where, $useDeleteClause);
+                       self::workspaceOL($table, $row);
 
                        if (is_array ($row)) {
                                foreach (array_keys($row) as $key) {
@@ -265,8 +265,8 @@ final class t3lib_BEfunc {
                                }
                        }
                } else {
-                       $row = t3lib_BEfunc::getRecord($table, $uid, $fields, $where);
-                       t3lib_BEfunc::workspaceOL($table, $row);
+                       $row = self::getRecord($table, $uid, $fields, $where);
+                       self::workspaceOL($table, $row);
                }
                return $row;
        }
@@ -316,8 +316,8 @@ final class t3lib_BEfunc {
                                                '*',
                                                $theTable,
                                                $theField.'='.$GLOBALS['TYPO3_DB']->fullQuoteStr($theValue, $theTable).
-                                                       ($useDeleteClause ? t3lib_BEfunc::deleteClause($theTable).' ' : '').
-                                                       t3lib_BEfunc::versioningPlaceholderClause($theTable).' '.
+                                                       ($useDeleteClause ? self::deleteClause($theTable).' ' : '').
+                                                       self::versioningPlaceholderClause($theTable) . ' ' .
                                                        $whereClause,   // whereClauseMightContainGroupOrderBy
                                                $groupBy,
                                                $orderBy,
@@ -457,7 +457,7 @@ final class t3lib_BEfunc {
                $recordLocalization = false;
                if (self::isTableLocalizable($table)) {
                        $tcaCtrl = $GLOBALS['TCA'][$table]['ctrl'];
-                       $recordLocalization = t3lib_BEfunc::getRecordsByField(
+                       $recordLocalization = self::getRecordsByField(
                                $table,
                                $tcaCtrl['transOrigPointerField'],
                                $uid,
@@ -648,17 +648,17 @@ final class t3lib_BEfunc {
                                'pid,uid,title,TSconfig,is_siteroot,storage_pid,t3ver_oid,t3ver_wsid,t3ver_state,t3ver_swapmode,t3ver_stage',
                                'pages',
                                'uid=' . intval($uid) . ' ' .
-                                       t3lib_BEfunc::deleteClause('pages') . ' ' .
+                                       self::deleteClause('pages') . ' ' .
                                        $clause         // whereClauseMightContainGroupOrderBy
                        );
 
                        $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
                        if ($row) {
                                if ($workspaceOL) {
-                                       t3lib_BEfunc::workspaceOL('pages', $row);
+                                       self::workspaceOL('pages', $row);
                                }
                                if (is_array($row)) {
-                                       t3lib_BEfunc::fixVersioningPid('pages', $row);
+                                       self::fixVersioningPid('pages', $row);
                                        $getPageForRootline_cache[$ident] = $row;
                                }
                        }
@@ -685,7 +685,7 @@ final class t3lib_BEfunc {
                }
 
                        // Get rootline:
-               $rL = t3lib_BEfunc::BEgetRootLine($pid);
+               $rL = self::BEgetRootLine($pid);
 
                        // First, find out what mount index to use (if more than one DB mount exists):
                $mountIndex = 0;
@@ -866,7 +866,7 @@ final class t3lib_BEfunc {
                $sysLanguages[] = array('Default language', 0);
 
                        // Traverse languages
-               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,title,flag', 'sys_language', 'pid=0'.t3lib_BEfunc::deleteClause('sys_language'));
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,title,flag', 'sys_language', 'pid=0' . self::deleteClause('sys_language'));
                while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                        $sysLanguages[] = array($row['title'].' ['.$row['uid'].']', $row['uid'], ($row['flag'] ? 'flags/'.$row['flag'] : ''));
                }
@@ -936,12 +936,12 @@ final class t3lib_BEfunc {
                                        return $pageinfo;
                                }
                        } else {
-                               $pageinfo = t3lib_BEfunc::getRecord('pages', $id, '*', ($perms_clause ? ' AND '.$perms_clause : ''));
+                               $pageinfo = self::getRecord('pages', $id, '*', ($perms_clause ? ' AND ' . $perms_clause : ''));
                                if ($pageinfo['uid'] && $GLOBALS['BE_USER']->isInWebMount($id, $perms_clause)) {
-                                       t3lib_BEfunc::workspaceOL('pages', $pageinfo);
+                                       self::workspaceOL('pages', $pageinfo);
                                        if (is_array($pageinfo)) {
-                                               t3lib_BEfunc::fixVersioningPid('pages', $pageinfo);
-                                               list($pageinfo['_thePath'], $pageinfo['_thePathFull']) = t3lib_BEfunc::getRecordPath(intval($pageinfo['uid']), $perms_clause, 15, 1000);
+                                               self::fixVersioningPid('pages', $pageinfo);
+                                               list($pageinfo['_thePath'], $pageinfo['_thePathFull']) = self::getRecordPath(intval($pageinfo['uid']), $perms_clause, 15, 1000);
                                                return $pageinfo;
                                        }
                                }
@@ -966,7 +966,7 @@ final class t3lib_BEfunc {
                if ($TCA[$table])       {
 
                                // Get type value:
-                       $fieldValue = t3lib_BEfunc::getTCAtypeValue($table, $rec);
+                       $fieldValue = self::getTCAtypeValue($table, $rec);
 
                                // Get typesConf
                        $typesConf = $TCA[$table]['types'][$fieldValue];
@@ -979,7 +979,7 @@ final class t3lib_BEfunc {
                        foreach($fieldList as $k => $v) {
                                list($pFieldName, $pAltTitle, $pPalette, $pSpec) = t3lib_div::trimExplode(';', $v);
                                $defaultExtras = is_array($TCA[$table]['columns'][$pFieldName]) ? $TCA[$table]['columns'][$pFieldName]['defaultExtras'] : '';
-                               $specConfParts = t3lib_BEfunc::getSpecConfParts($pSpec, $defaultExtras);
+                               $specConfParts = self::getSpecConfParts($pSpec, $defaultExtras);
 
                                $fieldList[$k] = array(
                                        'field' => $pFieldName,
@@ -1145,10 +1145,10 @@ final class t3lib_BEfunc {
 
                                // Searching recursively back if 'ds_pointerField_searchParent' is defined (typ. a page rootline, or maybe a tree-table):
                        if ($ds_searchParentField && !$srcPointer) {
-                               $rr = t3lib_BEfunc::getRecord($table, $row['uid'], 'uid,'.$ds_searchParentField);       // Get the "pid" field - we cannot know that it is in the input record! ###NOTE_A###
+                               $rr = self::getRecord($table, $row['uid'], 'uid,' . $ds_searchParentField);     // Get the "pid" field - we cannot know that it is in the input record! ###NOTE_A###
                                if ($WSOL) {
-                                       t3lib_BEfunc::workspaceOL($table, $rr);
-                                       t3lib_BEfunc::fixVersioningPid($table, $rr, TRUE);      // Added "TRUE" 23/03/06 before 4.0. (Also to similar call below!).  Reason: When t3lib_refindex is scanning the system in Live workspace all Pages with FlexForms will not find their inherited datastructure. Thus all references from workspaces are removed! Setting TRUE means that versioning PID doesn't check workspace of the record. I can't see that this should give problems anywhere. See more information inside t3lib_refindex!
+                                       self::workspaceOL($table, $rr);
+                                       self::fixVersioningPid($table, $rr, TRUE);      // Added "TRUE" 23/03/06 before 4.0. (Also to similar call below!).  Reason: When t3lib_refindex is scanning the system in Live workspace all Pages with FlexForms will not find their inherited datastructure. Thus all references from workspaces are removed! Setting TRUE means that versioning PID doesn't check workspace of the record. I can't see that this should give problems anywhere. See more information inside t3lib_refindex!
                                }
                                $uidAcc = array();      // Used to avoid looping, if any should happen.
                                $subFieldPointer = $conf['ds_pointerField_searchParent_subField'];
@@ -1157,7 +1157,7 @@ final class t3lib_BEfunc {
                                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
                                                                        'uid,'.$ds_pointerField.','.$ds_searchParentField.($subFieldPointer?','.$subFieldPointer:''),
                                                                        $table,
-                                                                       'uid='.intval($newRecordPidValue ? $newRecordPidValue : $rr[$ds_searchParentField]).t3lib_BEfunc::deleteClause($table)  ###NOTE_A###
+                                                                       'uid=' . intval($newRecordPidValue ? $newRecordPidValue : $rr[$ds_searchParentField]) . self::deleteClause($table)      ###NOTE_A###
                                                                );
                                        $newRecordPidValue = 0;
                                        $rr = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
@@ -1168,8 +1168,8 @@ final class t3lib_BEfunc {
                                        $uidAcc[$rr['uid']] = 1;
 
                                        if ($WSOL) {
-                                               t3lib_BEfunc::workspaceOL($table, $rr);
-                                               t3lib_BEfunc::fixVersioningPid($table, $rr, TRUE);
+                                               self::workspaceOL($table, $rr);
+                                               self::fixVersioningPid($table, $rr, TRUE);
                                        }
                                        $srcPointer = ($subFieldPointer && $rr[$subFieldPointer]) ? $rr[$subFieldPointer] : $rr[$ds_pointerField];
                                }
@@ -1180,9 +1180,9 @@ final class t3lib_BEfunc {
                                if (t3lib_div::testInt($srcPointer))    {       // If integer, then its a record we will look up:
                                        list($tName, $fName) = explode(':', $ds_tableField, 2);
                                        if ($tName && $fName && is_array($GLOBALS['TCA'][$tName])) {
-                                               $dataStructRec = t3lib_BEfunc::getRecord($tName, $srcPointer);
+                                               $dataStructRec = self::getRecord($tName, $srcPointer);
                                                if ($WSOL) {
-                                                       t3lib_BEfunc::workspaceOL($tName, $dataStructRec);
+                                                       self::workspaceOL($tName, $dataStructRec);
                                                }
                                                $dataStructArray = t3lib_div::xml2array($dataStructRec[$fName]);
                                        } else $dataStructArray = 'No tablename ('.$tName.') or fieldname ('.$fName.') was found an valid!';
@@ -1321,7 +1321,7 @@ final class t3lib_BEfunc {
        public static function getPagesTSconfig($id, $rootLine = '', $returnPartArray = 0) {
                $id = intval($id);
                if (!is_array($rootLine)) {
-                       $rootLine = t3lib_BEfunc::BEgetRootLine($id, '', TRUE);
+                       $rootLine = self::BEgetRootLine($id, '', TRUE);
                }
                ksort($rootLine);       // Order correctly
                $TSdataArray = array();
@@ -1345,7 +1345,7 @@ final class t3lib_BEfunc {
                        }
                } else {
                        $hash = md5('pageTS:' . $pageTS);
-                       $cachedContent = t3lib_BEfunc::getHash($hash);
+                       $cachedContent = self::getHash($hash);
                        $TSconfig = array();
                        if (isset($cachedContent)) {
                                $TSconfig = unserialize($cachedContent);
@@ -1353,7 +1353,7 @@ final class t3lib_BEfunc {
                                $parseObj = t3lib_div::makeInstance('t3lib_TSparser');
                                $parseObj->parse($pageTS);
                                $TSconfig = $parseObj->setup;
-                               t3lib_BEfunc::storeHash($hash, serialize($TSconfig), 'PAGES_TSconfig');
+                               self::storeHash($hash, serialize($TSconfig), 'PAGES_TSconfig');
                        }
                }
 
@@ -1387,7 +1387,7 @@ final class t3lib_BEfunc {
                $id = intval($id);
                if (is_array($pageTS) && $id>0) {
                        if (!is_array($impParams)) {
-                               $impParams =t3lib_BEfunc::implodeTSParams(t3lib_BEfunc::getPagesTSconfig($id));
+                               $impParams = self::implodeTSParams(self::getPagesTSconfig($id));
                        }
                        $set = array();
                        foreach ($pageTS as $f => $v) {
@@ -1398,7 +1398,7 @@ final class t3lib_BEfunc {
                        }
                        if (count($set)) {
                                        // Get page record and TS config lines
-                               $pRec = t3lib_befunc::getRecord('pages', $id);
+                               $pRec = self::getRecord('pages', $id);
                                $TSlines = explode(LF, $pRec['TSconfig']);
                                $TSlines = array_reverse($TSlines);
                                        // Reset the set of changes.
@@ -1440,7 +1440,7 @@ final class t3lib_BEfunc {
                if (is_array($p)) {
                        foreach ($p as $kb => $val) {
                                if (is_array($val)) {
-                                       $implodeParams = array_merge($implodeParams, t3lib_BEfunc::implodeTSParams($val, $k.$kb));
+                                       $implodeParams = array_merge($implodeParams, self::implodeTSParams($val, $k . $kb));
                                } else {
                                        $implodeParams[$k.$kb] = $val;
                                }
@@ -1474,7 +1474,7 @@ final class t3lib_BEfunc {
        public static function getUserNames($fields = 'username,usergroup,usergroup_cached_list,uid', $where = '') {
                $be_user_Array = Array();
 
-               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, 'be_users', 'pid=0 '.$where.t3lib_BEfunc::deleteClause('be_users'), '', 'username');
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, 'be_users', 'pid=0 ' . $where . self::deleteClause('be_users'), '', 'username');
                while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                        $be_user_Array[$row['uid']] = $row;
                }
@@ -1494,7 +1494,7 @@ final class t3lib_BEfunc {
        public static function getGroupNames($fields = 'title,uid', $where = '') {
                $be_group_Array = Array();
 
-               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, 'be_groups', 'pid=0 '.$where.t3lib_BEfunc::deleteClause('be_groups'), '', 'title');
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, 'be_groups', 'pid=0 ' . $where . self::deleteClause('be_groups'), '', 'title');
                while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                        $be_group_Array[$row['uid']] = $row;
                }
@@ -1516,7 +1516,7 @@ final class t3lib_BEfunc {
                if (!$GLOBALS['BE_USER']->isAdmin()) {
                        $exQ.=' AND uid IN ('.($GLOBALS['BE_USER']->user['usergroup_cached_list']?$GLOBALS['BE_USER']->user['usergroup_cached_list']:0).')';
                }
-               return t3lib_BEfunc::getGroupNames($fields, $exQ);
+               return self::getGroupNames($fields, $exQ);
        }
 
        /**
@@ -1686,8 +1686,8 @@ final class t3lib_BEfunc {
         */
        public static function dateTimeAge($tstamp, $prefix = 1, $date = '') {
                return $tstamp ?
-                               ($date=='date' ? t3lib_BEfunc::date($tstamp) : t3lib_BEfunc::datetime($tstamp)) .
-                               ' (' . t3lib_BEfunc::calcAge($prefix * ($GLOBALS['EXEC_TIME'] - $tstamp), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')) . ')'
+                               ($date=='date' ? self::date($tstamp) : self::datetime($tstamp)) .
+                               ' (' . self::calcAge($prefix * ($GLOBALS['EXEC_TIME'] - $tstamp), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')) . ')'
                                : '';
        }
 
@@ -1807,7 +1807,7 @@ final class t3lib_BEfunc {
                                        $onClick = 'top.launchView(\''.$theFile.'\',\'\',\''.$backPath.'\');return false;';
                                        $thumbData.= '<a href="#" onclick="'.htmlspecialchars($onClick).'"><img src="'.htmlspecialchars($backPath.$url).'" hspace="2" border="0" title="'.trim($theFile).'"'.$tparams.' alt="" /></a> ';
                                } else {
-                                       $icon = t3lib_BEfunc::getFileIcon($ext);
+                                       $icon = self::getFileIcon($ext);
                                        $url = 'gfx/fileicons/'.$icon;
                                        $thumbData.= '<img src="'.$backPath.$url.'" hspace="2" border="0" title="'.trim($theFile).'"'.$tparams.' alt="" /> ';
                                }
@@ -1875,21 +1875,21 @@ final class t3lib_BEfunc {
                        $parts[] = $LANG->sL($TCA['pages']['columns']['url']['label']).' '.$row['url'];
                } elseif ($row['doktype']=='4') {
                        if ($perms_clause) {
-                               $label = t3lib_BEfunc::getRecordPath(intval($row['shortcut']), $perms_clause, 20);
+                               $label = self::getRecordPath(intval($row['shortcut']), $perms_clause, 20);
                        } else {
-                               $lRec = t3lib_BEfunc::getRecordWSOL('pages', intval($row['shortcut']), 'title');
+                               $lRec = self::getRecordWSOL('pages', intval($row['shortcut']), 'title');
                                $label = $lRec['title'];
                        }
                        if ($row['shortcut_mode']>0) {
                                $label.=', '.$LANG->sL($TCA['pages']['columns']['shortcut_mode']['label']).' '.
-                                                       $LANG->sL(t3lib_BEfunc::getLabelFromItemlist('pages', 'shortcut_mode', $row['shortcut_mode']));
+                                                       $LANG->sL(self::getLabelFromItemlist('pages', 'shortcut_mode', $row['shortcut_mode']));
                        }
                        $parts[] = $LANG->sL($TCA['pages']['columns']['shortcut']['label']).' '.$label;
                } elseif ($row['doktype']=='7') {
                        if ($perms_clause) {
-                               $label = t3lib_BEfunc::getRecordPath(intval($row['mount_pid']), $perms_clause, 20);
+                               $label = self::getRecordPath(intval($row['mount_pid']), $perms_clause, 20);
                        } else {
-                               $lRec = t3lib_BEfunc::getRecordWSOL('pages', intval($row['mount_pid']), 'title');
+                               $lRec = self::getRecordWSOL('pages', intval($row['mount_pid']), 'title');
                                $label = $lRec['title'];
                        }
                        $parts[] = $LANG->sL($TCA['pages']['columns']['mount_pid']['label']).' '.$label;
@@ -1899,15 +1899,15 @@ final class t3lib_BEfunc {
                }
                if ($row['nav_hide'])   $parts[] = rtrim($LANG->sL($TCA['pages']['columns']['nav_hide']['label']), ':');
                if ($row['hidden'])     $parts[] = $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.hidden');
-               if ($row['starttime'])  $parts[] = $LANG->sL($TCA['pages']['columns']['starttime']['label']).' '.t3lib_BEfunc::dateTimeAge($row['starttime'], -1, 'date');
-               if ($row['endtime'])    $parts[] = $LANG->sL($TCA['pages']['columns']['endtime']['label']).' '.t3lib_BEfunc::dateTimeAge($row['endtime'], -1, 'date');
+               if ($row['starttime'])  $parts[] = $LANG->sL($TCA['pages']['columns']['starttime']['label']) . ' ' . self::dateTimeAge($row['starttime'], -1, 'date');
+               if ($row['endtime'])    $parts[] = $LANG->sL($TCA['pages']['columns']['endtime']['label']) . ' ' . self::dateTimeAge($row['endtime'], -1, 'date');
                if ($row['fe_group']) {
                        $fe_groups = array();
                        foreach (t3lib_div::intExplode(',', $row['fe_group']) as $fe_group) {
                                if ($fe_group<0) {
-                                       $fe_groups[] = $LANG->sL(t3lib_BEfunc::getLabelFromItemlist('pages', 'fe_group', $fe_group));
+                                       $fe_groups[] = $LANG->sL(self::getLabelFromItemlist('pages', 'fe_group', $fe_group));
                                } else {
-                                       $lRec = t3lib_BEfunc::getRecordWSOL('fe_groups', $fe_group, 'title');
+                                       $lRec = self::getRecordWSOL('fe_groups', $fe_group, 'title');
                                        $fe_groups[] = $lRec['title'];
                                }
                        }
@@ -1930,7 +1930,7 @@ final class t3lib_BEfunc {
         */
        public static function getRecordIconAltText($row, $table = 'pages') {
                if ($table=='pages') {
-                       $out = t3lib_BEfunc::titleAttribForPages($row, '', 0);
+                       $out = self::titleAttribForPages($row, '', 0);
                } else {
                        $ctrl = $GLOBALS['TCA'][$table]['ctrl']['enablecolumns'];
 
@@ -1966,11 +1966,15 @@ final class t3lib_BEfunc {
                        }
                        if ($ctrl['starttime']) {
                                if ($row[$ctrl['starttime']] > $GLOBALS['EXEC_TIME']) {
-                                       $out.=' - '.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.starttime').':'.t3lib_BEfunc::date($row[$ctrl['starttime']]).' ('.t3lib_BEfunc::daysUntil($row[$ctrl['starttime']]).' '.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.days').')';
+                                       $out .= ' - ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.starttime') . ':' .
+                                               self::date($row[$ctrl['starttime']]) . ' (' . self::daysUntil($row[$ctrl['starttime']]) . ' ' .
+                                               $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.days') . ')';
                                }
                        }
                        if ($row[$ctrl['endtime']]) {
-                               $out.=' - '.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.endtime').': '.t3lib_BEfunc::date($row[$ctrl['endtime']]).' ('.t3lib_BEfunc::daysUntil($row[$ctrl['endtime']]).' '.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.days').')';
+                               $out .= ' - ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.endtime') . ': ' .
+                                       self::date($row[$ctrl['endtime']]) . ' (' . self::daysUntil($row[$ctrl['endtime']]) . ' ' .
+                                       $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.days') . ')';
                        }
                }
                return htmlspecialchars($out);
@@ -2051,7 +2055,7 @@ final class t3lib_BEfunc {
                        } else {
 
                                        // No userFunc: Build label
-                               $t = t3lib_BEfunc::getProcessedValue($table, $TCA[$table]['ctrl']['label'], $row[$TCA[$table]['ctrl']['label']], 0, 0, false, $row['uid'], $forceResult);
+                               $t = self::getProcessedValue($table, $TCA[$table]['ctrl']['label'], $row[$TCA[$table]['ctrl']['label']], 0, 0, false, $row['uid'], $forceResult);
                                if ($TCA[$table]['ctrl']['label_alt'] && ($TCA[$table]['ctrl']['label_alt_force'] || !strcmp($t, ''))) {
                                        $altFields = t3lib_div::trimExplode(',', $TCA[$table]['ctrl']['label_alt'], 1);
                                        $tA = array();
@@ -2059,7 +2063,7 @@ final class t3lib_BEfunc {
                                        foreach ($altFields as $fN) {
                                                $t = trim(strip_tags($row[$fN]));
                                                if (strcmp($t, '')) {
-                                                       $t = t3lib_BEfunc::getProcessedValue($table, $fN, $t, 0, 0, false, $row['uid']);
+                                                       $t = self::getProcessedValue($table, $fN, $t, 0, 0, false, $row['uid']);
                                                        if (!$TCA[$table]['ctrl']['label_alt_force']) {
                                                                break;
                                                        }
@@ -2075,10 +2079,10 @@ final class t3lib_BEfunc {
                                // If the current result is empty, set it to '[No title]' (localized) and prepare for output if requested
                        if ($prep || $forceResult) {
                                if ($prep) {
-                                       $t = t3lib_BEfunc::getRecordTitlePrep($t);
+                                       $t = self::getRecordTitlePrep($t);
                                }
                                if (!strcmp(trim($t), '')) {
-                                       $t = t3lib_BEfunc::getNoRecordTitle($prep);
+                                       $t = self::getNoRecordTitle($prep);
                                }
                        }
 
@@ -2164,7 +2168,7 @@ final class t3lib_BEfunc {
                        $l = '';
                        switch((string)$theColConf['type']) {
                                case 'radio':
-                                       $l = t3lib_BEfunc::getLabelFromItemlist($table,$col,$value);
+                                       $l = self::getLabelFromItemlist($table, $col, $value);
                                        $l = $GLOBALS['LANG']->sL($l);
                                break;
                                case 'select':
@@ -2191,7 +2195,7 @@ final class t3lib_BEfunc {
                                                                'uid IN ('.implode(',', $selectUids).')'
                                                        );
                                                        while($MMrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($MMres)) {
-                                                               $mmlA[] = ($noRecordLookup?$MMrow['uid']:t3lib_BEfunc::getRecordTitle($theColConf['foreign_table'], $MMrow, FALSE, $forceResult));
+                                                               $mmlA[] = ($noRecordLookup ? $MMrow['uid'] : self::getRecordTitle($theColConf['foreign_table'], $MMrow, FALSE, $forceResult));
                                                        }
                                                        $GLOBALS['TYPO3_DB']->sql_free_result($MMres);
 
@@ -2204,7 +2208,7 @@ final class t3lib_BEfunc {
                                                        $l = 'N/A';
                                                }
                                        } else {
-                                               $l = t3lib_BEfunc::getLabelFromItemlist($table, $col, $value);
+                                               $l = self::getLabelFromItemlist($table, $col, $value);
                                                $l = $GLOBALS['LANG']->sL($l);
                                                if ($theColConf['foreign_table'] && !$l && $TCA[$theColConf['foreign_table']]) {
                                                        if ($noRecordLookup) {
@@ -2215,12 +2219,12 @@ final class t3lib_BEfunc {
                                                                foreach ($rParts as $rVal) {
                                                                        $rVal = intval($rVal);
                                                                        if ($rVal>0) {
-                                                                               $r = t3lib_BEfunc::getRecordWSOL($theColConf['foreign_table'], $rVal);
+                                                                               $r = self::getRecordWSOL($theColConf['foreign_table'], $rVal);
                                                                        } else {
-                                                                               $r = t3lib_BEfunc::getRecordWSOL($theColConf['neg_foreign_table'], -$rVal);
+                                                                               $r = self::getRecordWSOL($theColConf['neg_foreign_table'], -$rVal);
                                                                        }
                                                                        if (is_array($r)) {
-                                                                               $lA[] = $GLOBALS['LANG']->sL($rVal>0?$theColConf['foreign_table_prefix']:$theColConf['neg_foreign_table_prefix']).t3lib_BEfunc::getRecordTitle($rVal>0?$theColConf['foreign_table']:$theColConf['neg_foreign_table'], $r, FALSE, $forceResult);
+                                                                               $lA[] = $GLOBALS['LANG']->sL($rVal>0?$theColConf['foreign_table_prefix']:$theColConf['neg_foreign_table_prefix']) . self::getRecordTitle($rVal>0?$theColConf['foreign_table']:$theColConf['neg_foreign_table'], $r, FALSE, $forceResult);
                                                                        } else {
                                                                                $lA[] = $rVal?'['.$rVal.'!]':'';
                                                                        }
@@ -2247,17 +2251,17 @@ final class t3lib_BEfunc {
                                case 'input':
                                        if (isset($value)) {
                                                if (t3lib_div::inList($theColConf['eval'], 'date')) {
-                                                       $l = t3lib_BEfunc::date($value) .
+                                                       $l = self::date($value) .
                                                                ' (' .
                                                                ($GLOBALS['EXEC_TIME'] - $value > 0 ? '-' : '') .
-                                                               t3lib_BEfunc::calcAge(abs($GLOBALS['EXEC_TIME'] - $value), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')) .
+                                                               self::calcAge(abs($GLOBALS['EXEC_TIME'] - $value), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')) .
                                                                ')';
                                                } elseif (t3lib_div::inList($theColConf['eval'], 'time')) {
-                                                       $l = t3lib_BEfunc::time($value, FALSE);
+                                                       $l = self::time($value, FALSE);
                                                } elseif (t3lib_div::inList($theColConf['eval'], 'timesec')) {
-                                                       $l = t3lib_BEfunc::time($value);
+                                                       $l = self::time($value);
                                                } elseif (t3lib_div::inList($theColConf['eval'], 'datetime')) {
-                                                       $l = t3lib_BEfunc::datetime($value);
+                                                       $l = self::datetime($value);
                                                } else {
                                                        $l = $value;
                                                }
@@ -2322,13 +2326,13 @@ final class t3lib_BEfunc {
         */
        public static function getProcessedValueExtra($table, $fN, $fV, $fixed_lgd_chars = 0, $uid = 0, $forceResult = TRUE) {
                global $TCA;
-               $fVnew = t3lib_BEfunc::getProcessedValue($table, $fN, $fV, $fixed_lgd_chars, 0, 0, $uid, $forceResult);
+               $fVnew = self::getProcessedValue($table, $fN, $fV, $fixed_lgd_chars, 0, 0, $uid, $forceResult);
                if (!isset($fVnew)) {
                        if (is_array($TCA[$table])) {
                                if ($fN==$TCA[$table]['ctrl']['tstamp'] || $fN==$TCA[$table]['ctrl']['crdate']) {
-                                       $fVnew = t3lib_BEfunc::datetime($fV);
+                                       $fVnew = self::datetime($fV);
                                } elseif ($fN=='pid'){
-                                       $fVnew = t3lib_BEfunc::getRecordPath($fV, '1=1', 20);   // Fetches the path with no regard to the users permissions to select pages.
+                                       $fVnew = self::getRecordPath($fV, '1=1', 20);   // Fetches the path with no regard to the users permissions to select pages.
                                } else {
                                        $fVnew = $fV;
                                }
@@ -2480,7 +2484,7 @@ final class t3lib_BEfunc {
                $onClick = 'vHWin=window.open(\''.$BACK_PATH.'view_help.php?tfID='.($table.'.'.$field).'\',\'viewFieldHelp\',\'height=400,width=600,status=0,menubar=0,scrollbars=1\');vHWin.focus();return false;';
                if (is_array($TCA_DESCR[$table]) && is_array($TCA_DESCR[$table]['columns'][$field]) && (isset($BE_USER->uc['edit_showFieldHelp']) || $force)) {
                        if ($BE_USER->uc['edit_showFieldHelp'] == 'icon') {
-                               $text = t3lib_BEfunc::helpText($table, $field, $BACK_PATH, '');
+                               $text = self::helpText($table, $field, $BACK_PATH, '');
                                $text = '<span class="typo3-csh-inline">'.$GLOBALS['LANG']->hscAndCharConv($text, false).'</span>';
                        }
                        return '<a class="typo3-csh-link" href="#" onclick="'.htmlspecialchars($onClick).'">' . t3lib_iconWorks::getSpriteIcon('actions-system-help-open', array('class' => 'typo3-csh-icon')) . $text.'</a>';
@@ -2548,8 +2552,8 @@ final class t3lib_BEfunc {
 
                        if (is_array($TCA_DESCR[$table])) {
                                // Creating CSH icon and short description:
-                               $fullText = t3lib_BEfunc::helpText($table, $field, $BACK_PATH, '');
-                               $icon = t3lib_BEfunc::helpTextIcon($table, $field, $BACK_PATH);
+                               $fullText = self::helpText($table, $field, $BACK_PATH, '');
+                               $icon = self::helpTextIcon($table, $field, $BACK_PATH);
 
                                if ($fullText && !$onlyIconMode && $BE_USER->uc['edit_showFieldHelp'] == 'text')        {
 
@@ -2654,7 +2658,7 @@ final class t3lib_BEfunc {
                        $addGetVars .= '&MP=' . $mountPointInfo['MPvar'];
                }
 
-               $viewDomain = t3lib_BEfunc::getViewDomain($id, $rootLine);
+               $viewDomain = self::getViewDomain($id, $rootLine);
                $urlPreviewEnabled  = $viewDomain . $viewScriptPreviewEnabled . $id . $addGetVars . $anchor;
                $urlPreviewDisabled = $viewDomain . $viewScriptPreviewDisabled . $id . $addGetVars . $anchor;
 
@@ -2678,15 +2682,15 @@ final class t3lib_BEfunc {
                $domain = rtrim(t3lib_div::getIndpEnv('TYPO3_SITE_URL'), '/');
 
                if (!is_array($rootLine)) {
-                       $rootLine = t3lib_BEfunc::BEgetRootLine($pageId);
+                       $rootLine = self::BEgetRootLine($pageId);
                }
 
                        // checks alternate domains
                if (count($rootLine) > 0) {
                        $urlParts = parse_url($domain);
-                       if (t3lib_BEfunc::getDomainStartPage($urlParts['host'], $urlParts['path'])) {
+                       if (self::getDomainStartPage($urlParts['host'], $urlParts['path'])) {
                                $protocol = t3lib_div::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://';
-                               $domain = $protocol . t3lib_BEfunc::firstDomainRecord($rootLine);
+                               $domain = $protocol . self::firstDomainRecord($rootLine);
                        }
                }
 
@@ -2703,7 +2707,7 @@ final class t3lib_BEfunc {
         * @return      array
         */
        public static function getModTSconfig($id, $TSref) {
-               $pageTS_modOptions = $GLOBALS['BE_USER']->getTSConfig($TSref, t3lib_BEfunc::getPagesTSconfig($id));
+               $pageTS_modOptions = $GLOBALS['BE_USER']->getTSConfig($TSref, self::getPagesTSconfig($id));
                $BE_USER_modOptions = $GLOBALS['BE_USER']->getTSConfig($TSref);
                $modTSconfig = t3lib_div::array_merge_recursive_overrule($pageTS_modOptions, $BE_USER_modOptions);
                return $modTSconfig;
@@ -2854,9 +2858,9 @@ final class t3lib_BEfunc {
 
                        // kept for backwards compatibility if $set is empty, use "getUpdateSignalCode()" instead
                if ($set) {
-                       return t3lib_BEfunc::setUpdateSignal($set);
+                       return self::setUpdateSignal($set);
                } else {
-                       return t3lib_BEfunc::getUpdateSignalCode();
+                       return self::getUpdateSignalCode();
                }
        }
 
@@ -2925,7 +2929,7 @@ final class t3lib_BEfunc {
 
                $content = implode(LF, $signals);
 
-               t3lib_BEfunc::setUpdateSignal();        // for backwards compatibility, should be replaced
+               self::setUpdateSignal();        // for backwards compatibility, should be replaced
                return $content;
        }
 
@@ -3122,14 +3126,14 @@ final class t3lib_BEfunc {
                                        $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.lockedRecordUser'),
                                        $userType,
                                        $userName,
-                                       t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME']-$row['tstamp'], $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears'))
+                                       self::calcAge($GLOBALS['EXEC_TIME']-$row['tstamp'], $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears'))
                                );
                                if ($row['record_pid'] && !isset($LOCKED_RECORDS[$row['record_table'].':'.$row['record_pid']])) {
                                        $LOCKED_RECORDS['pages:'.$row['record_pid']]['msg'] = sprintf(
                                                $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.lockedRecordUser_content'),
                                                $userType,
                                                $userName,
-                                               t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME']-$row['tstamp'], $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears'))
+                                               self::calcAge($GLOBALS['EXEC_TIME']-$row['tstamp'], $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears'))
                                        );
                                }
                        }
@@ -3182,10 +3186,10 @@ final class t3lib_BEfunc {
                $wgolParts = $GLOBALS['TYPO3_DB']->splitGroupOrderLimit($fTWHERE);
                if ($rootLevel) {
                        $queryParts = array(
-                               'SELECT' => t3lib_BEfunc::getCommonSelectFields($foreign_table, $foreign_table.'.'),
+                               'SELECT' => self::getCommonSelectFields($foreign_table, $foreign_table . '.'),
                                'FROM' => $foreign_table,
                                'WHERE' => $foreign_table.'.pid=0 '.
-                                                       t3lib_BEfunc::deleteClause($foreign_table).' '.
+                                                       self::deleteClause($foreign_table) . ' ' .
                                                        $wgolParts['WHERE'],
                                'GROUPBY' => $wgolParts['GROUPBY'],
                                'ORDERBY' => $wgolParts['ORDERBY'],
@@ -3195,11 +3199,11 @@ final class t3lib_BEfunc {
                        $pageClause = $GLOBALS['BE_USER']->getPagePermsClause(1);
                        if ($foreign_table!='pages') {
                                $queryParts = array(
-                                       'SELECT' => t3lib_BEfunc::getCommonSelectFields($foreign_table, $foreign_table.'.'),
+                                       'SELECT' => self::getCommonSelectFields($foreign_table, $foreign_table . '.'),
                                        'FROM' => $foreign_table.', pages',
                                        'WHERE' => 'pages.uid='.$foreign_table.'.pid
                                                                AND pages.deleted=0 '.
-                                                               t3lib_BEfunc::deleteClause($foreign_table).
+                                                               self::deleteClause($foreign_table) .
                                                                ' AND '.$pageClause.' '.
                                                                $wgolParts['WHERE'],
                                        'GROUPBY' => $wgolParts['GROUPBY'],
@@ -3208,7 +3212,7 @@ final class t3lib_BEfunc {
                                );
                        } else {
                                $queryParts = array(
-                                       'SELECT' => t3lib_BEfunc::getCommonSelectFields($foreign_table, $foreign_table.'.'),
+                                       'SELECT' => self::getCommonSelectFields($foreign_table, $foreign_table . '.'),
                                        'FROM' => 'pages',
                                        'WHERE' => 'pages.deleted=0
                                                                AND '.$pageClause.' '.
@@ -3234,17 +3238,17 @@ final class t3lib_BEfunc {
         * @see t3lib_transferData::renderRecord(), t3lib_TCEforms::setTSconfig(), SC_wizard_list::main(), SC_wizard_add::main()
         */
        public static function getTCEFORM_TSconfig($table, $row) {
-               t3lib_BEfunc::fixVersioningPid($table, $row);
+               self::fixVersioningPid($table, $row);
 
                $res = array();
-               $typeVal = t3lib_BEfunc::getTCAtypeValue($table, $row);
+               $typeVal = self::getTCAtypeValue($table, $row);
 
                        // Get main config for the table
-               list($TScID, $cPid) = t3lib_BEfunc::getTSCpid($table, $row['uid'], $row['pid']);
+               list($TScID, $cPid) = self::getTSCpid($table, $row['uid'], $row['pid']);
 
-               $rootLine = t3lib_BEfunc::BEgetRootLine($TScID, '', TRUE);
+               $rootLine = self::BEgetRootLine($TScID, '', TRUE);
                if ($TScID>=0) {
-                       $tempConf = $GLOBALS['BE_USER']->getTSConfig('TCEFORM.'.$table, t3lib_BEfunc::getPagesTSconfig($TScID, $rootLine));
+                       $tempConf = $GLOBALS['BE_USER']->getTSConfig('TCEFORM.' . $table, self::getPagesTSconfig($TScID, $rootLine));
                        if (is_array($tempConf['properties'])) {
                                foreach ($tempConf['properties'] as $key => $val) {
                                        if (is_array($val)) {
@@ -3288,17 +3292,17 @@ final class t3lib_BEfunc {
                if (t3lib_div::testInt($pid))   {       // If pid is an integer this takes precedence in our lookup.
                        $thePidValue = intval($pid);
                        if ($thePidValue<0)     {       // If ref to another record, look that record up.
-                               $pidRec = t3lib_BEfunc::getRecord($table, abs($thePidValue), 'pid');
+                               $pidRec = self::getRecord($table, abs($thePidValue), 'pid');
                                $thePidValue = is_array($pidRec) ? $pidRec['pid'] : -2; // Returns -2 if the record did not exist.
                        }
                        // ... else the pos/zero pid is just returned here.
                } else {        // No integer pid and we are forced to look up the $pid
-                       $rr = t3lib_BEfunc::getRecord($table, $uid);    // Try to fetch the record pid from uid. If the uid is 'NEW...' then this will of course return nothing...
+                       $rr = self::getRecord($table, $uid);    // Try to fetch the record pid from uid. If the uid is 'NEW...' then this will of course return nothing...
 
                        if (is_array($rr)) {
                                        // First check if the pid is -1 which means it is a workspaced element. Get the "real" record:
                                if ($rr['pid']=='-1') {
-                                       $rr = t3lib_BEfunc::getRecord($table, $rr['t3ver_oid'], 'pid');
+                                       $rr = self::getRecord($table, $rr['t3ver_oid'], 'pid');
                                        if (is_array($rr)) {
                                                $thePidValue = $rr['pid'];
                                        }
@@ -3342,9 +3346,9 @@ final class t3lib_BEfunc {
         */
        public static function getTSCpid($table, $uid, $pid) {
                        // If pid is negative (referring to another record) the pid of the other record is fetched and returned.
-               $cPid = t3lib_BEfunc::getTSconfig_pidValue($table, $uid, $pid);
+               $cPid = self::getTSconfig_pidValue($table, $uid, $pid);
                        // $TScID is the id of $table = pages, else it's the pid of the record.
-               $TScID = t3lib_BEfunc::getPidForModTSconfig($table, $uid, $cPid);
+               $TScID = self::getPidForModTSconfig($table, $uid, $cPid);
 
                return array($TScID, $cPid);
        }
@@ -3359,7 +3363,7 @@ final class t3lib_BEfunc {
        public static function firstDomainRecord($rootLine) {
                if (t3lib_extMgm::isLoaded('cms')) {
                        foreach ($rootLine as $row) {
-                               $dRec = t3lib_BEfunc::getRecordsByField('sys_domain', 'pid', $row['uid'], ' AND redirectTo=\'\' AND hidden=0', '', 'sorting');
+                               $dRec = self::getRecordsByField('sys_domain', 'pid', $row['uid'], ' AND redirectTo=\'\' AND hidden=0', '', 'sorting');
                                if (is_array($dRec)) {
                                        reset($dRec);
                                        $dRecord = current($dRec);
@@ -3390,7 +3394,7 @@ final class t3lib_BEfunc {
                                pages.uid=sys_domain.pid
                                AND sys_domain.hidden=0
                                AND (sys_domain.domainName='.$GLOBALS['TYPO3_DB']->fullQuoteStr($domain, 'sys_domain').' OR sys_domain.domainName='.$GLOBALS['TYPO3_DB']->fullQuoteStr($domain.'/', 'sys_domain').')'.
-                               t3lib_BEfunc::deleteClause('pages'),
+                               self::deleteClause('pages'),
                                '', '', '1');
                        $result = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
                        $GLOBALS['TYPO3_DB']->sql_free_result($res);
@@ -3659,7 +3663,7 @@ final class t3lib_BEfunc {
                                        $fields,
                                        $table,
                                        'uid=' . intval($uid) .
-                                               ($includeDeletedRecords ? '' : t3lib_BEfunc::deleteClause($table))
+                                               ($includeDeletedRecords ? '' : self::deleteClause($table))
                                );
 
                                        // Add rows to output array:
@@ -3679,7 +3683,7 @@ final class t3lib_BEfunc {
                                $fields,
                                $table,
                                'pid=-1 AND uid!='.intval($uid).' AND t3ver_oid='.intval($uid).($workspace!=0?' AND t3ver_wsid='.intval($workspace):'').
-                                       ($includeDeletedRecords ? '' : t3lib_BEfunc::deleteClause($table)),
+                                       ($includeDeletedRecords ? '' : self::deleteClause($table)),
                                '',
                                't3ver_id DESC'
                        );
@@ -3725,7 +3729,7 @@ final class t3lib_BEfunc {
                                        $oid = $rr['t3ver_oid'];
                                        $wsid = $rr['t3ver_wsid'];
                                } else {        // Otherwise we have to expect "uid" to be in the record and look up based on this:
-                                       $newPidRec = t3lib_BEfunc::getRecord($table, $rr['uid'], 't3ver_oid,t3ver_wsid');
+                                       $newPidRec = self::getRecord($table, $rr['uid'], 't3ver_oid,t3ver_wsid');
                                        if (is_array($newPidRec)) {
                                                $oid = $newPidRec['t3ver_oid'];
                                                $wsid = $newPidRec['t3ver_wsid'];
@@ -3734,7 +3738,7 @@ final class t3lib_BEfunc {
 
                                        // If ID of current online version is found, look up the PID value of that:
                                if ($oid && ($ignoreWorkspaceMatch || !strcmp((int)$wsid, $GLOBALS['BE_USER']->workspace))) {
-                                       $oidRec = t3lib_BEfunc::getRecord($table, $oid, 'pid');
+                                       $oidRec = self::getRecord($table, $oid, 'pid');
                                        if (is_array($oidRec)) {
                                                $rr['_ORIG_pid'] = $rr['pid'];
                                                $rr['pid'] = $oidRec['pid'];
@@ -3772,11 +3776,11 @@ final class t3lib_BEfunc {
                                if ($previewMovePlaceholders) {
                                        $orig_uid = $row['uid'];
                                        $orig_pid = $row['pid'];
-                                       $movePldSwap = t3lib_BEfunc::movePlhOL($table, $row);
+                                       $movePldSwap = self::movePlhOL($table, $row);
                #                       if (!is_array($row)) return;
                                }
 
-                               $wsAlt = t3lib_BEfunc::getWorkspaceVersionOfRecord($wsid, $table, $row['uid'], implode(',', array_keys($row)));
+                               $wsAlt = self::getWorkspaceVersionOfRecord($wsid, $table, $row['uid'], implode(',', array_keys($row)));
 
                                        // If version was found, swap the default record with that one.
                                if (is_array($wsAlt)) {
@@ -3786,7 +3790,7 @@ final class t3lib_BEfunc {
 
                                                        // If t3ver_state is not found, then find it... (but we like best if it is here...)
                                                if (!isset($wsAlt['t3ver_state'])) {
-                                                       $stateRec = t3lib_BEfunc::getRecord($table, $wsAlt['uid'], 't3ver_state');
+                                                       $stateRec = self::getRecord($table, $wsAlt['uid'], 't3ver_state');
                                                        $state = $stateRec['t3ver_state'];
                                                } else {
                                                        $state = $wsAlt['t3ver_state'];
@@ -3849,7 +3853,7 @@ final class t3lib_BEfunc {
 
                                // If t3ver_move_id or t3ver_state is not found, then find it... (but we like best if it is here...)
                        if (!isset($row['t3ver_move_id']) || !isset($row['t3ver_state'])) {
-                               $moveIDRec = t3lib_BEfunc::getRecord($table, $row['uid'], 't3ver_move_id, t3ver_state');
+                               $moveIDRec = self::getRecord($table, $row['uid'], 't3ver_move_id, t3ver_state');
                                $moveID = $moveIDRec['t3ver_move_id'];
                                $state = $moveIDRec['t3ver_state'];
                        } else {
@@ -3859,7 +3863,7 @@ final class t3lib_BEfunc {
 
                                // Find pointed-to record.
                        if ((int)$state===3 && $moveID) {
-                               if ($origRow = t3lib_BEfunc::getRecord($table, $moveID, implode(',', array_keys($row)))) {
+                               if ($origRow = self::getRecord($table, $moveID, implode(',', array_keys($row)))) {
                                        $row = $origRow;
                                        return TRUE;
                                }
@@ -3890,7 +3894,7 @@ final class t3lib_BEfunc {
                                        'pid=-1 AND
                                         t3ver_oid=' . intval($uid) . ' AND
                                         t3ver_wsid=' . intval($workspace) .
-                                               t3lib_BEfunc::deleteClause($table)
+                                               self::deleteClause($table)
                                );
 
                                if (is_array($rows[0])) return $rows[0];
@@ -3912,10 +3916,10 @@ final class t3lib_BEfunc {
 
                        // Check that table supports versioning:
                if ($TCA[$table] && $TCA[$table]['ctrl']['versioningWS']) {
-                       $rec = t3lib_BEfunc::getRecord($table, $uid, 'pid,t3ver_oid');
+                       $rec = self::getRecord($table, $uid, 'pid,t3ver_oid');
 
                        if ($rec['pid']==-1) {
-                               return t3lib_BEfunc::getRecord($table, $rec['t3ver_oid'], $fields);
+                               return self::getRecord($table, $rec['t3ver_oid'], $fields);
                        }
                }
        }
@@ -3930,7 +3934,7 @@ final class t3lib_BEfunc {
         * @return      mixed           Returns either "branchpoint" (if branch) or "first" (if page) or false if nothing. Alternatively, it returns the value of "t3ver_stage" for the branchpoint (if any)
         */
        public static function isPidInVersionizedBranch($pid, $table = '', $returnStage = FALSE) {
-               $rl = t3lib_BEfunc::BEgetRootLine($pid);
+               $rl = self::BEgetRootLine($pid);
                $c = 0;
 
                foreach($rl as $rec) {
@@ -3981,8 +3985,8 @@ final class t3lib_BEfunc {
                                                        ' AND B.pid='.intval($pageId).
                                                        ' AND A.t3ver_wsid='.intval($workspace).
                                                        ' AND A.t3ver_oid=B.uid'.       // ... and finally the join between the two tables.
-                                                       t3lib_BEfunc::deleteClause($tableName, 'A').
-                                                       t3lib_BEfunc::deleteClause($tableName, 'B')
+                                                       self::deleteClause($tableName, 'A').
+                                                       self::deleteClause($tableName, 'B')
                                        );
 
                                        if (!is_array($output[$tableName]) || !count($output[$tableName])) {
@@ -4002,7 +4006,7 @@ final class t3lib_BEfunc {
         * @return      integer         Uid of offline version if any, otherwise live uid.
         */
        public static function wsMapId($table, $uid) {
-               if ($wsRec = t3lib_BEfunc::getWorkspaceVersionOfRecord($GLOBALS['BE_USER']->workspace, $table, $uid, 'uid')) {
+               if ($wsRec = self::getWorkspaceVersionOfRecord($GLOBALS['BE_USER']->workspace, $table, $uid, 'uid')) {
                        return $wsRec['uid'];
                } else {
                        return $uid;
@@ -4031,7 +4035,7 @@ final class t3lib_BEfunc {
                                 t3ver_state=3 AND
                                 t3ver_move_id='.intval($uid).' AND
                                 t3ver_wsid='.intval($workspace).
-                                       t3lib_BEfunc::deleteClause($table)
+                                       self::deleteClause($table)
                        );
 
                        if (is_array($rows[0])) return $rows[0];
@@ -4172,7 +4176,8 @@ final class t3lib_BEfunc {
                        }
 
                                // Check if there is still a default user 'admin' with password 'password' (MD5sum = 5f4dcc3b5aa765d61d8327deb882cf99)
-                       $where_clause = 'username='.$GLOBALS['TYPO3_DB']->fullQuoteStr('admin', 'be_users').' AND password='.$GLOBALS['TYPO3_DB']->fullQuoteStr('5f4dcc3b5aa765d61d8327deb882cf99', 'be_users').t3lib_BEfunc::deleteClause('be_users');
+                       $where_clause = 'username=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('admin', 'be_users') . ' AND password=' .
+                               $GLOBALS['TYPO3_DB']->fullQuoteStr('5f4dcc3b5aa765d61d8327deb882cf99', 'be_users') . self::deleteClause('be_users');
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid, username, password', 'be_users', $where_clause);
                        if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                $url = "alt_doc.php?returnUrl=index.php&edit[be_users][".$row['uid']."]=edit";
@@ -4233,7 +4238,7 @@ final class t3lib_BEfunc {
                                        $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.backend_reference_index'),
                                        '<a href="'.$url.'">',
                                        '</a>',
-                                       t3lib_BEfunc::dateTime($lastRefIndexUpdate));
+                                       self::dateTime($lastRefIndexUpdate));
                        }
 
                        // Check for memcached if configured
@@ -4390,7 +4395,7 @@ final class t3lib_BEfunc {
        public static function getListOfBackendModules($name, $perms_clause, $backPath = '', $script = 'index.php') {
                t3lib_div::logDeprecatedFunction();
 
-               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'doktype!=255 AND module IN (\''.implode('\',\'', $name).'\') AND'.$perms_clause.t3lib_BEfunc::deleteClause('pages'));
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'doktype!=255 AND module IN (\'' . implode('\',\'', $name) . '\') AND' . $perms_clause . self::deleteClause('pages'));
                if (!$GLOBALS['TYPO3_DB']->sql_num_rows($res))  return false;
 
                $out = '';
@@ -4398,7 +4403,7 @@ final class t3lib_BEfunc {
                while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                        $theRows[] = $row;
                        $out.='<span class="nobr"><a href="'.htmlspecialchars($script.'?id='.$row['uid']).'">'.
-                                       t3lib_iconWorks::getIconImage('pages', $row, $backPath, 'title="'.htmlspecialchars(t3lib_BEfunc::getRecordPath($row['uid'], $perms_clause, 20)).'" align="top"').
+                                       t3lib_iconWorks::getIconImage('pages', $row, $backPath, 'title="' . htmlspecialchars(self::getRecordPath($row['uid'], $perms_clause, 20)) . '" align="top"') .
                                        htmlspecialchars($row['title']).
                                        '</a></span><br />';
                }