[TYPO3-core] RFC #5045, #5077, #8649: Import/Export requires lot of memory

Oliver Klee typo3-german-02 at oliverklee.de
Sun Jul 20 20:31:49 CEST 2008


Hi,

> Index: app/index.php
> ===================================================================
> @@ -388,12 +388,16 @@
>  	function exportData($inData)	{
>  		global $TCA, $LANG;
>  
> +		if ($_GET['debug'])	{
> +			$this->content .= '<br />Used memory : '.memory_get_usage()."<br />\n";

Please make sure that your code follows the CGL:

- Please use a space instead of a tab for between text and the {.
- Please add spaces around concatenation dots.
- Please use single quotes.

[snip]

> -		$inData['maxFileSize'] = t3lib_div::intInRange($inData['maxFileSize'],1,10000,1000);
> +			// Only allow to export file not larger than ~100MB
> +		$inData['maxFileSize'] = t3lib_div::intInRange($inData['maxFileSize'],1,100000,1000);


- Please align the comments with the code instead of indenting them.
- Please add spaces after the commas.

> Index: class.tx_impexp_fileHandler_string.php
> ===================================================================
> +class tx_impexp_fileHandler_string extends tx_impexp_fileHandler_base	{
> +	var $string = false;
> +	var $pointer = -1;
> +	var $length = -1;
> +
> +	function open(&$name, $mode)	{
> +		$this->string = &$name;
> +		$this->length = strlen($name);
> +		$this->pointer = 0;
> +	}
> +
> +	function read($size)	{

Please use PHP5 code:
- var -> public/private/protected
- Please add an access modifier before "function".

What about some PhpDoc comments? These will make understanding and 
reviewing your code much easier.

Regards,


Oliver


More information about the TYPO3-team-core mailing list