13815_v1.diff

Administrator Admin, 2010-03-24 09:56

Download (1.51 KB)

View differences:

trunk/typo3/sysext/cms/tslib/class.tslib_content.php (working copy)
3763 3763
				if ($conf['prioriCalc']){$content=t3lib_div::calcParenthesis($content); if ($conf['prioriCalc']=='intval') $content=intval($content);}
3764 3764
				if ((string)$conf['char']!=''){$content=chr(intval($conf['char']));}
3765 3765
				if ($conf['intval']){$content=intval($content);}
3766
				if ($conf['numberFormat.']) {
3767
					$content = $this->numberFormat($content, $conf['numberFormat']);
3768
				}
3766 3769
				if ($conf['date']){$content=date($conf['date'], $content);}
3767 3770
				if ($conf['strftime']){
3768 3771
					$content = strftime($conf['strftime'], $content);
......
4780 4783
		}
4781 4784
		return $content;
4782 4785
	}
4786
	
4787
	/**
4788
	 * Implements the stdWrap property "numberFormat"
4789
	 * This is a Wrapper function for php's number_format()
4790
	 *
4791
	 * @param	float	Value to process
4792
	 * @param	array	TypoScript Configuration for numberFormat
4793
	 * @return	string	The formated number
4794
	 */
4795
	function numberFormat($content, $conf) {
4796
		$decimals = $this->stdWrap($conf['decimals'], $conf['decimals.']);
4797
		$dec_point = $this->stdWrap($conf['dec_point'], $conf['dec_point.']);
4798
		$thousands_sep = $this->stdWrap($conf['thousands_sep'], $conf['thousands_sep.']);
4799
		return number_format($content, $decimals, $dec_point, $thousands_sep);
4800
	}
4783 4801

  
4784 4802
	/**
4785 4803
	 * Implements the stdWrap property, "parseFunc".