Page 1 of 1

bug in {SUMMARY} (front.funct.inc.php)

Posted: Thu 28. Oct 2004, 10:39
by usa

Code: Select all

function render_cnt_template($text='', $tag='', $value='') {
	// render content part by replacing placeholder tags by value
	if(strval($value)) {
		$text = preg_replace('/\['.$tag.'\](.*?)\[\/'.$tag.'\]/is', '$1', $text);
		$text = str_replace('{'.$tag.'}', $value, $text);
	} else {
2153:		$text = preg_replace('/\['.$tag.'\](.*?)\[\/'.$tag.'\]/is', '', $text);
	}
	return $text;
}
if $value empty in page display {tag}

after 2153 line add:

Code: Select all

$text = str_replace('{'.$tag.'}', '', $text);

Posted: Thu 28. Oct 2004, 13:28
by TAOG
ehm what bug would u telling us? u present code here and not what error u got.

Posted: Fri 5. Nov 2004, 12:15
by Oliver Georgi
I have understood :)

Posted: Fri 5. Nov 2004, 12:27
by TAOG
Oliver Georgi wrote:I have understood :)
das ist die hauptsache :D