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

Use GitHub to post bug reports and error descriptions for phpwcms. Describe your problem detailed!
Locked
usa
Posts: 3
Joined: Wed 10. Mar 2004, 09:52
Contact:

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

Post 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);
TAOG
Posts: 206
Joined: Fri 17. Sep 2004, 20:14
Location: Berlin/Germany
Contact:

Post by TAOG »

ehm what bug would u telling us? u present code here and not what error u got.
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

I have understood :)
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
TAOG
Posts: 206
Joined: Fri 17. Sep 2004, 20:14
Location: Berlin/Germany
Contact:

Post by TAOG »

Oliver Georgi wrote:I have understood :)
das ist die hauptsache :D
Locked