View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000760 | OXID eShop (all versions) | 2. ----- eShop backend (admin) ----- | public | 2009-04-01 09:54 | 2009-04-15 10:28 |
Reporter | Spritje | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.0.1.0 revision 15990 | ||||
Fixed in Version | 4.1.1 revision 18442 | ||||
Summary | 0000760: PHP code ist not executed in the templates, but in the backend the option "Execute PHP Code" is set. | ||||
Description | In the Backend if the setting is set to Stammdaten -> Grundeinstellungen -> System -> Weitere Einstellungen -> Execute PHP Code (Wie soll man mit PHP-Code innerhalb von Smarty Templates umgehen) the Code will not be executed. In the details template i put the following PHP code on line one <?php echo("Hallo Welt")?> You can see the result in the attached jpg. | ||||
Additional Information | Looks like the option "How to handle PHP code embedded in Smarty templates" in Stammdaten -> Grundeinstellungen -> System -> Weitere Einstellungen not works at all. No matter, what value is selected in this option, it always gives the same result in frontend: echo("Hallo Welt") | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Theme | |||||
Browser | All | ||||
PHP Version | 5.2.6 | ||||
Database Version | 5.0.33 | ||||
related to | 0000963 | resolved | arvydas_vapsva | How to handle PHP code embedded in Smarty templates |
|
Problem was in oxUtilsView::_fillCommonSmartyProperties() method, where by default was set: $oSmarty->php_handling = SMARTY_PHP_REMOVE; $oSmarty->security = true; after fix it looks like: if ( !$myConfig->isDemoShop() ) { $oSmarty->php_handling = (int) $myConfig->getConfigParam( 'iSmartyPhpHandling' ); $oSmarty->security = false; } else { $oSmarty->php_handling = SMARTY_PHP_REMOVE; $oSmarty->security = true; } |