}
else {
$this->popTag($tagCommand);
- $phpCode = "<?php \$blockContent = ob_get_contents();\n";
- $phpCode .= "ob_end_clean();\n";
- $phpCode .= "echo \$this->pluginObjects['".$className."']->execute(\$this->tagStack[count(\$this->tagStack) - 1][1], \$blockContent, \$this); }\n";
+ $phpCode = "<?php echo \$this->pluginObjects['".$className."']->execute(\$this->tagStack[count(\$this->tagStack) - 1][1], ob_get_clean(), \$this); }\n";
$phpCode .= "array_pop(\$this->tagStack);\n";
$phpCode .= "unset(\$blockContent, \$blockRepeat); ?>";
}
else {
$capture = array_pop($this->captureStack);
$phpCode = "<?php\n";
- $phpCode .= "\$this->v['tpl']['capture'][".$capture['name']."] = ob_get_contents();\nob_end_clean();\n";
+ $phpCode .= "\$this->v['tpl']['capture'][".$capture['name']."] = ob_get_clean();\n";
if (!empty($capture['variable'])) $phpCode .= "\$this->".($capture['append'] ? 'append' : 'assign')."(".$capture['variable'].", \$this->v['tpl']['capture'][".$capture['name']."]);\n";
$phpCode .= "?>";
return $phpCode;
$phpCode .= '$this->includeTemplate('.$file.', array('.$argString.'), ('.$sandbox.' ? 1 : 0), $this->v[\'__PACKAGE_ID\']);'."\n";
if ($assignVar !== false) {
- $phpCode .= '$this->'.($append ? 'append' : 'assign').'('.$assignVar.', ob_get_contents()); ob_end_clean();'."\n";
+ $phpCode .= '$this->'.($append ? 'append' : 'assign').'('.$assignVar.', ob_get_clean());'."\n";
}
$phpCode .= "\$this->v['tpl']['template'] = \$outerTemplateName".$hash.";\n";
*/
public function executeEnd(TemplateScriptingCompiler $compiler) {
$compiler->popTag('icon');
- $hash = StringUtil::getRandomID();
- return "<?php \$_icon".$hash." = ob_get_contents(); ob_end_clean(); echo wcf\system\style\StyleHandler::getInstance()->getStyle()->getIconPath(\$_icon".$hash.", '".$this->size."'); ?>";
+ return "<?php echo wcf\system\style\StyleHandler::getInstance()->getStyle()->getIconPath(ob_get_clean(), '".$this->size."'); ?>";
}
}
*/
public function executeEnd(TemplateScriptingCompiler $compiler) {
$compiler->popTag('lang');
- $hash = StringUtil::getRandomID();
- return "<?php \$_lang".$hash." = ob_get_contents(); ob_end_clean(); echo wcf\system\WCF::getLanguage()->getDynamicVariable(\$_lang".$hash.", \$this->tagStack[count(\$this->tagStack) - 1][1], (isset(\$this->tagStack[count(\$this->tagStack) - 1][1]['__optional']) ? \$this->tagStack[count(\$this->tagStack) - 1][1]['__optional'] : false)); array_pop(\$this->tagStack); ?>";
+ return "<?php echo wcf\system\WCF::getLanguage()->getDynamicVariable(ob_get_clean(), \$this->tagStack[count(\$this->tagStack) - 1][1], (isset(\$this->tagStack[count(\$this->tagStack) - 1][1]['__optional']) ? \$this->tagStack[count(\$this->tagStack) - 1][1]['__optional'] : false)); array_pop(\$this->tagStack); ?>";
}
}
*/
public function executeEnd(TemplateScriptingCompiler $compiler) {
$compiler->popTag('staticlang');
- $hash = StringUtil::getRandomID();
- return "<?php \$_lang".$hash." = ob_get_contents(); ob_end_clean(); echo \wcf\system\WCF::getLanguage()->get(\$_lang".$hash."); ?>";
+ return "<?php echo \wcf\system\WCF::getLanguage()->get(ob_get_clean()); ?>";
}
}