Index: t3lib/core_autoload.php =================================================================== --- t3lib/core_autoload.php (revision 8055) +++ t3lib/core_autoload.php (working copy) @@ -4,7 +4,6 @@ return array( - 'gzip_encode' => PATH_t3lib . 'class.gzip_encode.php', 't3lib_admin' => PATH_t3lib . 'class.t3lib_admin.php', 't3lib_ajax' => PATH_t3lib . 'class.t3lib_ajax.php', 't3lib_arraybrowser' => PATH_t3lib . 'class.t3lib_arraybrowser.php', Index: typo3/sysext/cms/tslib/class.tslib_content.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_content.php (revision 8055) +++ typo3/sysext/cms/tslib/class.tslib_content.php (working copy) @@ -6787,20 +6787,6 @@ return $newVal; } - /** - * Formats a number to GB, Mb or Kb or just bytes - * - * @param integer Number of bytes to format. - * @param string Labels for bytes, kilo, mega and giga separated by vertical bar (|) and possibly encapsulated in "". Eg: " | K| M| G" (which is the default value) - * @return string - * @see t3lib_div::formatSize(), stdWrap() - * @deprecated since TYPO3 3.6 - Use t3lib_div::formatSize() instead - */ - function bytes($sizeInBytes,$labels) { - t3lib_div::logDeprecatedFunction(); - - return t3lib_div::formatSize($sizeInBytes,$labels); - } /** * Returns the 'age' of the tstamp $seconds @@ -6876,19 +6862,6 @@ } } - /** - * Checking syntax of input email address - * - * @param string Input string to evaluate - * @return boolean Returns true if the $email address (input string) is valid; Has a "@", domain name with at least one period and only allowed a-z characters. - * @see t3lib_div::validEmail() - * @deprecated since TYPO3 3.6 - Use t3lib_div::validEmail() instead - */ - function checkEmail($email) { - t3lib_div::logDeprecatedFunction(); - - return t3lib_div::validEmail($email); - } /** * Clears TypoScript properties listed in $propList from the input TypoScript array. Index: typo3/sysext/indexed_search/class.indexer.php =================================================================== --- typo3/sysext/indexed_search/class.indexer.php (revision 8055) +++ typo3/sysext/indexed_search/class.indexer.php (working copy) @@ -1339,19 +1339,6 @@ return $contentArr; } - /** - * Processing words in the array from split*Content -functions - * This function is only a wrapper because the function has been removed (see above). - * - * @param array Array of content to index, see splitHTMLContent() and splitRegularContent() - * @return array Content input array modified so each key is not a unique array of words - * @deprecated since TYPO3 4.0, this function will be removed in TYPO3 4.5. - */ - function procesWordsInArrays($contentArr) { - t3lib_div::logDeprecatedFunction(); - - return $this->processWordsInArrays($contentArr); - } /** * Extracts the sample description text from the content array. @@ -2138,23 +2125,6 @@ return hexdec(substr(md5($str),0,7)); } - /** - * Calculates the cHash value of input GET array (for constructing cHash values if needed) - * - * @param array Array of GET parameters to encode - * @return void - * @deprecated since TYPO3 4.3, this function will be removed in TYPO3 4.5, use directly t3lib_div::calculateCHash() - */ - function makeCHash($paramArray) { - t3lib_div::logDeprecatedFunction(); - - $addQueryParams = t3lib_div::implodeArrayForUrl('', $paramArray); - - $pA = t3lib_div::cHashParams($addQueryParams); - - return t3lib_div::shortMD5(serialize($pA)); - } - @@ -2218,21 +2188,6 @@ **************************/ /** - * Frontend hook: If the page is not being re-generated this is our chance to force it to be (because re-generation of the page is required in order to have the indexer called!) - * - * @param array Parameters from frontend - * @param object TSFE object (reference under PHP5) - * @return void - * @deprecated since TYPO3 4.3, this function will be removed in TYPO3 4.5, the method was extracted to hooks/class.tx_indexedsearch_tslib_fe_hook.php - */ - function fe_headerNoCache(&$params, $ref) { - t3lib_div::logDeprecatedFunction(); - - require_once t3lib_extMgm::extPath('indexed_search') . 'hooks/class.tx_indexedsearch_tslib_fe_hook.php'; - t3lib_div::makeInstance('tx_indexedsearch_tslib_fe_hook')->headerNoCache($params, $ref); - } - - /** * Makes sure that keywords are space-separated. This is impotant for their * proper displaying as a part of fulltext index. * Index: t3lib/class.t3lib_tstemplate.php =================================================================== --- t3lib/class.t3lib_tstemplate.php (revision 8055) +++ t3lib/class.t3lib_tstemplate.php (working copy) @@ -1294,24 +1294,6 @@ return $outFile; } - /** - * CheckFile runs through the $menuArr and checks every file-reference in $name - * (Not used anywhere) - * - * @param string Property name in the menu array - * @param array Menu array to traverse - * @return array Modified menu array - * @deprecated since TYPO3 3.6, this function will be removed in TYPO3 4.5. - * @internal - */ - function checkFile($name,$menuArr) { - t3lib_div::logDeprecatedFunction(); - - foreach ($menuArr as $aKey => $value) { - $menuArr[$aKey][$name] = $this->getFileName($menuArr[$aKey][$name]); - } - return $menuArr; - } /** * Compiles the content for the page tag. Index: typo3/sysext/cms/tslib/class.tslib_fe.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_fe.php (revision 8055) +++ typo3/sysext/cms/tslib/class.tslib_fe.php (working copy) @@ -467,18 +467,6 @@ } } - /** - * Connect to MySQL database - * May exit after outputting an error message or some JavaScript redirecting to the install tool. - * - * @return void - * @deprecated since TYPO3 3.8, this function will be removed in TYPO3 4.5, use connectToDB() instead! - */ - function connectToMySQL() { - t3lib_div::logDeprecatedFunction(); - - $this->connectToDB(); - } /** * Connect to SQL database @@ -3976,63 +3964,6 @@ } } - /** - * Processes a query-string with GET-parameters and returns two strings, one with the parameters that CAN be encoded and one array with those which can't be encoded (encoded by the M5 or B6 methods) - * - * @param string Query string to analyse - * @return array Two num keys returned, first is the parameters that MAY be encoded, second is the non-encodable parameters. - * @see makeSimulFileName(), t3lib_tstemplate::linkData() - * @deprecated since TYPO3 4.3, will be removed in TYPO3 4.5, please use the "simulatestatic" sysext directly - */ - function simulateStaticDocuments_pEnc_onlyP_proc($linkVars) { - t3lib_div::logDeprecatedFunction(); - - if (t3lib_extMgm::isLoaded('simulatestatic')) { - return t3lib_div::callUserFunction( - 'EXT:simulatestatic/class.tx_simulatestatic.php:&tx_simulatestatic->processEncodedQueryString', - $linkVars, - $this - ); - } else { - return false; - } - } - - /** - * Returns the simulated static file name (*.html) for the current page (using the page record in $this->page) - * - * @return string The filename (without path) - * @see makeSimulFileName(), publish.php - * @deprecated since TYPO3 4.3, will be removed in TYPO3 4.5, please use the "simulatestatic" sysext directly - * @todo Deprecated but still used in the Core! - */ - function getSimulFileName() { - return $this->makeSimulFileName( - $this->page['title'], - ($this->page['alias'] ? $this->page['alias'] : $this->id), - $this->type - ) . '.html'; - } - - /** - * Checks and sets replacement character for simulateStaticDocuments. Default is underscore. - * - * @return void - * @deprecated since TYPO3 4.3, will be removed in TYPO3 4.5, please use the "simulatestatic" sysext directly - */ - function setSimulReplacementChar() { - t3lib_div::logDeprecatedFunction(); - - $replacement = $defChar = t3lib_div::compat_version('4.0') ? '-' : '_'; - if (isset($this->config['config']['simulateStaticDocuments_replacementChar'])) { - $replacement = trim($this->config['config']['simulateStaticDocuments_replacementChar']); - if (urlencode($replacement) != $replacement) { - // Invalid character - $replacement = $defChar; - } - } - $this->config['config']['simulateStaticDocuments_replacementChar'] = $replacement; - } /** * Converts input string to an ASCII based file name prefix @@ -4536,19 +4467,6 @@ } } - /** - * Seeds the random number engine. - * - * @return void - * @deprecated since TYPO3 4.3, this function will be removed in TYPO3 4.5, the random number generator is seeded automatically since PHP 4.2.0 - */ - function make_seed() { - t3lib_div::logDeprecatedFunction(); - - list($usec, $sec) = explode(' ', microtime()); - $seedV = (float)$sec + ((float)$usec * 100000); - srand($seedV); - } /** * Returns a unique md5 hash. Index: t3lib/class.t3lib_db.php =================================================================== --- t3lib/class.t3lib_db.php (revision 8055) +++ t3lib/class.t3lib_db.php (working copy) @@ -882,27 +882,7 @@ * **************************************/ - /** - * Executes query - * mysql() wrapper function - * Usage count/core: 0 - * - * @param string Database name - * @param string Query to execute - * @return pointer Result pointer / DBAL object - * @deprecated since TYPO3 3.6, will be removed in TYPO3 4.5 - * @see sql_query() - */ - function sql($db, $query) { - t3lib_div::logDeprecatedFunction(); - - $res = mysql_query($query, $this->link); - if ($this->debugOutput) { - $this->debug('sql', $query); - } - return $res; - } - + /** * Executes query * mysql_query() wrapper function Index: t3lib/class.t3lib_install.php =================================================================== --- t3lib/class.t3lib_install.php (revision 8055) +++ t3lib/class.t3lib_install.php (working copy) @@ -1040,18 +1040,6 @@ return $content; } - /** - * Reads the field definitions for the input SQL-file string - * - * @param string Should be a string read from an SQL-file made with 'mysqldump [database_name] -d' - * @return array Array with information about table. - * @deprecated since TYPO3 4.2, this function will be removed in TYPO3 4.5, use ->getFieldDefinitions_fileContent() instead! - */ - function getFieldDefinitions_sqlContent($fileContent) { - t3lib_div::logDeprecatedFunction(); - - return $this->getFieldDefinitions_fileContent($fileContent); - } } if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_install.php']) { Index: typo3/class.db_list_extra.inc =================================================================== --- typo3/class.db_list_extra.inc (revision 8055) +++ typo3/class.db_list_extra.inc (working copy) @@ -765,28 +765,7 @@ } } - /** - * Write sys_refindex entries for current record to $this->references - * - * @param string Table name - * @param integer Uid of current record - * @return void - * - * @deprecated since 4.4: Use getReferenceCount instead - */ - function setReferences($table, $uid) { - t3lib_div::logDeprecatedFunction(); - - $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows( - 'tablename, recuid, field', - 'sys_refindex', - 'ref_table='.$GLOBALS['TYPO3_DB']->fullQuoteStr($table,'sys_refindex'). - ' AND ref_uid='.intval($uid). - ' AND deleted=0' - ); - $this->references = $rows; - } - + /** * Gets the number of records referencing the record with the UID $uid in * the table $tableName. @@ -1467,28 +1446,6 @@ <div class="typo3-clipCtrl">'.implode('',$cells).'</div>'; } - /** - * Make reference count - * - * @param string Table name - * @param integer UID of record - * @return string HTML-table - * - * @deprecated since 4.4: Use getReferenceHTML() instead - */ - function makeRef($table,$uid) { - t3lib_div::logDeprecatedFunction(); - - // Compile information for title tag: - $infoData=array(); - if (is_array($this->references)) { - foreach ($this->references as $row) { - $infoData[]=$row['tablename'].':'.$row['recuid'].':'.$row['field']; - } - } - - return count($infoData) ? '<a href="#" onclick="'.htmlspecialchars('top.launchView(\''.$table.'\', \''.$uid.'\'); return false;').'" title="'.htmlspecialchars(t3lib_div::fixed_lgd_cs(implode(' / ',$infoData),100)).'">'.count($infoData).'</a>' : ''; - } /** * Creates the HTML for a reference count for the record with the UID $uid Index: t3lib/class.t3lib_timetrack.php =================================================================== --- t3lib/class.t3lib_timetrack.php (revision 8055) +++ t3lib/class.t3lib_timetrack.php (working copy) @@ -253,31 +253,6 @@ $this->tsStackPointer--; } - /** - * Returns the current time in milliseconds - * - * @return integer - * @deprecated since TYPO3 4.3, this function will be removed in TYPO3 4.5, use getDifferenceToStarttime() instead - */ - protected function mtime() { - t3lib_div::logDeprecatedFunction(); - - return $this->getDifferenceToStarttime(); - } - - /** - * Returns microtime input to milliseconds - * - * @param string PHP microtime string - * @return integer - * @deprecated since TYPO3 4.3, this function will be removed in TYPO3 4.5, use getMilliseconds() instead that expects microtime as float instead of a string - */ - public function convertMicrotime($microtime) { - t3lib_div::logDeprecatedFunction(); - - $parts = explode(' ',$microtime); - return round(($parts[0]+$parts[1])*1000); - } /** * Gets a microtime value as milliseconds value. Index: t3lib/class.t3lib_div.php =================================================================== --- t3lib/class.t3lib_div.php (revision 8055) +++ t3lib/class.t3lib_div.php (working copy) @@ -371,41 +371,6 @@ } } - /** - * Returns the value of incoming data from globals variable $_POST or $_GET, with priority to $_POST (that is equalent to 'GP' order). - * Strips slashes of string-outputs, but not arrays UNLESS $strip is set. If $strip is set all output will have escaped characters unescaped. - * Usage: 2 - * - * @param string GET/POST var to return - * @param boolean If set, values are stripped of return values that are *arrays!* - string/integer values returned are always strip-slashed() - * @return mixed POST var named $var and if not set, the GET var of the same name. - * @deprecated since TYPO3 3.6 - Use t3lib_div::_GP instead (ALWAYS delivers a value with un-escaped values!) - * @see _GP() - */ - public static function GPvar($var,$strip=0) { - self::logDeprecatedFunction(); - - if(empty($var)) return; - $value = isset($_POST[$var]) ? $_POST[$var] : $_GET[$var]; - if (isset($value) && is_string($value)) { $value = stripslashes($value); } // Originally check '&& get_magic_quotes_gpc() ' but the values of $_GET are always slashed regardless of get_magic_quotes_gpc() because HTTP_POST/GET_VARS are run through addSlashesOnArray in the very beginning of index_ts.php eg. - if ($strip && isset($value) && is_array($value)) { self::stripSlashesOnArray($value); } - return $value; - } - - /** - * Returns the global arrays $_GET and $_POST merged with $_POST taking precedence. - * Usage: 1 - * - * @param string Key (variable name) from GET or POST vars - * @return array Returns the GET vars merged recursively onto the POST vars. - * @deprecated since TYPO3 3.7 - Use t3lib_div::_GPmerged instead - * @see _GP() - */ - public static function GParrayMerged($var) { - self::logDeprecatedFunction(); - - return self::_GPmerged($var); - } /** * Wrapper for the RemoveXSS function. @@ -545,51 +510,6 @@ * *************************/ - /** - * Truncates string. - * Returns a new string of max. $chars length. - * If the string is longer, it will be truncated and appended with '...'. - * Usage: 39 - * - * @param string string to truncate - * @param integer must be an integer with an absolute value of at least 4. if negative the string is cropped from the right end. - * @param string String to append to the output if it is truncated, default is '...' - * @return string new string - * @deprecated since TYPO3 4.1 - Works ONLY for single-byte charsets! Use t3lib_div::fixed_lgd_cs() instead - * @see fixed_lgd_pre() - */ - public static function fixed_lgd($string,$origChars,$preStr='...') { - self::logDeprecatedFunction(); - - $chars = abs($origChars); - if ($chars >= 4) { - if(strlen($string)>$chars) { - return $origChars < 0 ? - $preStr.trim(substr($string, -($chars-3))) : - trim(substr($string, 0, $chars-3)).$preStr; - } - } - return $string; - } - - /** - * Truncates string. - * Returns a new string of max. $chars length. - * If the string is longer, it will be truncated and prepended with '...'. - * This works like fixed_lgd(), but is truncated in the start of the string instead of the end - * Usage: 6 - * - * @param string string to truncate - * @param integer must be an integer of at least 4 - * @return string new string - * @deprecated since TYPO3 4.1 - Use either fixed_lgd() or fixed_lgd_cs() (with negative input value for $chars) - * @see fixed_lgd() - */ - public static function fixed_lgd_pre($string,$chars) { - self::logDeprecatedFunction(); - - return strrev(self::fixed_lgd(strrev($string),$chars)); - } /** * Truncates a string with appended/prepended "..." and takes current character set into consideration. @@ -613,26 +533,6 @@ } } - /** - * Breaks up the text for emails - * Usage: 1 - * - * @param string The string to break up - * @param string The string to implode the broken lines with (default/typically \n) - * @param integer The line length - * @deprecated since TYPO3 4.1 - Use PHP function wordwrap() - * @return string - */ - public static function breakTextForEmail($str,$implChar=LF,$charWidth=76) { - self::logDeprecatedFunction(); - - $lines = explode(LF,$str); - $outArr=array(); - foreach ($lines as $lStr) { - $outArr[] = self::breakLinesForEmail($lStr,$implChar,$charWidth); - } - return implode(LF,$outArr); - } /** * Breaks up a single line of text for emails @@ -1221,39 +1121,6 @@ return rtrim($string, ','); } - /** - * strtoupper which converts danish (and other characters) characters as well - * Usage: 0 - * - * @param string String to process - * @return string - * @deprecated since TYPO3 3.5 - Use t3lib_cs::conv_case() instead or for HTML output, wrap your content in <span class="uppercase">...</span>) - * @ignore - */ - public static function danish_strtoupper($string) { - self::logDeprecatedFunction(); - - $value = strtoupper($string); - return strtr($value, 'áéúíâêûôîæøåäöü', 'ÁÉÚÍÄËÜÖÏÆØÅÄÖÜ'); - } - - /** - * Change umlaut characters to plain ASCII with normally two character target - * Only known characters will be converted, so don't expect a result for any character. - * - * ä => ae, Ö => Oe - * - * @param string String to convert. - * @deprecated since TYPO3 4.1 - Works only for western europe single-byte charsets! Use t3lib_cs::specCharsToASCII() instead! - * @return string - */ - public static function convUmlauts($str) { - self::logDeprecatedFunction(); - - $pat = array ( '/ä/', '/Ä/', '/ö/', '/Ö/', '/ü/', '/Ü/', '/ß/', '/å/', '/Å/', '/ø/', '/Ø/', '/æ/', '/Æ/' ); - $repl = array ( 'ae', 'Ae', 'oe', 'Oe', 'ue', 'Ue', 'ss', 'aa', 'AA', 'oe', 'OE', 'ae', 'AE' ); - return preg_replace($pat,$repl,$str); - } /** * Tests if the input is an integer. @@ -1780,20 +1647,6 @@ return $result; } - /** - * Remove duplicate values from an array - * Usage: 0 - * - * @param array Array of values to make unique - * @return array - * @ignore - * @deprecated since TYPO3 3.5 - Use the PHP function array_unique instead - */ - public static function uniqueArray(array $valueArray) { - self::logDeprecatedFunction(); - - return array_unique($valueArray); - } /** * Removes the value $cmpValue from the $array if found there. Returns the modified array @@ -2102,20 +1955,7 @@ return $str; } - /** - * Creates recursively a JSON literal from a multidimensional associative array. - * Uses native function of PHP >= 5.2.0 - * - * @param array $jsonArray: The array to be transformed to JSON - * @return string JSON string - * @deprecated since TYPO3 4.3, use PHP native function json_encode() instead, will be removed in TYPO3 4.5 - */ - public static function array2json(array $jsonArray) { - self::logDeprecatedFunction(); - - return json_encode($jsonArray); - } - + /** * Removes dots "." from end of a key identifier of TypoScript styled array. * array('key.' => array('property.' => 'value')) --> array('key' => array('property' => 'value')) @@ -2250,21 +2090,6 @@ return implode(' ',$list); } - /** - * Implodes attributes in the array $arr for an attribute list in eg. and HTML tag (with quotes) - * - * @param array See implodeAttributes() - * @param boolean See implodeAttributes() - * @param boolean See implodeAttributes() - * @return string See implodeAttributes() - * @deprecated since TYPO3 3.7 - Name was changed into implodeAttributes - * @see implodeAttributes() - */ - public static function implodeParams(array $arr,$xhtmlSafe=FALSE,$dontOmitBlankAttribs=FALSE) { - self::logDeprecatedFunction(); - - return self::implodeAttributes($arr,$xhtmlSafe,$dontOmitBlankAttribs); - } /** * Wraps JavaScript code XHTML ready with <script>-tags @@ -5216,20 +5041,6 @@ return $instance; } - /** - * Return classname for new instance - * Takes the class-extensions API of TYPO3 into account - * Usage: 17 - * - * @param string Base Class name to evaluate - * @return string Final class name to instantiate with "new [classname]" - * @deprecated since TYPO3 4.3 - Use t3lib_div::makeInstance('myClass', $arg1, $arg2, ..., $argN) - */ - public static function makeInstanceClassName($className) { - self::logDeprecatedFunction(); - - return (class_exists($className) && class_exists('ux_'.$className, false) ? self::makeInstanceClassName('ux_' . $className) : $className); - } /** * Returns the class name for a new instance, taking into account the Index: t3lib/class.gzip_encode.php =================================================================== --- t3lib/class.gzip_encode.php (revision 8055) +++ t3lib/class.gzip_encode.php (working copy) @@ -1,389 +0,0 @@ -<?php -/** - * News: I had once said that when PHP 4.0.5 comes out I will reccomend the built in - * ob_gzhandler over my code unless you are generating flash or images on the fly. - * - * I was wrong. PHP 4.0.5 is out and ob_gzhandler doesn't work for me. - * - * Note: This is rather cool: http://leknor.com/code/gziped.php - * It will calculate the effects of this class on a page. - * compression level, cpu time, download time, etc - * - * Note: this may be better for some sites: - * http://www.remotecommunications.com/apache/mod_gzip/ - * I've read that the above doesn't work with PHP output. - * - * Changes compared to the upstream version: - * - * 2007-03-27 Oliver Hader <oh@inpublica.de> - * - Fixed bug #4623: Content encoding with x-gzip not allowed - * - Fixed missing comments and line formats (cleaner) - * 2005-12-09 Peter Niederlag <peter@niederlag.de> - * - Fixed bug #1976: PHP5 type-conversion of string 'true' and boolean - * - * $Id$ - * - * @author Sandy McArthur, Jr. <leknor@leknor.com> - * @deprecated since TYPO3 4.3, this function will be removed in TYPO3 4.5, we're using the "ob_gzhandler" for compression now. - */ -/** - * [CLASS/FUNCTION INDEX of SCRIPT] - * - * - * - * 53: class gzip_encode - * 193: function gzip_encode($level = 3, $debug=false, $outputCompressedSizes=false) - * 268: function gzip_accepted() - * 317: function get_complevel() - * 342: function linux_loadavg() - * 363: function freebsd_loadavg() - * - * TOTAL FUNCTIONS: 5 - * (This index is automatically created/updated by the extension "extdeveval") - * - */ - - - -/** - * gzip_encode - a class to gzip encode php output - * - * @author Sandy McArthur, Jr. <Leknor@Leknor.com> - * @package TYPO3 - * @subpackage t3lib - */ -class gzip_encode { - /** - * gzip_encode - a class to gzip encode php output - * - * By Sandy McArthur, Jr. <Leknor@Leknor.com> - * - * Copyright 2001 (c) All Rights Reserved, All Responsibility Yours. - * One very slight modification 2005 for PHP5 compatibility reasons for TYPO3 port by Peter Niederlag - * - * This code is released under the GNU LGPL Go read it over here: - * http://www.gnu.org/copyleft/lesser.html - * - * I do make one optional request, I would like an account on or a - * copy of where this code is used. If that is not possible then - * an email would be cool. - * - * How to use: - * 1. Output buffering has to be turned on. You can do this with ob_start() - * <http://php.net/manual/function.ob-start.php> or in the php config - * file. Nothing bad happens if output buffering isn't turned on, your - * page just won't get compressed. - * 2. Include the class file. - * 3. At the _very_ end of your script create an instance of the encode - * class. - * - * eg: - * ------------Start of file---------- - * |<?php - * | ob_start(); - * | include('class.gzip_encode.php'); - * |?> - * |<HTML> - * |... the page ... - * |</HTML> - * |<?php - * | new gzip_encode(); - * |?> - * -------------End of file----------- - * - * Things to note: - * 1. There is no space before the beginning of the file and the '<?php ' tag - * 2. The ob_start() line is optional if output buffering is turned on in - * the main config file. - * 3. Turning on and off output buffering just won't work. - * 4. There must be nothing after the last '?>' tag at the end of the file. - * Be careful of a space hiding there. - * 5. There are better ways to compress served content but I think this is - * the only way to compress php output. - * 6. Your auto_prepend_file is a good place for the ob_start() and - * your auto_append_file is a good place for new gzip_encode(). - * 7. If you put new gzip_encode() in your auto.append file then you can - * call ob_end_flush() in your script to disable compression. - * - * This was written from scratch from info freely available on the web. - * - * These site(s) were useful to me: - * http://www.php.net/manual/ - * http://www.ietf.org/rfc/rfc2616.txt (Sections: 3.5, 14.3, 14.11) - * - * Requirments: - * PHP 4.0.1+: I use the '===' operator, and output buffering, crc32(); - * zlib: Needed for the gzip encoding. (Odds are you have it) - * - * Benchmarks: - * Take a look at http://Leknor.com/code/gziped.php and feed it a page to - * get an idea of how it will preform on your data or page. - * - * To Do: - * 1. I have reports of no content errors. I can't seem to duplicate this. - * Please visit my discussion boards if you think you may be able to help - * 2. The Accept-Encoding isn't handled to spec. Check out 14.3 in RFC 2616 - * to see how it should be done. - * - * Change Log: - * 0.66: Big bug fix. It wouldn't compress when it should. - * 0.65: Fix for PHP-4.0.5 suddenly removing the connection_timeout() function. - * 0.62: Fixed a typo - * 0.61: Detect file types more like described in the magic number files, also - * added detection for gzip and pk zip files. - * 0.6: Detect common file types that shouldn't be compressed, mainly - * for images and swf (Shockwave Flash doesn't really accept gzip) - * 0.53: Made gzip_accepted() method so everyone can detect if a page - * will be gzip'ed with ease. - * 0.52: Detection and graceful handling of improper install/missing libs - * 0.51: Added FreeBSD load average detection. - * 0.5: Passing true as the first parameter will try to calculate the - * compression level from the server's load average. Passing true - * as the second parameter will turn on debugging. - * 0.4: No longer uses a temp file to compress the output. Should speed - * thing up a bit and reduce wear on your hard disk. Also test if - * the http headers have been sent. - * 0.31: Made a small change to the tempnam() line to hopefully be more - * portable. - * 0.3: Added code for the 'x-gzip'. This is untested, I don't know of - * any browser that uses it but the RFC said to look out for it. - * 0.2: Checks for 'gzip' in the Accept-Encoding header - * 0.1: First working version. - * - * Thanks To (Suggestions and stuff): - * ?@boas.anthro.mnsu.edu http://php.net/manual/function.gzcompress.php - * Kaoslord <kaoslord@chaos-productions.com> - * Michael R. Gile <gilem@wsg.net> - * Christian Hamm <chh@admaster.de> - * - * The most recent version is available at: - * http://Leknor.com/code/ - * - */ - - var $_version = 0.66; // Version of the gzip_encode class - - var $level; // Compression level - var $encoding; // Encoding type - var $crc; // crc of the output - var $size; // size of the uncompressed content - var $gzsize; // size of the compressed content - - /** - * gzip_encode constructor - gzip encodes the current output buffer - * if the browser supports it. - * - * Note: all arguments are optionial. - * - * You can specify one of the following for the first argument: - * 0: No compression - * 1: Min compression - * ... Some compression (integer from 1 to 9) - * 9: Max compression - * true: Determin the compression level from the system load. The - * higher the load the less the compression. - * - * You can specify one of the following for the second argument: - * true: Don't actully output the compressed form but run as if it - * had. Used for debugging. - * - * @param integer $level: Define the level of compression between 0 (none) and 9 (best compression) - * @param boolean $debug: If true, no data will be outputted (default: false) - * @param boolean $outputCompressedSizes: If true, the original and compressed size appended as HTML (default: false) - * @return void - * @deprecated since TYPO3 4.3, this function will be removed in TYPO3 4.5, we're using the "ob_gzhandler" for compression now. - */ - function gzip_encode($level=3, $debug=false, $outputCompressedSizes=false) { - t3lib_div::logDeprecatedFunction(); - - if (!function_exists('gzcompress')) { - trigger_error('gzcompress not found, ' . - 'zlib needs to be installed for gzip_encode', - E_USER_WARNING); - return; - } - if (!function_exists('crc32')) { - trigger_error('crc32() not found, ' . - 'PHP >= 4.0.1 needed for gzip_encode', E_USER_WARNING); - return; - } - if (headers_sent()) return; - if (connection_status() !== 0) return; - $encoding = $this->gzip_accepted(); - if (!$encoding) return; - $this->encoding = $encoding; - - if (strtolower($level) == 'true' || $level === true) { - $level = $this->get_complevel(); - } - $this->level = $level; - - $contents = ob_get_contents(); - if ($contents === false) return; - - $gzdata = "\x1f\x8b\x08\x00\x00\x00\x00\x00"; // gzip header - - // By Kasper Skaarhoj, start - if ($outputCompressedSizes) { - $contents.=LF."<!-- Compressed, level ".$level.", original size was ".strlen($contents)." bytes. New size is ".strlen(gzcompress($contents, $level))." bytes -->"; - $size = strlen($contents); // Must set again! - } - // By Kasper Skaarhoj, end - - $size = strlen($contents); - $crc = crc32($contents); - $gzdata .= gzcompress($contents, $level); - $gzdata = substr($gzdata, 0, strlen($gzdata) - 4); // fix crc bug - $gzdata .= pack("V",$crc) . pack("V", $size); - - $this->size = $size; - $this->crc = $crc; - $this->gzsize = strlen($gzdata); - - if ($debug) { - return; - } - - ob_end_clean(); - Header('Content-Encoding: ' . $encoding); - Header('Content-Length: ' . strlen($gzdata)); - Header('X-Content-Encoded-By: class.gzip_encode '.$this->_version); - - echo $gzdata; - } - - - /** - * gzip_accepted() - Test headers for Accept-Encoding: gzip - * Returns: if proper headers aren't found: false - * if proper headers are found: 'gzip' or 'x-gzip' - * - * Tip: using this function you can test if the class will gzip the output - * without actually compressing it yet, eg: - * if (gzip_encode::gzip_accepted()) { - * echo "Page will be gziped"; - * } - * note the double colon syntax, I don't know where it is documented but - * somehow it got in my brain. - * - * @return mixed Returns 'gzip' if the client browser accepts gzip encoding, otherwise false - * @deprecated since TYPO3 4.3, this function will be removed in TYPO3 4.5, we're using the "ob_gzhandler" for compression now. - */ - function gzip_accepted() { - t3lib_div::logDeprecatedFunction(); - - // Checks, if the accepted encoding supports gzip or x-gzip. - // Furthermore a qvalue check is done. "gzip;q=0" means no gzip accepted at all. - $acceptEncoding = t3lib_div::getIndpEnv('HTTP_ACCEPT_ENCODING'); - if (preg_match('/(^|,\s*)(x-)?gzip(;q=(\d(\.\d+)?))?(,|$)/i', $acceptEncoding, $match) && ($match[4] === '' || $match[4] > 0)) { - $encoding = 'gzip'; - } else { - return false; - } - - // Test file type. I wish I could get HTTP response headers. - $magic = substr(ob_get_contents(),0,4); - if (substr($magic,0,2) === '^_') { - // gzip data - $encoding = false; - } else if (substr($magic,0,3) === 'GIF') { - // gif images - $encoding = false; - } else if (substr($magic,0,2) === "\xFF\xD8") { - // jpeg images - $encoding = false; - } else if (substr($magic,0,4) === "\x89PNG") { - // png images - $encoding = false; - } else if (substr($magic,0,3) === 'FWS') { - // Don't gzip Shockwave Flash files. Flash on windows incorrectly - // claims it accepts gzip'd content. - $encoding = false; - } else if (substr($magic,0,2) === 'PK') { - // pk zip file - $encoding = false; - } - - return $encoding; - } - - /** - * get_complevel() - The level of compression we should use. - * - * Returns an int between 0 and 9 inclusive. - * - * Tip: $gzleve = gzip_encode::get_complevel(); to get the compression level - * that will be used with out actually compressing the output. - * - * Help: if you use an OS other then linux please send me code to make - * this work with your OS - Thanks - * - * @return integer Suggests a level of compression (0..9) for the current situation - * @deprecated since TYPO3 4.3, this function will be removed in TYPO3 4.5, we're using the "ob_gzhandler" for compression now. - */ - function get_complevel() { - t3lib_div::logDeprecatedFunction(); - - $uname = posix_uname(); - switch ($uname['sysname']) { - case 'Linux': - $cl = (1 - $this->linux_loadavg()) * 10; - $level = (int)max(min(9, $cl), 0); - break; - case 'FreeBSD': - $cl = (1 - $this->freebsd_loadavg()) * 10; - $level = (int)max(min(9, $cl), 0); - break; - default: - $level = 3; - break; - } - return $level; - } - - /** - * linux_loadavg() - Gets the max() system load average from /proc/loadavg - * - * The max() Load Average will be returned - * - * @return float Returns the current load average - * @deprecated since TYPO3 4.3, this function will be removed in TYPO3 4.5, we're using the "ob_gzhandler" for compression now. - */ - function linux_loadavg() { - t3lib_div::logDeprecatedFunction(); - - $buffer = '0 0 0'; - $f = @fopen('/proc/loadavg', 'rb'); - if ($f) { - if (!feof($f)) { - $buffer = fgets($f, 1024); - } - fclose($f); - } - $load = explode(' ', $buffer); - return max((float)$load[0], (float)$load[1], (float)$load[2]); - } - - /** - * freebsd_loadavg() - Gets the max() system load average from uname(1) - * - * The max() Load Average will be returned - * - * I've been told the code below will work on solaris too, anyone wanna - * test it? - * - * @return float Returns the current load average - * @deprecated since TYPO3 4.3, this function will be removed in TYPO3 4.5, we're using the "ob_gzhandler" for compression now. - */ - function freebsd_loadavg() { - t3lib_div::logDeprecatedFunction(); - - $buffer= `uptime`; - $load = array(); - preg_match('/averag(es|e): ([0-9][.][0-9][0-9]), ([0-9][.][0-9][0-9]), ([0-9][.][0-9][0-9]*)/', $buffer, $load); - - return max((float)$load[2], (float)$load[3], (float)$load[4]); - } -} - -?> \ No newline at end of file Index: typo3/template.php =================================================================== --- typo3/template.php (revision 8055) +++ typo3/template.php (working copy) @@ -124,20 +124,6 @@ if (!defined('TYPO3_MODE')) die("Can't include this file directly."); - -/** - * Deprecated fontwrap function. Is just transparent now. - * - * @param string Input string - * @return string Output string (in the old days this was wrapped in <font> tags) - * @deprecated since TYPO3 3.6 - */ -function fw($str) { - t3lib_div::logDeprecatedFunction(); - return $str; -} - - /** * TYPO3 Backend Template Class * Index: t3lib/class.t3lib_stdgraphic.php =================================================================== --- t3lib/class.t3lib_stdgraphic.php (revision 8055) +++ t3lib/class.t3lib_stdgraphic.php (working copy) @@ -2940,36 +2940,6 @@ } - - /** - * Writes the input GDlib image pointer to file. Now just a wrapper to ImageWrite. - * - * @param pointer The GDlib image resource pointer - * @param string The filename to write to - * @return mixed The output of either imageGif, imagePng or imageJpeg based on the filename to write - * @see imageWrite() - * @deprecated since TYPO3 4.0, this function will be removed in TYPO3 4.5. - */ - function imageGif($destImg, $theImage) { - t3lib_div::logDeprecatedFunction(); - - return $this->imageWrite($destImg, $theImage); - } - - /** - * This function has been renamed and only exists for providing backwards compatibility. - * Please use $this->imageCreateFromFile() instead. - * - * @param string Image filename - * @return pointer Image Resource pointer - * @deprecated since TYPO3 4.0, this function will be removed in TYPO3 4.5. - */ - function imageCreateFromGif($sourceImg) { - t3lib_div::logDeprecatedFunction(); - - return $this->imageCreateFromFile($sourceImg); - } - /** * Creates a new GDlib image resource based on the input image filename. * If it fails creating a image from the input file a blank gray image with the dimensions of the input image will be created instead. Index: t3lib/class.t3lib_basicfilefunc.php =================================================================== --- t3lib/class.t3lib_basicfilefunc.php (revision 8055) +++ t3lib/class.t3lib_basicfilefunc.php (working copy) @@ -497,28 +497,6 @@ return preg_replace('/\.*$/', '', $cleanFileName); } - /** - * Formats an integer, $sizeInBytes, to Mb or Kb or just bytes - * - * @param integer Bytes to be formated - * @return string Formatted with M,K or    appended. - * @deprecated since at least TYPO3 4.2 - Use t3lib_div::formatSize() instead - */ - function formatSize($sizeInBytes) { - t3lib_div::logDeprecatedFunction(); - - if ($sizeInBytes>900) { - if ($sizeInBytes>900000) { // MB - $val = $sizeInBytes/(1024*1024); - return number_format($val, (($val<20)?1:0), '.', '').' M'; - } else { // KB - $val = $sizeInBytes/(1024); - return number_format($val, (($val<20)?1:0), '.', '').' K'; - } - } else { // Bytes - return $sizeInBytes.'  '; - } - } } Index: t3lib/class.t3lib_befunc.php =================================================================== --- t3lib/class.t3lib_befunc.php (revision 8055) +++ t3lib/class.t3lib_befunc.php (working copy) @@ -331,39 +331,7 @@ if (count($rows)) return $rows; } } - - /** - * Returns a WHERE clause which will make an AND search for the words in the $searchWords array in any of the fields in array $fields. - * Usage: 0 - * - * @param array Array of search words - * @param array Array of fields - * @param string Table in which we are searching (for DBAL detection of quoteStr() method) - * @return string WHERE clause for search - * @deprecated since TYPO3 3.6, this function will be removed in TYPO3 4.5, use $GLOBALS['TYPO3_DB']->searchQuery() directly! - */ - public static function searchQuery($searchWords, $fields, $table = '') { - t3lib_div::logDeprecatedFunction(); - - return $GLOBALS['TYPO3_DB']->searchQuery($searchWords, $fields, $table); - } - - /** - * Returns a WHERE clause that can find a value ($value) in a list field ($field) - * For instance a record in the database might contain a list of numbers, "34,234,5" (with no spaces between). This query would be able to select that record based on the value "34", "234" or "5" regardless of their positioni in the list (left, middle or right). - * Is nice to look up list-relations to records or files in TYPO3 database tables. - * Usage: 0 - * - * @param string Table field name - * @param string Value to find in list - * @return string WHERE clause for a query - * @deprecated since TYPO3 3.6, this function will be removed in TYPO3 4.5, use $GLOBALS['TYPO3_DB']->listQuery() directly! - */ - public static function listQuery($field, $value) { - t3lib_div::logDeprecatedFunction(); - - return $GLOBALS['TYPO3_DB']->listQuery($field, $value, ''); - } + /** * Makes an backwards explode on the $str and returns an array with ($table, $uid). @@ -475,91 +443,6 @@ - - - - - /******************************************* - * - * SQL-related, DEPRECATED functions - * (use t3lib_DB functions instead) - * - *******************************************/ - - - /** - * Returns a SELECT query, selecting fields ($select) from two/three tables joined - * $local_table and $mm_table is mandatory. $foreign_table is optional. - * The JOIN is done with [$local_table].uid <--> [$mm_table].uid_local / [$mm_table].uid_foreign <--> [$foreign_table].uid - * The function is very useful for selecting MM-relations between tables adhering to the MM-format used by TCE (TYPO3 Core Engine). See the section on $TCA in Inside TYPO3 for more details. - * - * @param string Field list for SELECT - * @param string Tablename, local table - * @param string Tablename, relation table - * @param string Tablename, foreign table - * @param string Optional additional WHERE clauses put in the end of the query. DO NOT PUT IN GROUP BY, ORDER BY or LIMIT! - * @param string Optional GROUP BY field(s), if none, supply blank string. - * @param string Optional ORDER BY field(s), if none, supply blank string. - * @param string Optional LIMIT value ([begin,]max), if none, supply blank string. - * @return string Full SQL query - * @deprecated since TYPO3 3.6, this function will be removed in TYPO3 4.5, use $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query() instead since that will return the result pointer while this returns the query. Using this function may make your application less fitted for DBAL later. - * @see t3lib_DB::exec_SELECT_mm_query() - */ - public static function mm_query($select, $local_table, $mm_table, $foreign_table, $whereClause = '', $groupBy = '', $orderBy = '', $limit = '') { - t3lib_div::logDeprecatedFunction(); - - $query = $GLOBALS['TYPO3_DB']->SELECTquery( - $select, - $local_table.','.$mm_table.($foreign_table?','.$foreign_table:''), - $local_table.'.uid='.$mm_table.'.uid_local'.($foreign_table?' AND '.$foreign_table.'.uid='.$mm_table.'.uid_foreign':'').' '. - $whereClause, // whereClauseMightContainGroupOrderBy - $groupBy, - $orderBy, - $limit - ); - return $query; - } - - /** - * Creates an INSERT SQL-statement for $table from the array with field/value pairs $fields_values. - * DEPRECATED - $GLOBALS['TYPO3_DB']->INSERTquery() directly instead! But better yet, use $GLOBALS['TYPO3_DB']->exec_INSERTquery() - * - * @param string Table name - * @param array Field values as key=>value pairs. - * @return string Full SQL query for INSERT - * @deprecated since TYPO3 3.6, this function will be removed in TYPO3 4.5, use $GLOBALS['TYPO3_DB']->exec_INSERTquery() directly! - */ - public static function DBcompileInsert($table, $fields_values) { - t3lib_div::logDeprecatedFunction(); - - return $GLOBALS['TYPO3_DB']->INSERTquery($table, $fields_values); - } - - /** - * Creates an UPDATE SQL-statement for $table where $where-clause (typ. 'uid=...') from the array with field/value pairs $fields_values. - * DEPRECATED - $GLOBALS['TYPO3_DB']->UPDATEquery() directly instead! But better yet, use $GLOBALS['TYPO3_DB']->exec_UPDATEquery() - * - * @param string Database tablename - * @param string WHERE clause, eg. "uid=1" - * @param array Field values as key=>value pairs. - * @return string Full SQL query for UPDATE - * @deprecated since TYPO3 3.6, this function will be removed in TYPO3 4.5, use $GLOBALS['TYPO3_DB']->exec_UPDATEquery() directly! - */ - public static function DBcompileUpdate($table, $where, $fields_values) { - t3lib_div::logDeprecatedFunction(); - - return $GLOBALS['TYPO3_DB']->UPDATEquery($table, $where, $fields_values); - } - - - - - - - - - - /******************************************* * * Page tree, TCA related @@ -1691,25 +1574,6 @@ : ''; } - /** - * Returns either title = '' or alt = '' attribute. This depends on the client browser and whether it supports title = '' or not (which is the default) - * If no $content is given only the attribute name is returned. - * The returned attribute with content will have a leading space char. - * Warning: Be careful to submit empty $content var - that will return just the attribute name! - * Usage: 0 - * - * @param string String to set as title-attribute. If no $content is given only the attribute name is returned. - * @param boolean If $hsc is set, then content of the attribute is htmlspecialchar()'ed (which is good for XHTML and other reasons...) - * @return string - * @deprecated since TYPO3 3.6, this function will be removed in TYPO3 4.5 - The idea made sense with older browsers, but now all browsers should support the "title" attribute - so just hardcode the title attribute instead! - */ - public static function titleAttrib($content = '', $hsc = 0) { - t3lib_div::logDeprecatedFunction(); - - global $CLIENT; - $attrib= ($CLIENT['BROWSER']=='net'&&$CLIENT['VERSION']<5)||$CLIENT['BROWSER']=='konqu' ? 'alt' : 'title'; - return strcmp($content, '')?' '.$attrib.'="'.($hsc?htmlspecialchars($content):$content).'"' : $attrib; - } /** * Returns alt="" and title="" attributes with the value of $content. @@ -2840,30 +2704,6 @@ return $itemArray; } - /** - * Call to update the page tree frame (or something else..?) after - * t3lib_BEfunc::getSetUpdateSignal('updatePageTree') -> will set the page tree to be updated. - * t3lib_BEfunc::getSetUpdateSignal() -> will return some JavaScript that does the update (called in the typo3/template.php file, end() function) - * please use the setUpdateSignal function instead now, as it allows you to add more parameters - * Usage: 11 - * - * @param string Whether to set or clear the update signal. When setting, this value contains strings telling WHAT to set. At this point it seems that the value "updatePageTree" is the only one it makes sense to set. - * @return string HTML code (<script> section) - * @see t3lib_BEfunc::getUpdateSignalCode() - * @see t3lib_BEfunc::setUpdateSignal() - * @deprecated since TYPO3 4.2, this function will be removed in TYPO3 4.5, use the setUpdateSignal function instead, as it allows you to add more parameters - */ - public static function getSetUpdateSignal($set = '') { - t3lib_div::logDeprecatedFunction(); - - // kept for backwards compatibility if $set is empty, use "getUpdateSignalCode()" instead - if ($set) { - return self::setUpdateSignal($set); - } else { - return self::getUpdateSignalCode(); - } - } - /** * Call to update the page tree frame (or something else..?) after @@ -4379,38 +4219,6 @@ return $paramArr; } - /** - * Returns "list of backend modules". Most likely this will be obsolete soon / removed. Don't use. - * Usage: 0 - * - * @param array Module names in array. Must be "addslashes()"ed - * @param string Perms clause for SQL query - * @param string Backpath - * @param string The URL/script to jump to (used in A tag) - * @return array Two keys, rows and list - * @internal - * @deprecated since TYPO3 3.6, this function will be removed in TYPO3 4.5. - * @obsolete - */ - 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 . self::deleteClause('pages')); - if (!$GLOBALS['TYPO3_DB']->sql_num_rows($res)) return false; - - $out = ''; - $theRows = array(); - 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(self::getRecordPath($row['uid'], $perms_clause, 20)) . '" align="top"') . - htmlspecialchars($row['title']). - '</a></span><br />'; - } - $GLOBALS['TYPO3_DB']->sql_free_result($res); - - return array('rows'=>$theRows, 'list'=>$out); - } /** * Returns the name of the backend script relative to the TYPO3 main directory. Index: typo3/index.php =================================================================== --- typo3/index.php (revision 8055) +++ typo3/index.php (working copy) @@ -633,18 +633,6 @@ return $output; } - /** - * Outputs an empty string. This function is obsolete and kept for the - * compatibility only. - * - * @param string $unused Unused - * @return string HTML output - * @deprecated since TYPO3 4.3, all the functionality was put in $this->startForm() and $this->addFields_hidden - */ - function getHiddenFields($unused = '') { - t3lib_div::logDeprecatedFunction(); - return ''; - } /** * Creates JavaScript for the login form Index: typo3/sysext/cms/tslib/class.tslib_pibase.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_pibase.php (revision 8055) +++ typo3/sysext/cms/tslib/class.tslib_pibase.php (working copy) @@ -782,22 +782,6 @@ return ' class="'.trim($output).'"'; } - /** - * Sets CSS style-data for the $class-suffix (prefixed by pi_getClassName()) - * - * @param string $class: Class suffix, see pi_getClassName - * @param string $data: CSS data - * @param string If $selector is set to any CSS selector, eg 'P' or 'H1' or 'TABLE' then the style $data will regard those HTML-elements only - * @return void - * @deprecated since TYPO3 3.6, this function will be removed in TYPO3 4.5, I think this function should not be used (and probably isn't used anywhere). It was a part of a concept which was left behind quite quickly. - * @obsolete - * @private - */ - function pi_setClassStyle($class,$data,$selector='') { - t3lib_div::logDeprecatedFunction(); - - $GLOBALS['TSFE']->setCSS($this->pi_getClassName($class).($selector?' '.$selector:''),'.'.$this->pi_getClassName($class).($selector?' '.$selector:'').' {'.$data.'}'); - } /** * Wraps the input string in a <div> tag with the class attribute set to the prefixId. Index: t3lib/class.t3lib_tceforms.php =================================================================== --- t3lib/class.t3lib_tceforms.php (revision 8055) +++ t3lib/class.t3lib_tceforms.php (working copy) @@ -4147,21 +4147,6 @@ return 'document.'.$this->formName."['".$itemName."']"; } - /** - * Returns the "No title" string if the input $str is empty. - * - * DEPRECATED: Use t3lib_BEfunc::getRecordTitle with the $forceResult flag set. - * - * @param string The string which - if empty - will become the no-title string. - * @param array Array with wrappin parts for the no-title output (in keys [0]/[1]) - * @return string - * @deprecated since TYPO3 4.1, this function will be removed in TYPO3 4.5. - */ - function noTitle($str,$wrapParts=array()) { - t3lib_div::logDeprecatedFunction(); - - return strcmp($str,'') ? $str : $wrapParts[0].'['.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.no_title').']'.$wrapParts[1]; - } /** * Returns 'this.blur();' string, if supported. Index: typo3/sysext/cms/tslib/class.tslib_menu.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_menu.php (revision 8055) +++ typo3/sysext/cms/tslib/class.tslib_menu.php (working copy) @@ -921,26 +921,6 @@ } } - /** - * Includes the PHP script defined for the HMENU special type "userdefined". - * This script is supposed to populate the array $menuItemsArray with a set of page records comprising the menu. - * The "userdefined" type is deprecated since "userfunction" has arrived since and is a better choice for many reasons (like using classes/functions for rendering the menu) - * - * @param array TypoScript parameters for "special.". In particular the property "file" is reserved and specifies the file to include. Seems like any other property can be used freely by the script. - * @param string The sorting field. Can be used from the script in the $incFile. - * @return array An array with the menu items - * @deprecated since TYPO3 3.6, this function will be removed in TYPO3 4.5, use HMENU of type "userfunction" instead of "userdefined" - * @access private - */ - function includeMakeMenu($conf,$altSortField) { - t3lib_div::logDeprecatedFunction(); - - $incFile = $GLOBALS['TSFE']->tmpl->getFileName($conf['file']); - if ($incFile && $GLOBALS['TSFE']->checkFileInclude($incFile)) { - include($incFile); - } - return is_array($menuItemsArray) ? $menuItemsArray : array(); - } /** * Checks if a page is OK to include in the final menu item array. Pages can be excluded if the doktype is wrong, if they are hidden in navigation, have a uid in the list of banned uids etc. Index: typo3/sysext/cms/layout/class.tx_cms_layout.php =================================================================== --- typo3/sysext/cms/layout/class.tx_cms_layout.php (revision 8055) +++ typo3/sysext/cms/layout/class.tx_cms_layout.php (working copy) @@ -1881,20 +1881,6 @@ } } - /** - * Returns an icon, which has its title attribute set to a massive amount of information about the element. - * - * @param array Array where values are human readable output of field values (not htmlspecialchars()'ed though). The values are imploded by a linebreak. - * @return string HTML img tag if applicable. - * @deprecated since TYPO3 4.4, this function will be removed in TYPO3 4.6 - */ - function infoGif($infoArr) { - t3lib_div::logDeprecatedFunction(); - - if (count($infoArr) && $this->tt_contentConfig['showInfo']) { - return t3lib_iconWorks::getSpriteIcon('actions-document-info', array('title' => htmlspecialchars(implode(LF, $infoArr)))); - } - } /** * Creates onclick-attribute content for a new content element Index: t3lib/class.t3lib_tceforms_inline.php =================================================================== --- t3lib/class.t3lib_tceforms_inline.php (revision 8055) +++ t3lib/class.t3lib_tceforms_inline.php (working copy) @@ -951,21 +951,6 @@ /** - * Creates a link/button to create new records - * - * @param string $objectPrefix: The "path" to the child record to create (e.g. 'data-parentPageId-partenTable-parentUid-parentField-childTable') - * @param array $conf: TCA configuration of the parent(!) field - * @return string The HTML code for the new record link - * @deprecated since TYPO3 4.2.0-beta1, this function will be removed in TYPO3 4.5. - */ - function getNewRecordLink($objectPrefix, $conf = array()) { - t3lib_div::logDeprecatedFunction(); - - return $this->getLevelInteractionLink('newRecord', $objectPrefix, $conf); - } - - - /** * Add Sortable functionality using script.acolo.us "Sortable". * * @param string $objectId: The container id of the object - elements inside will be sortable @@ -1104,24 +1089,6 @@ /** - * Initialize environment for AJAX calls - * - * @param string $method: Name of the method to be called - * @param array $arguments: Arguments to be delivered to the method - * @return void - * @deprecated since TYPO3 4.2.0-alpha3, this function will be removed in TYPO3 4.5. - */ - function initForAJAX($method, &$arguments) { - t3lib_div::logDeprecatedFunction(); - - // Set t3lib_TCEforms::$RTEcounter to the given value: - if ($method == 'createNewRecord') { - $this->fObj->RTEcounter = intval(array_shift($arguments)); - } - } - - - /** * Generates an error message that transferred as JSON for AJAX calls * * @param string $message: The error message to be shown @@ -2392,21 +2359,6 @@ /** - * Creates recursively a JSON literal from a mulidimensional associative array. - * Uses Services_JSON (http://mike.teczno.com/JSON/doc/) - * - * @param array $jsonArray: The array (or part of) to be transformed to JSON - * @return string If $level>0: part of JSON literal; if $level==0: whole JSON literal wrapped with <script> tags - * @deprecated Since TYPO3 4.2: Moved to t3lib_div::array2json, will be removed in TYPO3 4.4 - */ - function getJSON($jsonArray) { - t3lib_div::logDeprecatedFunction(); - - return json_encode($jsonArray); - } - - - /** * Checks if a uid of a child table is in the inline view settings. * * @param string $table: Name of the child table Index: typo3/mod/tools/em/class.nusoap.php =================================================================== --- typo3/mod/tools/em/class.nusoap.php (revision 8055) +++ typo3/mod/tools/em/class.nusoap.php (working copy) @@ -648,20 +648,6 @@ "</SOAP-ENV:Envelope>"; } - /** - * formats a string to be inserted into an HTML stream - * - * @param string $str The string to format - * @return string The formatted string - * @access public - * @deprecated since at least TYPO3 4.3, will be removed in TYPO3 4.5 - */ - function formatDump($str){ - t3lib_div::logDeprecatedFunction(); - - $str = htmlspecialchars($str); - return nl2br($str); - } /** * contracts (changes namespace to prefix) a qualified name @@ -883,30 +869,7 @@ } } -/** -* sleeps some number of microseconds -* -* @param string $usec the number of microseconds to sleep -* @access public -* @deprecated since at least TYPO3 4.3, will be removed in TYPO3 4.5. -*/ -function usleepWindows($usec) -{ - t3lib_div::logDeprecatedFunction(); - - $start = gettimeofday(); - - do - { - $stop = gettimeofday(); - $timePassed = 1000000 * ($stop['sec'] - $start['sec']) - + $stop['usec'] - $start['usec']; - } - while ($timePassed < $usec); -} - - /** * Contains information for a SOAP fault. * Mainly used for returning faults from deployed functions @@ -1601,30 +1564,6 @@ $this->debug('<' . $this->schemaTargetNamespace . '> '.$string); } - /** - * get the PHP type of a user defined type in the schema - * PHP type is kind of a misnomer since it actually returns 'struct' for assoc. arrays - * returns false if no type exists, or not w/ the given namespace - * else returns a string that is either a native php type, or 'struct' - * - * @param string $type, name of defined type - * @param string $ns, namespace of type - * @return mixed - * @access public - * @deprecated since at least TYPO3 4.3, will be removed in TYPO3 4.5. - */ - function getPHPType($type,$ns){ - t3lib_div::logDeprecatedFunction(); - - if(isset($this->typemap[$ns][$type])){ - //print "found type '$type' and ns $ns in typemap<br>"; - return $this->typemap[$ns][$type]; - } elseif(isset($this->complexTypes[$type])){ - //print "getting type '$type' and ns $ns from complexTypes array<br>"; - return $this->complexTypes[$type]['phpType']; - } - return false; - } /** * returns an associative array of information about a given type @@ -1709,84 +1648,6 @@ return false; } - /** - * returns a sample serialization of a given type, or false if no type by the given name - * - * @param string $type, name of type - * @return mixed - * @access public - * @deprecated since at least TYPO3 4.3, will be removed in TYPO3 4.5. - */ - function serializeTypeDef($type){ - t3lib_div::logDeprecatedFunction(); - - //print "in sTD() for type $type<br>"; - if($typeDef = $this->getTypeDef($type)){ - $str .= '<'.$type; - if(is_array($typeDef['attrs'])){ - foreach($attrs as $attName => $data){ - $str .= " $attName=\"{type = ".$data['type']."}\""; - } - } - $str .= " xmlns=\"".$this->schema['targetNamespace']."\""; - if(count($typeDef['elements']) > 0){ - $str .= ">"; - foreach($typeDef['elements'] as $element => $eData){ - $str .= $this->serializeTypeDef($element); - } - $str .= "</$type>"; - } elseif($typeDef['typeClass'] == 'element') { - $str .= "></$type>"; - } else { - $str .= "/>"; - } - return $str; - } - return false; - } - - /** - * returns HTML form elements that allow a user - * to enter values for creating an instance of the given type. - * - * @param string $name, name for type instance - * @param string $type, name of type - * @return string - * @access public - * @deprecated since at least TYPO3 4.3, will be removed in TYPO3 4.5. - */ - function typeToForm($name,$type){ - t3lib_div::logDeprecatedFunction(); - - // get typedef - if($typeDef = $this->getTypeDef($type)){ - // if struct - if($typeDef['phpType'] == 'struct'){ - $buffer .= '<table>'; - foreach($typeDef['elements'] as $child => $childDef){ - $buffer .= " - <tr><td align='right'>$childDef[name] (type: ".$this->getLocalPart($childDef['type'])."):</td> - <td><input type='text' name='parameters[".$name."][$childDef[name]]'></td></tr>"; - } - $buffer .= '</table>'; - // if array - } elseif($typeDef['phpType'] == 'array'){ - $buffer .= '<table>'; - for($i=0;$i < 3; $i++){ - $buffer .= " - <tr><td align='right'>array item (type: $typeDef[arrayType]):</td> - <td><input type='text' name='parameters[".$name."][]'></td></tr>"; - } - $buffer .= '</table>'; - // if scalar - } else { - $buffer .= "<input type='text' name='parameters[$name]'>"; - } - } else { - $buffer .= "<input type='text' name='parameters[$name]'>"; - } - return $buffer; - } /** * adds a complex type to the schema @@ -2404,66 +2265,6 @@ } } - /** - * decode a string that is encoded w/ "chunked' transfer encoding - * as defined in RFC2068 19.4.6 - * - * @param string $buffer - * @param string $lb - * @returns string - * @access public - * @deprecated since at least TYPO3 4.3, will be removed in TYPO3 4.5. - */ - function decodeChunked($buffer, $lb){ - t3lib_div::logDeprecatedFunction(); - - // length := 0 - $length = 0; - $new = ''; - - // read chunk-size, chunk-extension (if any) and CRLF - // get the position of the linebreak - $chunkend = strpos($buffer, $lb); - if ($chunkend == FALSE) { - $this->debug('no linebreak found in decodeChunked'); - return $new; - } - $temp = substr($buffer,0,$chunkend); - $chunk_size = hexdec( trim($temp) ); - $chunkstart = $chunkend + strlen($lb); - // while (chunk-size > 0) { - while ($chunk_size > 0) { - $this->debug("chunkstart: $chunkstart chunk_size: $chunk_size"); - $chunkend = strpos( $buffer, $lb, $chunkstart + $chunk_size); - - // Just in case we got a broken connection - if ($chunkend == FALSE) { - $chunk = substr($buffer,$chunkstart); - // append chunk-data to entity-body - $new .= $chunk; - $length += strlen($chunk); - break; - } - - // read chunk-data and CRLF - $chunk = substr($buffer,$chunkstart,$chunkend-$chunkstart); - // append chunk-data to entity-body - $new .= $chunk; - // length := length + chunk-size - $length += strlen($chunk); - // read chunk-size and CRLF - $chunkstart = $chunkend + strlen($lb); - - $chunkend = strpos($buffer, $lb, $chunkstart) + strlen($lb); - if ($chunkend == FALSE) { - break; //Just in case we got a broken connection - } - $temp = substr($buffer,$chunkstart,$chunkend-$chunkstart); - $chunk_size = hexdec( trim($temp) ); - $chunkstart = $chunkend; - } - return $new; - } /* * Writes payload, including HTTP headers, to $this->outgoing_payload. @@ -4040,88 +3841,7 @@ return $xml; } - /** - * serialize a PHP value according to a WSDL message definition - * - * TODO - * - multi-ref serialization - * - validate PHP values against type definitions, return errors if invalid - * - * @param string $ type name - * @param mixed $ param value - * @return mixed new param or false if initial value didn't validate - * @access public - * @deprecated since at least TYPO3 4.3, will be removed in TYPO3 4.5. - */ - function serializeParameters($operation, $direction, $parameters) - { - t3lib_div::logDeprecatedFunction(); - - $this->debug("in serializeParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion"); - $this->appendDebug('parameters=' . $this->varDump($parameters)); - - if ($direction != 'input' && $direction != 'output') { - $this->debug('The value of the \$direction argument needs to be either "input" or "output"'); - $this->setError('The value of the \$direction argument needs to be either "input" or "output"'); - return false; - } - if (!$opData = $this->getOperationData($operation)) { - $this->debug('Unable to retrieve WSDL data for operation: ' . $operation); - $this->setError('Unable to retrieve WSDL data for operation: ' . $operation); - return false; - } - $this->debug('opData:'); - $this->appendDebug($this->varDump($opData)); - - // Get encoding style for output and set to current - $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; - if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) { - $encodingStyle = $opData['output']['encodingStyle']; - $enc_style = $encodingStyle; - } - - // set input params - $xml = ''; - if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) { - - $use = $opData[$direction]['use']; - $this->debug("use=$use"); - $this->debug('got ' . count($opData[$direction]['parts']) . ' part(s)'); - if (is_array($parameters)) { - $parametersArrayType = $this->isArraySimpleOrStruct($parameters); - $this->debug('have ' . $parametersArrayType . ' parameters'); - foreach($opData[$direction]['parts'] as $name => $type) { - $this->debug('serializing part "'.$name.'" of type "'.$type.'"'); - // Track encoding style - if(isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) { - $encodingStyle = $opData[$direction]['encodingStyle']; - $enc_style = $encodingStyle; - } else { - $enc_style = false; - } - // NOTE: add error handling here - // if serializeType returns false, then catch global error and fault - if ($parametersArrayType == 'arraySimple') { - $p = array_shift($parameters); - $this->debug('calling serializeType w/indexed param'); - $xml .= $this->serializeType($name, $type, $p, $use, $enc_style); - } elseif (isset($parameters[$name])) { - $this->debug('calling serializeType w/named param'); - $xml .= $this->serializeType($name, $type, $parameters[$name], $use, $enc_style); - } else { - // TODO: only send nillable - $this->debug('calling serializeType w/null param'); - $xml .= $this->serializeType($name, $type, null, $use, $enc_style); - } - } - } else { - $this->debug('no parameters passed.'); - } - } - $this->debug("serializeParameters returning: $xml"); - return $xml; - } - + /** * serializes a PHP value according a given type definition * @@ -5896,39 +5616,6 @@ $this->persistentConnection = true; } - /** - * gets the default RPC parameter setting. - * If true, default is that call params are like RPC even for document style. - * Each call() can override this value. - * - * This is no longer used. - * - * @return boolean - * @access public - * @deprecated since at least TYPO3 4.3, will be removed in TYPO3 4.5. - */ - function getDefaultRpcParams() { - t3lib_div::logDeprecatedFunction(); - - return $this->defaultRpcParams; - } - - /** - * sets the default RPC parameter setting. - * If true, default is that call params are like RPC even for document style - * Each call() can override this value. - * - * This is no longer used. - * - * @param boolean $rpcParams - * @access public - * @deprecated since at least TYPO3 4.3, will be removed in TYPO3 4.5. - */ - function setDefaultRpcParams($rpcParams) { - t3lib_div::logDeprecatedFunction(); - - $this->defaultRpcParams = $rpcParams; - } /** * dynamically creates an instance of a proxy class, Index: t3lib/class.t3lib_matchcondition.php =================================================================== --- t3lib/class.t3lib_matchcondition.php (revision 8055) +++ t3lib/class.t3lib_matchcondition.php (working copy) @@ -84,17 +84,6 @@ var $altRootLine=array(); var $hookObjectsArr = array(); - /** - * Constructor for this class - * - * @return void - * @deprecated since TYPO3 4.3, will be removed in TYPO3 4.5 - The functionality was moved to t3lib_matchCondition_frontend - */ - function __construct() { - t3lib_div::logDeprecatedFunction(); - - parent::__construct(); - } /** * Matching TS condition @@ -173,17 +162,6 @@ return parent::getBrowserInfo($useragent); } - /** - * Returns the version of a browser; Basically getting doubleval() of the input string, stripping of any non-numeric values in the beginning of the string first. - * - * @param string A string with version number, eg. "/7.32 blablabla" - * @return double Returns double value, eg. "7.32" - * @deprecated since TYPO3 4.3 - use t3lib_utility_Client::getVersion() instead - */ - function browserInfo_version($tmp) { - t3lib_div::logDeprecatedFunction(); - return t3lib_utility_Client::getVersion($tmp); - } /** * Return global variable where the input string $var defines array keys separated by "|" Index: t3lib/class.t3lib_beuserauth.php =================================================================== --- t3lib/class.t3lib_beuserauth.php (revision 8055) +++ t3lib/class.t3lib_beuserauth.php (working copy) @@ -154,27 +154,6 @@ parent::start(); } - /** - * If flag is set and the extensions 'beuser_tracking' is loaded, this will insert a table row with the REQUEST_URI of current script - thus tracking the scripts the backend users uses... - * This function works ONLY with the "beuser_tracking" extension and is deprecated since it does nothing useful. - * - * @param boolean Activate insertion of the URL. - * @return void - * @deprecated since TYPO3 3.6, this function will be removed in TYPO3 4.5. - */ - function trackBeUser($flag) { - t3lib_div::logDeprecatedFunction(); - - if ($flag && t3lib_extMgm::isLoaded('beuser_tracking')) { - $insertFields = array( - 'userid' => intval($this->user['uid']), - 'tstamp' => $GLOBALS['EXEC_TIME'], - 'script' => t3lib_div::getIndpEnv('REQUEST_URI') - ); - - $GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_trackbeuser', $insertFields); - } - } /** * If TYPO3_CONF_VARS['BE']['enabledBeUserIPLock'] is enabled and an IP-list is found in the User TSconfig objString "options.lockToIP", then make an IP comparison with REMOTE_ADDR and return the outcome (true/false)