diff --git a/NEWS.txt b/NEWS.txt index ac1eb84e3e2d4b31937faf8e24856e05bf1de780..b33d2c5523b6c1c7552fe4cbc4412d376571b700 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -20,6 +20,13 @@ Deprecated methods that were initially targeted to be removed in TYPO3 4.8/6.0 have finally been removed. The deprecation log shows which functions were declared to be deprecated and will be removed in the next TYPO3 versions. +* Removed classes prior to scheduled deprecation removal + +t3lib_BEDisplayLog: This class was used only by the old belog module, its +functionality is now encapsulated in EXT:belog itself. Since it is very +unlikely that the class was used by other external extensions, the file was +removed instead of deprecating it. + Removed Functionality ------------------------------------------------------------------------------- diff --git a/t3lib/class.t3lib_bedisplaylog.php b/t3lib/class.t3lib_bedisplaylog.php deleted file mode 100644 index 95f93b04c3e2e7eae86307e5cf93b03133db7c8b..0000000000000000000000000000000000000000 --- a/t3lib/class.t3lib_bedisplaylog.php +++ /dev/null @@ -1,276 +0,0 @@ -<?php -/*************************************************************** - * Copyright notice - * - * (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com) - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * A copy is found in the textfile GPL.txt and important notices to the license - * from the author is found in LICENSE.txt distributed with these scripts. - * - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ -/** - * Contains class for display of backend log - * - * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj - * XHTML compliant - * - * @author Kasper Skårhøj <kasperYYYY@typo3.com> - */ - - -/** - * This class holds some functions used to display the sys_log table-content. - * Used in the status-scripts and the log-module. - * - * @author Kasper Skårhøj <kasperYYYY@typo3.com> - * @package TYPO3 - * @subpackage t3lib - * @see tx_belog_webinfo, SC_mod_tools_log_index - * @deprecated and unused since TYPO3 6.0, will be removed two versions later - */ -class t3lib_BEDisplayLog { - var $lastTimeLabel = ''; - var $lastUserLabel = ''; - var $lastTypeLabel = ''; - var $lastActionLabel = ''; - - var $detailsOn = 1; // If detailsOn, %s is substituted with values from the data-array (see getDetails()) - var $stripPath = 1; // This strips the path from any value in the data-array when the data-array is parsed through stripPath() - var $errorSign = Array( - 1 => '!', - 2 => 'Sys!', - 3 => 'Security!' - ); - var $wsArray = array( - 0 => 'LIVE', - ); - - var $be_user_Array = array(); // Username array (set externally) - - /** - * Default constructor logs deprecation - * - * @deprecated since TYPO3 6.0, will be removed in two versions. - */ - public function __construct() { - t3lib_div::logDeprecatedFunction(); - } - - /** - * Initialize the log table array with header labels. - * - * @return array - */ - function initArray() { - $codeArr = array(); - $codeArr[0][] = 'Error'; - $codeArr[0][] = 'Time'; // Time - $codeArr[0][] = 'User'; - $codeArr[0][] = 'Type'; - $codeArr[0][] = 'Action'; - $codeArr[0][] = 'Details'; - return $codeArr; - } - - /** - * Get time label for log listing - * - * @param integer Timestamp to display - * @return string If the timestamp was also shown last time, then "." is returned. Otherwise the new timestamp formatted with ->doc->formatTime() - */ - function getTimeLabel($code) { - #$t=$GLOBALS['SOBE']->doc->formatTime($code,1); - $t = date('H:i:s', $code); - - if ($this->lastTimeLabel != $t) { - $this->lastTimeLabel = $t; - return $t; - } else { - return '.'; - } - - } - - /** - * Get user name label for log listing - * - * @param integer be_user uid - * @param integer Workspace ID - * @return string If username is different from last username then the username, otherwise "." - */ - function getUserLabel($code, $workspace = 0) { - if ($this->lastUserLabel != $code . '_' . $workspace) { - $this->lastUserLabel = $code . '_' . $workspace; - $label = $this->be_user_Array[$code]['username']; - $ws = $this->wsArray[$workspace]; - return ($label ? htmlspecialchars($label) : '[' . $code . ']') . '@' . ($ws ? $ws : $workspace); - } else { - return '.'; - } - } - - /** - * Get type label for log listing - * - * @param string Key for the type label in locallang - * @return string If labe is different from last type label then the label is returned, otherwise "." - */ - function getTypeLabel($code) { - if ($this->lastTypeLabel != $code) { - $this->lastTypeLabel = $code; - $label = $GLOBALS['LANG']->getLL('type_' . $code); - return $label ? $label : '[' . $code . ']'; - } else { - return '.'; - } - } - - /** - * Get action label for log listing - * - * @param string Key for the action label in locallang - * @return string If label is different from last action label then the label is returned, otherwise "." - */ - function getActionLabel($code) { - if ($this->lastActionLabel != $code) { - $this->lastActionLabel = $code; - $label = $GLOBALS['LANG']->getLL('action_' . $code); - return $label ? htmlspecialchars($label) : '[' . $code . ']'; - } else { - return '.'; - } - } - - /** - * Get details for the log entry - * - * @param string Suffix to "msg_" to get label from locallang. - * @param string Details text - * @param array Data array - * @param integer sys_log uid number - * @return string Text string - * @see formatDetailsForList() - */ - function getDetails($code, $text, $data, $sys_log_uid = 0) { - // $code is used later on to substitute errormessages with language-corrected values... - if (is_array($data)) { - if ($this->detailsOn) { - if (is_object($GLOBALS['LANG'])) { - # $label = $GLOBALS['LANG']->getLL('msg_'.$code); - } else { - list($label) = explode(',', $text); - } - if ($label) { - $text = $label; - } - $text = sprintf($text, htmlspecialchars($data[0]), htmlspecialchars($data[1]), htmlspecialchars($data[2]), htmlspecialchars($data[3]), htmlspecialchars($data[4])); - } else { - $text = str_replace('%s', '', $text); - } - } - $text = htmlspecialchars($text); - - // Finding the history for the record - $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,fieldlist', 'sys_history', 'sys_log_uid=' . intval($sys_log_uid)); - $newRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res); - if (is_array($newRow)) { - $text .= ' ' . sprintf($GLOBALS['LANG']->getLL('changesInFields'), '<em>' . $newRow['fieldlist'] . '</em>'); - $text .= ' <a href="' . htmlspecialchars($GLOBALS['BACK_PATH'] . 'show_rechis.php?sh_uid=' . $newRow['uid'] . - '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '">' . - t3lib_iconWorks::getSpriteIcon( - 'actions-document-history-open', - array('title' => $GLOBALS['LANG']->getLL('showHistory')) - ) . - '</a>'; - } - - return $text; - } - - /** - * Reset all internal "last..." variables to blank string. - * - * @return void - */ - function reset() { - $this->lastTimeLabel = ''; - $this->lastUserLabel = ''; - $this->lastTypeLabel = ''; - $this->lastActionLabel = ''; - } - - /** - * Return the error icon - * - * @param int $error - * @return string - */ - function getErrorIcon($error = 0) { - return $GLOBALS['SOBE']->doc->icons($error >= 2 ? 3 : 2); - } - - /** - * Formats input string in red-colored font tags - * - * @param string Input value - * @param integer Error value - * @return string Input wrapped in red font-tag and bold - */ - function getErrorFormatting($sign, $error = 0) { - return $GLOBALS['SOBE']->doc->icons($error >= 2 ? 3 : 2) . ' ' . $sign; - } - - /** - * Formatting details text for the sys_log row inputted - * - * @param array sys_log row - * @return string Details string - */ - function formatDetailsForList($row) { - $data = unserialize($row['log_data']); - if ($row['type'] == 2) { - $data = $this->stripPath($data); - } - - return $this->getDetails($row['type'] . '_' . $row['action'] . '_' . $row['details_nr'], $row['details'], $data, $row['uid']) . ($row['details_nr'] > 0 ? ' (msg#' . $row['type'] . '.' . $row['action'] . '.' . $row['details_nr'] . ')' : ''); - } - - /** - * For all entries in the $inArray (expected to be filepaths) the basename is extracted and set as value (if $this->stripPath is set) - * This is done for log-entries from the FILE modules - * - * @param array Array of file paths - * @return array - * @see formatDetailsForList() - */ - function stripPath($inArr) { - if ($this->stripPath && is_array($inArr)) { - foreach ($inArr as $key => $val) { - $inArr[$key] = basename($val); - } - } - return $inArr; - } -} - - -if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_bedisplaylog.php'])) { - include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_bedisplaylog.php']); -} -?> diff --git a/t3lib/core_autoload.php b/t3lib/core_autoload.php index 5e3d562466358812317e902cc7c537ec460b1215..da69f03f5d863ee853715e141b2159e64e81f77f 100644 --- a/t3lib/core_autoload.php +++ b/t3lib/core_autoload.php @@ -15,7 +15,6 @@ $t3libClasses = array( 't3lib_arraybrowser' => PATH_t3lib . 'class.t3lib_arraybrowser.php', 't3lib_autoloader' => PATH_t3lib . 'class.t3lib_autoloader.php', 't3lib_basicfilefunctions' => PATH_t3lib . 'class.t3lib_basicfilefunc.php', - 't3lib_bedisplaylog' => PATH_t3lib . 'class.t3lib_bedisplaylog.php', 't3lib_befunc' => PATH_t3lib . 'class.t3lib_befunc.php', 't3lib_beuserauth' => PATH_t3lib . 'class.t3lib_beuserauth.php', 't3lib_browselinkshook' => PATH_t3lib . 'interfaces/interface.t3lib_browselinkshook.php', @@ -309,4 +308,4 @@ $t3libClasses = array( $tslibClasses = require(PATH_typo3 . 'sysext/cms/ext_autoload.php'); return array_merge($t3libClasses, $tslibClasses); -?> +?> \ No newline at end of file diff --git a/typo3/sysext/belog/Classes/ViewHelpers/FormatDetailsViewHelper.php b/typo3/sysext/belog/Classes/ViewHelpers/FormatDetailsViewHelper.php index 0894c0fc77ac934e0e05ff8b733b4f9e8e2f9d01..6e66c219b4f772301bd9562a3a1cac3f894a4812 100644 --- a/typo3/sysext/belog/Classes/ViewHelpers/FormatDetailsViewHelper.php +++ b/typo3/sysext/belog/Classes/ViewHelpers/FormatDetailsViewHelper.php @@ -41,8 +41,6 @@ class Tx_Belog_ViewHelpers_FormatDetailsViewHelper extends Tx_Fluid_Core_ViewHel * Furthermore, possible files in logData are stripped to their basename if * the action logged was a file action * - * This method was crafted from getDetails() of class t3lib_bedisplaylog. - * * @param Tx_Belog_Domain_Model_LogEntry $logEntry * @return string Formatted details */