From: Steffen Kamper Date: Wed, 24 Nov 2010 18:03:52 +0000 (+0000) Subject: Fixed bug #14050: CleanUp - CGL format of t3lib files - t3lib_tsfebeuserauth X-Git-Tag: TYPO3_4-5-0beta2~130 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/6286c69567013d3b3eaa487b9e710b44faba3c42 Fixed bug #14050: CleanUp - CGL format of t3lib files - t3lib_tsfebeuserauth git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9587 709f56b5-9817-0410-a4d7-c38de5d9e867 --- diff --git a/ChangeLog b/ChangeLog index 7094ffcfe232..05208903643b 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2010-11-24 Steffen Kamper + * Fixed bug #14050: CleanUp - CGL format of t3lib files - t3lib_tsfebeuserauth * Fixed bug #14050: CleanUp - CGL format of t3lib files - t3lib_treeview * Fixed bug #14050: CleanUp - CGL format of t3lib files - t3lib_transl8tools * Fixed bug #14050: CleanUp - CGL format of t3lib files - t3lib_transferdata diff --git a/t3lib/class.t3lib_tsfebeuserauth.php b/t3lib/class.t3lib_tsfebeuserauth.php index 65f472a0c10f..0a720892f5f2 100644 --- a/t3lib/class.t3lib_tsfebeuserauth.php +++ b/t3lib/class.t3lib_tsfebeuserauth.php @@ -1,29 +1,29 @@ extAdminConfig = $this->getTSConfigProp('admPanel'); if (isset($this->extAdminConfig['enable.'])) { - foreach($this->extAdminConfig['enable.'] as $key => $value) { + foreach ($this->extAdminConfig['enable.'] as $key => $value) { if ($value) { $this->adminPanel = t3lib_div::makeInstance('tslib_AdminPanel'); - $this->extAdmEnabled = true; + $this->extAdmEnabled = TRUE; break; } @@ -206,7 +197,7 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth { */ public function initializeFrontendEdit() { if (isset($this->extAdminConfig['enable.']) && $this->isFrontendEditingActive()) { - foreach($this->extAdminConfig['enable.'] as $key => $value) { + foreach ($this->extAdminConfig['enable.'] as $key => $value) { if ($value) { if ($GLOBALS['TSFE'] instanceof tslib_fe) { // Grab the Page TSConfig property that determines which controller to use. @@ -218,7 +209,7 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth { $controllerClass = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController'][$controllerKey]; if ($controllerClass) { - $this->frontendEdit = t3lib_div::getUserObj($controllerClass, false); + $this->frontendEdit = t3lib_div::getUserObj($controllerClass, FALSE); } break; @@ -234,8 +225,8 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth { */ public function isFrontendEditingActive() { return ($this->extAdmEnabled - && ($this->adminPanel->isAdminModuleEnabled('edit') && $this->adminPanel->isAdminModuleOpen('edit') - || $GLOBALS['TSFE']->displayEditIcons == 1) + && ($this->adminPanel->isAdminModuleEnabled('edit') && $this->adminPanel->isAdminModuleOpen('edit') + || $GLOBALS['TSFE']->displayEditIcons == 1) ); } @@ -275,39 +266,39 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth { public function checkBackendAccessSettingsFromInitPhp() { global $TYPO3_CONF_VARS; - // ********************** - // Check Hardcoded lock on BE: - // ********************** + // ********************** + // Check Hardcoded lock on BE: + // ********************** if ($TYPO3_CONF_VARS['BE']['adminOnly'] < 0) { - return false; + return FALSE; } - // ********************** - // Check IP - // ********************** + // ********************** + // Check IP + // ********************** if (trim($TYPO3_CONF_VARS['BE']['IPmaskList'])) { if (!t3lib_div::cmpIP(t3lib_div::getIndpEnv('REMOTE_ADDR'), $TYPO3_CONF_VARS['BE']['IPmaskList'])) { - return false; + return FALSE; } } - // ********************** - // Check SSL (https) - // ********************** + // ********************** + // Check SSL (https) + // ********************** if (intval($TYPO3_CONF_VARS['BE']['lockSSL']) && $TYPO3_CONF_VARS['BE']['lockSSL'] != 3) { if (!t3lib_div::getIndpEnv('TYPO3_SSL')) { - return false; + return FALSE; } } // Finally a check from t3lib_beuserauth::backendCheckLogin() if ($this->isUserAllowedToLogin()) { - return true; + return TRUE; } else { - return false; + return FALSE; } - } + } /** @@ -339,25 +330,25 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth { * @param string Perms clause * @return string Returns the list with a comma in the end (if any pages selected!) */ - public function extGetTreeList($id, $depth, $begin=0, $perms_clause) { - $depth=intval($depth); - $begin=intval($begin); - $id=intval($id); - $theList=''; + public function extGetTreeList($id, $depth, $begin = 0, $perms_clause) { + $depth = intval($depth); + $begin = intval($begin); + $id = intval($id); + $theList = ''; if ($id && $depth > 0) { $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( - 'uid,title', - 'pages', - 'pid=' . $id . ' AND doktype IN (' . $GLOBALS['TYPO3_CONF_VARS']['FE']['content_doktypes'] . ') AND deleted=0 AND ' . $perms_clause - ); + 'uid,title', + 'pages', + 'pid=' . $id . ' AND doktype IN (' . $GLOBALS['TYPO3_CONF_VARS']['FE']['content_doktypes'] . ') AND deleted=0 AND ' . $perms_clause + ); while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { if ($begin <= 0) { - $theList .= $row['uid'].','; - $this->extPageInTreeInfo[] = array($row['uid'], htmlspecialchars($row['title'],$depth)); + $theList .= $row['uid'] . ','; + $this->extPageInTreeInfo[] = array($row['uid'], htmlspecialchars($row['title'], $depth)); } if ($depth > 1) { - $theList .= $this->extGetTreeList($row['uid'], $depth-1, $begin-1, $perms_clause); + $theList .= $this->extGetTreeList($row['uid'], $depth - 1, $begin - 1, $perms_clause); } } } @@ -376,30 +367,11 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth { $pageCacheEntries = $pageCache->getByTag('pageId_' . (int) $pageId); $count = count($pageCacheEntries); } else { - $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*)', 'cache_pages', 'page_id='.intval($pageId)); + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*)', 'cache_pages', 'page_id=' . intval($pageId)); list($count) = $GLOBALS['TYPO3_DB']->sql_fetch_row($res); } return $count; } - - - - - - - - - - - - - - - - - - - /***************************************************** @@ -425,7 +397,7 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth { } } - $labelStr = htmlspecialchars($GLOBALS['LANG']->getLL($key)); // Label string in the default backend output charset. + $labelStr = htmlspecialchars($GLOBALS['LANG']->getLL($key)); // Label string in the default backend output charset. // Convert to utf-8, then to entities: if ($GLOBALS['LANG']->charSet != 'utf-8') { @@ -440,7 +412,7 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth { } -if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tsfebeuserauth.php']) { +if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tsfebeuserauth.php']) { include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tsfebeuserauth.php']); }