| 1: | <?php
|
| 2: |
|
| 3: | |
| 4: | |
| 5: | |
| 6: | |
| 7: | |
| 8: | |
| 9: | |
| 10: | |
| 11: |
|
| 12: | class Smarty_Internal_Method_MustCompile
|
| 13: | {
|
| 14: | |
| 15: | |
| 16: | |
| 17: | |
| 18: |
|
| 19: | public $objMap = 2;
|
| 20: |
|
| 21: | |
| 22: | |
| 23: | |
| 24: | |
| 25: | |
| 26: | |
| 27: | |
| 28: | |
| 29: | |
| 30: |
|
| 31: | public function mustCompile(Smarty_Internal_Template $_template)
|
| 32: | {
|
| 33: | if (!$_template->source->exists) {
|
| 34: | if ($_template->_isSubTpl()) {
|
| 35: | $parent_resource = " in '$_template->parent->template_resource}'";
|
| 36: | } else {
|
| 37: | $parent_resource = '';
|
| 38: | }
|
| 39: | throw new SmartyException("Unable to load template {$_template->source->type} '{$_template->source->name}'{$parent_resource}");
|
| 40: | }
|
| 41: | if ($_template->mustCompile === null) {
|
| 42: | $_template->mustCompile = (!$_template->source->handler->uncompiled &&
|
| 43: | ($_template->smarty->force_compile || $_template->source->handler->recompiled ||
|
| 44: | !$_template->compiled->exists || ($_template->compile_check &&
|
| 45: | $_template->compiled->getTimeStamp() <
|
| 46: | $_template->source->getTimeStamp())));
|
| 47: | }
|
| 48: | return $_template->mustCompile;
|
| 49: | }
|
| 50: | }
|
| 51: | |