From 3ddeb77639aff73b5cf8db258ab3e48668ef91c7 Mon Sep 17 00:00:00 2001 From: Wouter Wolters Date: Sun, 3 Jun 2012 22:02:29 +0200 Subject: [PATCH] [TASK] self:: is not used for local static member reference Replace local static member references with self:: Change-Id: I70624b19d67d96dedd05780c2162c4b68d7abc27 Resolves: #37721 Releases: 6.0 Reviewed-on: http://review.typo3.org/11816 Reviewed-by: Oliver Klee Tested-by: Oliver Klee Reviewed-by: Philipp Gampe Tested-by: Philipp Gampe Reviewed-by: Georg Ringer Tested-by: Georg Ringer --- t3lib/class.t3lib_befunc.php | 4 +- t3lib/class.t3lib_div.php | 26 ++++++------- t3lib/class.t3lib_extmgm.php | 6 +-- t3lib/class.t3lib_loaddbgroup.php | 2 +- t3lib/class.t3lib_page.php | 10 ++--- t3lib/class.t3lib_stdgraphic.php | 10 ++--- t3lib/class.t3lib_tsparser.php | 2 +- .../class.t3lib_tree_pagetree_commands.php | 2 +- .../sysext/cms/tslib/class.tslib_content.php | 4 +- .../sysext/cms/tslib/class.tslib_pagegen.php | 12 +++--- .../em/classes/tools/class.tx_em_tools.php | 4 +- .../classes/tools/class.tx_em_tools_unzip.php | 38 +++++++++---------- .../t3editor/classes/class.tx_t3editor.php | 32 ++++++++-------- 13 files changed, 76 insertions(+), 76 deletions(-) diff --git a/t3lib/class.t3lib_befunc.php b/t3lib/class.t3lib_befunc.php index f7e8bb1c1ac9..8aa7fea34687 100644 --- a/t3lib/class.t3lib_befunc.php +++ b/t3lib/class.t3lib_befunc.php @@ -785,7 +785,7 @@ final class t3lib_BEfunc { // Get field value from database if field is not in the $row array if (!isset($row[$pointerField])) { - $localRow = t3lib_BEfunc::getRecord($table, $row['uid'], $pointerField); + $localRow = self::getRecord($table, $row['uid'], $pointerField); $foreignUid = $localRow[$pointerField]; } else { $foreignUid = $row[$pointerField]; @@ -803,7 +803,7 @@ final class t3lib_BEfunc { throw new RuntimeException('TCA foreign field pointer fields are only allowed to be used with group or select field types.', 1325862240); } - $foreignRow = t3lib_BEfunc::getRecord($foreignTable, $foreignUid, $foreignTableTypeField); + $foreignRow = self::getRecord($foreignTable, $foreignUid, $foreignTableTypeField); if ($foreignRow[$foreignTableTypeField]) { $typeNum = $foreignRow[$foreignTableTypeField]; diff --git a/t3lib/class.t3lib_div.php b/t3lib/class.t3lib_div.php index f6e1ccb5dd70..c4ba074001a7 100644 --- a/t3lib/class.t3lib_div.php +++ b/t3lib/class.t3lib_div.php @@ -3996,11 +3996,11 @@ final class t3lib_div { * @deprecated since TYPO3 4.7 - will be removed in TYPO3 4.9 - use t3lib_cacheHash instead */ public static function cHashParams($addQueryParams) { - t3lib_div::logDeprecatedFunction(); + self::logDeprecatedFunction(); // Splitting parameters up $params = explode('&', substr($addQueryParams, 1)); /* @var $cacheHash t3lib_cacheHash */ - $cacheHash = t3lib_div::makeInstance('t3lib_cacheHash'); + $cacheHash = self::makeInstance('t3lib_cacheHash'); $pA = $cacheHash->getRelevantParameters($addQueryParams); // Hook: Allows to manipulate the parameters which are taken to build the chash: @@ -4028,12 +4028,12 @@ final class t3lib_div { * @param string $addQueryParams Query-parameters: "&xxx=yyy&zzz=uuu" * @return string Hash of all the values * @see t3lib_div::cHashParams(), t3lib_div::calculateCHash() - * @deprecated since TYPO3 4.7 - will be removed in TYPO3 4.9 - use t3lib_cacheHash instead + * @deprecated since TYPO3 4.7 - will be removed in TYPO3 6.1 - use t3lib_cacheHash instead */ public static function generateCHash($addQueryParams) { - t3lib_div::logDeprecatedFunction(); + self::logDeprecatedFunction(); /* @var $cacheHash t3lib_cacheHash */ - $cacheHash = t3lib_div::makeInstance('t3lib_cacheHash'); + $cacheHash = self::makeInstance('t3lib_cacheHash'); return $cacheHash->generateForParameters($addQueryParams); } @@ -4045,9 +4045,9 @@ final class t3lib_div { * @deprecated since TYPO3 4.7 - will be removed in TYPO3 4.9 - use t3lib_cacheHash instead */ public static function calculateCHash($params) { - t3lib_div::logDeprecatedFunction(); + self::logDeprecatedFunction(); /* @var $cacheHash t3lib_cacheHash */ - $cacheHash = t3lib_div::makeInstance('t3lib_cacheHash'); + $cacheHash = self::makeInstance('t3lib_cacheHash'); return $cacheHash->calculateCacheHash($params); } @@ -4088,7 +4088,7 @@ final class t3lib_div { */ public static function readLLfile($fileRef, $langKey, $charset = '', $errorMode = 0) { /** @var $languageFactory t3lib_l10n_Factory */ - $languageFactory = t3lib_div::makeInstance('t3lib_l10n_Factory'); + $languageFactory = self::makeInstance('t3lib_l10n_Factory'); return $languageFactory->getParsedData($fileRef, $langKey, $charset, $errorMode); } @@ -4465,7 +4465,7 @@ final class t3lib_div { ) { $validPrefixes = array_merge( $validPrefixes, - t3lib_div::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['SYS']['additionalAllowedClassPrefixes']) + self::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['SYS']['additionalAllowedClassPrefixes']) ); } return $validPrefixes; @@ -5131,7 +5131,7 @@ final class t3lib_div { // Write message to a file if ($type == 'file') { - $lockObject = t3lib_div::makeInstance('t3lib_lock', $destination, $GLOBALS['TYPO3_CONF_VARS']['SYS']['lockingMode']); + $lockObject = self::makeInstance('t3lib_lock', $destination, $GLOBALS['TYPO3_CONF_VARS']['SYS']['lockingMode']); /** @var t3lib_lock $lockObject */ $lockObject->setEnableLogging(FALSE); $lockObject->acquire(); @@ -5146,11 +5146,11 @@ final class t3lib_div { // Send message per mail elseif ($type == 'mail') { list($to, $from) = explode('/', $destination); - if (!t3lib_div::validEmail($from)) { + if (!self::validEmail($from)) { $from = t3lib_utility_Mail::getSystemFrom(); } /** @var $mail t3lib_mail_Message */ - $mail = t3lib_div::makeInstance('t3lib_mail_Message'); + $mail = self::makeInstance('t3lib_mail_Message'); $mail->setTo($to) ->setFrom($from) ->setSubject('Warning - error in TYPO3 installation') @@ -5223,7 +5223,7 @@ final class t3lib_div { } // Write a longer message to the deprecation log $destination = self::getDeprecationLogFileName(); - $lockObject = t3lib_div::makeInstance('t3lib_lock', $destination, $GLOBALS['TYPO3_CONF_VARS']['SYS']['lockingMode']); + $lockObject = self::makeInstance('t3lib_lock', $destination, $GLOBALS['TYPO3_CONF_VARS']['SYS']['lockingMode']); /** @var t3lib_lock $lockObject */ $lockObject->setEnableLogging(FALSE); $lockObject->acquire(); diff --git a/t3lib/class.t3lib_extmgm.php b/t3lib/class.t3lib_extmgm.php index 69fe62924871..938fef26f555 100644 --- a/t3lib/class.t3lib_extmgm.php +++ b/t3lib/class.t3lib_extmgm.php @@ -827,7 +827,7 @@ final class t3lib_extMgm { 'access' => 'admin', 'icon' => 'gfx/typo3.png', 'labels' => '', - 'extRelPath' => t3lib_extMgm::extRelPath($extensionKey) . 'Classes/' + 'extRelPath' => self::extRelPath($extensionKey) . 'Classes/' ); // Add mandatory parameter to use new pagetree @@ -850,7 +850,7 @@ final class t3lib_extMgm { $GLOBALS['TBE_MODULES']['_configuration'][$moduleSignature] = $moduleConfiguration; - t3lib_extMgm::addModule($mainModuleName, $subModuleName, $position); + self::addModule($mainModuleName, $subModuleName, $position); } /** @@ -869,7 +869,7 @@ final class t3lib_extMgm { $iconPathAndFilename = $moduleConfiguration['icon']; if (substr($iconPathAndFilename, 0, 4) === 'EXT:') { list($extensionKey, $relativePath) = explode('/', substr($iconPathAndFilename, 4), 2); - $iconPathAndFilename = t3lib_extMgm::extPath($extensionKey) . $relativePath; + $iconPathAndFilename = self::extPath($extensionKey) . $relativePath; } // TODO: skin support diff --git a/t3lib/class.t3lib_loaddbgroup.php b/t3lib/class.t3lib_loaddbgroup.php index 1d6dec7cfd15..86c0b1cf09ff 100644 --- a/t3lib/class.t3lib_loaddbgroup.php +++ b/t3lib/class.t3lib_loaddbgroup.php @@ -663,7 +663,7 @@ class t3lib_loadDBGroup { $row = t3lib_BEfunc::getRecord($table, $uid, $fields, '', FALSE); } if ($symmetric_field) { - $isOnSymmetricSide = t3lib_loadDBGroup::isOnSymmetricSide($parentUid, $conf, $row); + $isOnSymmetricSide = self::isOnSymmetricSide($parentUid, $conf, $row); } $updateValues = $foreign_match_fields; diff --git a/t3lib/class.t3lib_page.php b/t3lib/class.t3lib_page.php index de1f7275fce3..4136c14ddbd3 100644 --- a/t3lib/class.t3lib_page.php +++ b/t3lib/class.t3lib_page.php @@ -470,7 +470,7 @@ class t3lib_pageSelect { } // If shortcut, look up if the target exists and is currently visible - if ($row['doktype'] == t3lib_pageSelect::DOKTYPE_SHORTCUT && ($row['shortcut'] || $row['shortcut_mode']) && $checkShortcuts) { + if ($row['doktype'] == self::DOKTYPE_SHORTCUT && ($row['shortcut'] || $row['shortcut_mode']) && $checkShortcuts) { if ($row['shortcut_mode'] == self::SHORTCUT_MODE_NONE) { // No shortcut_mode set, so target is directly set in $row['shortcut'] $searchField = 'uid'; @@ -496,7 +496,7 @@ class t3lib_pageSelect { if (!$count) { unset($row); } - } elseif ($row['doktype'] == t3lib_pageSelect::DOKTYPE_SHORTCUT && $checkShortcuts) { + } elseif ($row['doktype'] == self::DOKTYPE_SHORTCUT && $checkShortcuts) { // Neither shortcut target nor mode is set. Remove the page from the menu. unset($row); } @@ -613,7 +613,7 @@ class t3lib_pageSelect { if (is_array($row)) { // Mount Point page types are allowed ONLY a) if they are the outermost record in rootline and b) if the overlay flag is not set: - if ($GLOBALS['TYPO3_CONF_VARS']['FE']['enable_mount_pids'] && $row['doktype'] == t3lib_pageSelect::DOKTYPE_MOUNTPOINT && !$ignoreMPerrors) { + if ($GLOBALS['TYPO3_CONF_VARS']['FE']['enable_mount_pids'] && $row['doktype'] == self::DOKTYPE_MOUNTPOINT && !$ignoreMPerrors) { $mount_info = $this->getMountPointInfo($row['uid'], $row); if ($loopCheck > 0 || $mount_info['overlay']) { $this->error_getRootLine = 'Illegal Mount Point found in rootline'; @@ -738,7 +738,7 @@ class t3lib_pageSelect { * @see tslib_fe::setExternalJumpUrl() */ function getExtURL($pagerow, $disable = 0) { - if ($pagerow['doktype'] == t3lib_pageSelect::DOKTYPE_LINK && !$disable) { + if ($pagerow['doktype'] == self::DOKTYPE_LINK && !$disable) { $redirectTo = $this->urltypes[$pagerow['urltype']] . $pagerow['url']; // If relative path, prefix Site URL: @@ -787,7 +787,7 @@ class t3lib_pageSelect { // Look for mount pid value plus other required circumstances: $mount_pid = intval($pageRec['mount_pid']); - if (is_array($pageRec) && $pageRec['doktype'] == t3lib_pageSelect::DOKTYPE_MOUNTPOINT && $mount_pid > 0 && !in_array($mount_pid, $prevMountPids)) { + if (is_array($pageRec) && $pageRec['doktype'] == self::DOKTYPE_MOUNTPOINT && $mount_pid > 0 && !in_array($mount_pid, $prevMountPids)) { // Get the mount point record (to verify its general existence): $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,pid,doktype,mount_pid,mount_pid_ol,t3ver_state', 'pages', 'uid=' . $mount_pid . ' AND pages.deleted=0 AND pages.doktype<>255'); diff --git a/t3lib/class.t3lib_stdgraphic.php b/t3lib/class.t3lib_stdgraphic.php index c8b7beb0b2bf..bc0ad87db1ce 100644 --- a/t3lib/class.t3lib_stdgraphic.php +++ b/t3lib/class.t3lib_stdgraphic.php @@ -516,7 +516,7 @@ class t3lib_stdGraphic { for ($a = 0; $a < $conf['iterations']; $a++) { // If any kind of spacing applys, we use this function: if ($spacing || $wordSpacing) { - $this->SpacedImageTTFText($im, $conf['fontSize'], $conf['angle'], $txtPos[0], $txtPos[1], $Fcolor, t3lib_stdGraphic::prependAbsolutePath($conf['fontFile']), $theText, $spacing, $wordSpacing, $conf['splitRendering.']); + $this->SpacedImageTTFText($im, $conf['fontSize'], $conf['angle'], $txtPos[0], $txtPos[1], $Fcolor, self::prependAbsolutePath($conf['fontFile']), $theText, $spacing, $wordSpacing, $conf['splitRendering.']); } else { $this->renderTTFText($im, $conf['fontSize'], $conf['angle'], $txtPos[0], $txtPos[1], $Fcolor, $conf['fontFile'], $theText, $conf['splitRendering.'], $conf); } @@ -542,7 +542,7 @@ class t3lib_stdGraphic { $Fcolor = ImageColorAllocate($maskImg, 0, 0, 0); // If any kind of spacing applys, we use this function: if ($spacing || $wordSpacing) { - $this->SpacedImageTTFText($maskImg, $conf['fontSize'], $conf['angle'], $txtPos[0], $txtPos[1], $Fcolor, t3lib_stdGraphic::prependAbsolutePath($conf['fontFile']), $theText, $spacing, $wordSpacing, $conf['splitRendering.'], $sF); + $this->SpacedImageTTFText($maskImg, $conf['fontSize'], $conf['angle'], $txtPos[0], $txtPos[1], $Fcolor, self::prependAbsolutePath($conf['fontFile']), $theText, $spacing, $wordSpacing, $conf['splitRendering.'], $sF); } else { $this->renderTTFText($maskImg, $conf['fontSize'], $conf['angle'], $txtPos[0], $txtPos[1], $Fcolor, $conf['fontFile'], $theText, $conf['splitRendering.'], $conf, $sF); } @@ -898,7 +898,7 @@ class t3lib_stdGraphic { // Traverse string parts: foreach ($stringParts as $strCfg) { - $fontFile = t3lib_stdGraphic::prependAbsolutePath($strCfg['fontFile']); + $fontFile = self::prependAbsolutePath($strCfg['fontFile']); if (is_readable($fontFile)) { /** @@ -977,14 +977,14 @@ class t3lib_stdGraphic { $y -= intval($strCfg['ySpaceBefore']); } - $fontFile = t3lib_stdGraphic::prependAbsolutePath($strCfg['fontFile']); + $fontFile = self::prependAbsolutePath($strCfg['fontFile']); if (is_readable($fontFile)) { // Render part: ImageTTFText($im, t3lib_div::freetypeDpiComp($sF * $strCfg['fontSize']), $angle, $x, $y, $colorIndex, $fontFile, $strCfg['str']); // Calculate offset to apply: - $wordInf = ImageTTFBBox(t3lib_div::freetypeDpiComp($sF * $strCfg['fontSize']), $angle, t3lib_stdGraphic::prependAbsolutePath($strCfg['fontFile']), $strCfg['str']); + $wordInf = ImageTTFBBox(t3lib_div::freetypeDpiComp($sF * $strCfg['fontSize']), $angle, self::prependAbsolutePath($strCfg['fontFile']), $strCfg['str']); $x += $wordInf[2] - $wordInf[0] + intval($splitRendering['compX']) + intval($strCfg['xSpaceAfter']); $y += $wordInf[5] - $wordInf[7] - intval($splitRendering['compY']) - intval($strCfg['ySpaceAfter']); diff --git a/t3lib/class.t3lib_tsparser.php b/t3lib/class.t3lib_tsparser.php index fac573e884b6..95526d423114 100644 --- a/t3lib/class.t3lib_tsparser.php +++ b/t3lib/class.t3lib_tsparser.php @@ -784,7 +784,7 @@ class t3lib_TSparser { */ public static function extractIncludes_array($array) { foreach ($array as $k => $v) { - $array[$k] = t3lib_TSparser::extractIncludes($array[$k]); + $array[$k] = self::extractIncludes($array[$k]); } return $array; } diff --git a/t3lib/tree/pagetree/class.t3lib_tree_pagetree_commands.php b/t3lib/tree/pagetree/class.t3lib_tree_pagetree_commands.php index 921439a86616..6cea6b24b21e 100644 --- a/t3lib/tree/pagetree/class.t3lib_tree_pagetree_commands.php +++ b/t3lib/tree/pagetree/class.t3lib_tree_pagetree_commands.php @@ -257,7 +257,7 @@ final class t3lib_tree_pagetree_Commands { $path = array(); foreach ($rootline as $rootlineElement) { - $record = t3lib_tree_pagetree_Commands::getNodeRecord($rootlineElement['uid']); + $record = self::getNodeRecord($rootlineElement['uid']); $text = $record['title']; if (self::$useNavTitle && trim($record['nav_title']) !== '') { diff --git a/typo3/sysext/cms/tslib/class.tslib_content.php b/typo3/sysext/cms/tslib/class.tslib_content.php index a9688f8f261b..de133c25424e 100644 --- a/typo3/sysext/cms/tslib/class.tslib_content.php +++ b/typo3/sysext/cms/tslib/class.tslib_content.php @@ -4304,7 +4304,7 @@ class tslib_cObj { function calcIntExplode($delim, $string) { $temp = explode($delim, $string); foreach ($temp as $key => $val) { - $temp[$key] = intval(tslib_cObj::calc($val)); + $temp[$key] = intval(self::calc($val)); } return $temp; } @@ -7438,7 +7438,7 @@ class tslib_cObj { } // Call recursively, if the id is not in prevID_array: if (!in_array($next_id, $prevId_array)) { - $theList .= tslib_cObj::getTreeList( + $theList .= self::getTreeList( $next_id, $depth - 1, $begin - 1, diff --git a/typo3/sysext/cms/tslib/class.tslib_pagegen.php b/typo3/sysext/cms/tslib/class.tslib_pagegen.php index e4e099b2e163..d8cf5b7d9ae1 100644 --- a/typo3/sysext/cms/tslib/class.tslib_pagegen.php +++ b/typo3/sysext/cms/tslib/class.tslib_pagegen.php @@ -267,7 +267,7 @@ class TSpagegen { if ($GLOBALS['TSFE']->config['config']['disableAllHeaderCode']) { $GLOBALS['TSFE']->content = $pageContent; } else { - TSpagegen::renderContentWithHeader($pageContent); + self::renderContentWithHeader($pageContent); } $GLOBALS['TT']->pull($GLOBALS['TT']->LR?$GLOBALS['TSFE']->content:''); $GLOBALS['TT']->decStackPointer(); @@ -483,7 +483,7 @@ class TSpagegen { } if (count($temp_styleLines)) { if ($GLOBALS['TSFE']->config['config']['inlineStyle2TempFile']) { - $pageRenderer->addCssFile(TSpagegen::inline2TempFile(implode(LF, $temp_styleLines), 'css')); + $pageRenderer->addCssFile(self::inline2TempFile(implode(LF, $temp_styleLines), 'css')); } else { $pageRenderer->addCssInlineBlock('TSFEinlineStyle', implode(LF, $temp_styleLines)); } @@ -593,7 +593,7 @@ class TSpagegen { if (trim($style)) { if ($GLOBALS['TSFE']->config['config']['inlineStyle2TempFile']) { - $pageRenderer->addCssFile(TSpagegen::inline2TempFile($style, 'css')); + $pageRenderer->addCssFile(self::inline2TempFile($style, 'css')); } else { $pageRenderer->addCssInlineBlock('additionalTSFEInlineStyle', $style); } @@ -809,7 +809,7 @@ class TSpagegen { } else { $GLOBALS['TSFE']->INTincScript_loadJSCode(); } - $JSef = TSpagegen::JSeventFunctions(); + $JSef = self::JSeventFunctions(); // Adding default Java Script: $scriptJsCode = ' @@ -932,7 +932,7 @@ class TSpagegen { if ($inlineJSint) { $pageRenderer->addJsInlineCode('TS_inlineJSint', $inlineJSint, $GLOBALS['TSFE']->config['config']['compressJs']); } - $pageRenderer->addJsFile(TSpagegen::inline2TempFile($scriptJsCode . $inlineJS, 'js'), 'text/javascript', $GLOBALS['TSFE']->config['config']['compressJs']); + $pageRenderer->addJsFile(self::inline2TempFile($scriptJsCode . $inlineJS, 'js'), 'text/javascript', $GLOBALS['TSFE']->config['config']['compressJs']); if ($inlineFooterJs) { $inlineFooterJSint = ''; @@ -940,7 +940,7 @@ class TSpagegen { if ($inlineFooterJSint) { $pageRenderer->addJsFooterInlineCode('TS_inlineFooterJSint', $inlineFooterJSint, $GLOBALS['TSFE']->config['config']['compressJs']); } - $pageRenderer->addJsFooterFile(TSpagegen::inline2TempFile($inlineFooterJs, 'js'), 'text/javascript', $GLOBALS['TSFE']->config['config']['compressJs']); + $pageRenderer->addJsFooterFile(self::inline2TempFile($inlineFooterJs, 'js'), 'text/javascript', $GLOBALS['TSFE']->config['config']['compressJs']); } } else { // include only inlineJS diff --git a/typo3/sysext/em/classes/tools/class.tx_em_tools.php b/typo3/sysext/em/classes/tools/class.tx_em_tools.php index 292abde4b0da..10d2aaabf795 100644 --- a/typo3/sysext/em/classes/tools/class.tx_em_tools.php +++ b/typo3/sysext/em/classes/tools/class.tx_em_tools.php @@ -901,7 +901,7 @@ final class tx_em_Tools { $out['NSerrors']['classfilename'][] = $baseName; } else { $out['NSok']['classfilename'][] = $baseName; - if (is_array($out['files'][$fileName]['classes']) && tx_em_Tools::first_in_array($testName, $out['files'][$fileName]['classes'], 1)) { + if (is_array($out['files'][$fileName]['classes']) && self::first_in_array($testName, $out['files'][$fileName]['classes'], 1)) { $out['msg'][] = sprintf($GLOBALS['LANG']->getLL('detailedExtAnalysis_class_ok'), $fileName, $testName ); @@ -941,7 +941,7 @@ final class tx_em_Tools { } else { $out['errors'][] = sprintf($GLOBALS['LANG']->getLL('detailedExtAnalysis_no_xclass_filename'), $fileName); } - } elseif (!tx_em_Tools::first_in_array('ux_', $out['files'][$fileName]['classes'])) { + } elseif (!self::first_in_array('ux_', $out['files'][$fileName]['classes'])) { // No Xclass definition required if classname starts with 'ux_' $out['errors'][] = sprintf($GLOBALS['LANG']->getLL('detailedExtAnalysis_no_xclass_found'), $fileName); } diff --git a/typo3/sysext/em/classes/tools/class.tx_em_tools_unzip.php b/typo3/sysext/em/classes/tools/class.tx_em_tools_unzip.php index e6f006442988..d6a749f77710 100644 --- a/typo3/sysext/em/classes/tools/class.tx_em_tools_unzip.php +++ b/typo3/sysext/em/classes/tools/class.tx_em_tools_unzip.php @@ -294,7 +294,7 @@ class tx_em_Tools_Unzip { /** - * tx_em_Tools_Unzip::_openFd() + * self::_openFd() * * { Description } * @@ -306,7 +306,7 @@ class tx_em_Tools_Unzip { if ($this->_zip_fd != 0) { $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Zip file \'' . $this->_zipname . '\' already open'); - return tx_em_Tools_Unzip::errorCode(); + return self::errorCode(); } // Open the zip file @@ -314,7 +314,7 @@ class tx_em_Tools_Unzip { $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \'' . $this->_zipname . '\' in ' . $p_mode . ' mode'); - return tx_em_Tools_Unzip::errorCode(); + return self::errorCode(); } // Return @@ -436,7 +436,7 @@ class tx_em_Tools_Unzip { $this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); - return tx_em_Tools_Unzip::errorCode(); + return self::errorCode(); } // Read the file header @@ -464,7 +464,7 @@ class tx_em_Tools_Unzip { $this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); // Return - return tx_em_Tools_Unzip::errorCode(); + return self::errorCode(); } // Extracting the file @@ -737,7 +737,7 @@ class tx_em_Tools_Unzip { $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Invalid archive structure'); // Return - return tx_em_Tools_Unzip::errorCode(); + return self::errorCode(); } // Read the first 42 bytes of the header @@ -752,7 +752,7 @@ class tx_em_Tools_Unzip { $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, "Invalid block size : " . strlen($v_binary_data)); // Return - return tx_em_Tools_Unzip::errorCode(); + return self::errorCode(); } // Extract the values @@ -829,7 +829,7 @@ class tx_em_Tools_Unzip { $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Invalid archive structure'); // Return - return tx_em_Tools_Unzip::errorCode(); + return self::errorCode(); } // Read the first 42 bytes of the header @@ -844,7 +844,7 @@ class tx_em_Tools_Unzip { $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, "Invalid block size : " . strlen($v_binary_data)); // Return - return tx_em_Tools_Unzip::errorCode(); + return self::errorCode(); } // Extract the values @@ -930,7 +930,7 @@ class tx_em_Tools_Unzip { $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \'' . $this->_zipname . '\''); - return tx_em_Tools_Unzip::errorCode(); + return self::errorCode(); } // First try : look if this is an archive with no commentaries @@ -943,7 +943,7 @@ class tx_em_Tools_Unzip { $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \'' . $this->_zipname . '\''); - return tx_em_Tools_Unzip::errorCode(); + return self::errorCode(); } // Read for bytes @@ -969,7 +969,7 @@ class tx_em_Tools_Unzip { $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \'' . $this->_zipname . '\''); - return tx_em_Tools_Unzip::errorCode(); + return self::errorCode(); } // Read byte per byte in order to find the signature @@ -995,7 +995,7 @@ class tx_em_Tools_Unzip { if ($v_pos == $v_size) { $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, "Unable to find End of Central Dir Record signature"); - return tx_em_Tools_Unzip::errorCode(); + return self::errorCode(); } } @@ -1007,7 +1007,7 @@ class tx_em_Tools_Unzip { $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, "Invalid End of Central Dir Record size : " . strlen($v_binary_data)); - return tx_em_Tools_Unzip::errorCode(); + return self::errorCode(); } // Extract the values @@ -1017,7 +1017,7 @@ class tx_em_Tools_Unzip { if (($v_pos + $v_data['comment_size'] + 18) != $v_size) { $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, "Fail to find the right signature"); - return tx_em_Tools_Unzip::errorCode(); + return self::errorCode(); } // Get comment @@ -1077,7 +1077,7 @@ class tx_em_Tools_Unzip { if (!@mkdir($p_dir, 0777)) { $this->_errorLog(ARCHIVE_ZIP_ERR_DIR_CREATE_FAIL, 'Unable to create directory "' . $p_dir . '"'); - return tx_em_Tools_Unzip::errorCode(); + return self::errorCode(); } // Return @@ -1098,7 +1098,7 @@ class tx_em_Tools_Unzip { if (!is_array($p_params)) { $this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_PARAMETER, 'Unsupported parameter, waiting for an array'); - return tx_em_Tools_Unzip::errorCode(); + return self::errorCode(); } // Check that all the params are valid @@ -1107,7 +1107,7 @@ class tx_em_Tools_Unzip { $this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_PARAMETER, 'Unsupported parameter with key \'' . $v_key . '\''); - return tx_em_Tools_Unzip::errorCode(); + return self::errorCode(); } } @@ -1129,7 +1129,7 @@ class tx_em_Tools_Unzip { "Callback '" . $p_params[$v_key] . "()' is not an existing function for " . "parameter '" . $v_key . "'"); - return tx_em_Tools_Unzip::errorCode(); + return self::errorCode(); } } } diff --git a/typo3/sysext/t3editor/classes/class.tx_t3editor.php b/typo3/sysext/t3editor/classes/class.tx_t3editor.php index 0fa36d2c7ce8..9578fe77ddc9 100644 --- a/typo3/sysext/t3editor/classes/class.tx_t3editor.php +++ b/typo3/sysext/t3editor/classes/class.tx_t3editor.php @@ -241,33 +241,33 @@ class tx_t3editor implements t3lib_Singleton { */ protected function getParserfileByMode($mode) { switch ($mode) { - case tx_t3editor::MODE_TYPOSCRIPT: + case self::MODE_TYPOSCRIPT: $relPath = ($GLOBALS['BACK_PATH'] ? $GLOBALS['BACK_PATH'] : '../../../' ) . t3lib_extmgm::extRelPath('t3editor') . 'res/jslib/parse_typoscript/'; $parserfile = '["' . $relPath . 'tokenizetyposcript.js", "' . $relPath . 'parsetyposcript.js"]'; break; - case tx_t3editor::MODE_JAVASCRIPT: + case self::MODE_JAVASCRIPT: $parserfile = '["tokenizejavascript.js", "parsejavascript.js"]'; break; - case tx_t3editor::MODE_CSS: + case self::MODE_CSS: $parserfile = '"parsecss.js"'; break; - case tx_t3editor::MODE_XML: + case self::MODE_XML: $parserfile = '"parsexml.js"'; break; - case tx_t3editor::MODE_SPARQL: + case self::MODE_SPARQL: $parserfile = '"parsesparql.js"'; break; - case tx_t3editor::MODE_HTML: + case self::MODE_HTML: $parserfile = '["tokenizejavascript.js", "parsejavascript.js", "parsecss.js", "parsexml.js", "parsehtmlmixed.js"]'; break; - case tx_t3editor::MODE_PHP: - case tx_t3editor::MODE_MIXED: + case self::MODE_PHP: + case self::MODE_MIXED: $parserfile = '[' . '"tokenizejavascript.js", ' . '"parsejavascript.js", ' . @@ -290,37 +290,37 @@ class tx_t3editor implements t3lib_Singleton { */ protected function getStylesheetByMode($mode) { switch ($mode) { - case tx_t3editor::MODE_TYPOSCRIPT: + case self::MODE_TYPOSCRIPT: $stylesheet = 'T3editor.PATH_t3e + "res/css/typoscriptcolors.css"'; break; - case tx_t3editor::MODE_JAVASCRIPT: + case self::MODE_JAVASCRIPT: $stylesheet = 'T3editor.PATH_codemirror + "../css/jscolors.css"'; break; - case tx_t3editor::MODE_CSS: + case self::MODE_CSS: $stylesheet = 'T3editor.PATH_codemirror + "../css/csscolors.css"'; break; - case tx_t3editor::MODE_XML: + case self::MODE_XML: $stylesheet = 'T3editor.PATH_codemirror + "../css/xmlcolors.css"'; break; - case tx_t3editor::MODE_HTML: + case self::MODE_HTML: $stylesheet = 'T3editor.PATH_codemirror + "../css/xmlcolors.css", ' . 'T3editor.PATH_codemirror + "../css/jscolors.css", ' . 'T3editor.PATH_codemirror + "../css/csscolors.css"'; break; - case tx_t3editor::MODE_SPARQL: + case self::MODE_SPARQL: $stylesheet = 'T3editor.PATH_codemirror + "../css/sparqlcolors.css"'; break; - case tx_t3editor::MODE_PHP: + case self::MODE_PHP: $stylesheet = 'T3editor.PATH_codemirror + "../contrib/php/css/phpcolors.css"'; break; - case tx_t3editor::MODE_MIXED: + case self::MODE_MIXED: $stylesheet = 'T3editor.PATH_codemirror + "../css/xmlcolors.css", ' . 'T3editor.PATH_codemirror + "../css/jscolors.css", ' . 'T3editor.PATH_codemirror + "../css/csscolors.css", ' . -- 2.20.1