Fixes #4553: Smarty enhancements
Merge pull request #4619 from yiisoft/smarty

Smarty improvements