| @@ 58-71 (lines=14) @@ | ||
| 55 | ||
| 56 | $modCheck = $tpl->getIsModifiedCode(); |
|
| 57 | ||
| 58 | if ($modCheck) { |
|
| 59 | $out .= 'if (!(' . $modCheck . ')) { ob_end_clean(); return false; }'; |
|
| 60 | } else { |
|
| 61 | $out .= 'try { |
|
| 62 | $tpl = $this->templateFactory("' . $resource . '", "' . $identifier . '"); |
|
| 63 | } catch (Dwoo\Exception $e) { |
|
| 64 | $this->triggerError(\'Load Templates : Resource <em>' . $resource . '</em> was not added to Dwoo, can not extend <em>' . $identifier . '</em>\', E_USER_WARNING); |
|
| 65 | } |
|
| 66 | if ($tpl === null) |
|
| 67 | $this->triggerError(\'Load Templates : Resource "' . $resource . ':' . $identifier . '" was not found.\', E_USER_WARNING); |
|
| 68 | elseif ($tpl === false) |
|
| 69 | $this->triggerError(\'Load Templates : Resource "' . $resource . '" does not support extends.\', E_USER_WARNING); |
|
| 70 | if ($tpl->getUid() != "' . $tpl->getUid() . '") { ob_end_clean(); return false; }'; |
|
| 71 | } |
|
| 72 | ||
| 73 | return $out; |
|
| 74 | } |
|
| @@ 82-95 (lines=14) @@ | ||
| 79 | ||
| 80 | $modCheck = $tpl->getIsModifiedCode(); |
|
| 81 | ||
| 82 | if ($modCheck) { |
|
| 83 | $out .= 'if (!(' . $modCheck . ')) { ob_end_clean(); return false; }'; |
|
| 84 | } else { |
|
| 85 | $out .= 'try { |
|
| 86 | $tpl = $this->templateFactory("' . $resource . '", "' . $identifier . '"); |
|
| 87 | } catch (Dwoo\Exception $e) { |
|
| 88 | $this->triggerError(\'Load Templates : Resource <em>' . $resource . '</em> was not added to Dwoo, can not extend <em>' . $identifier . '</em>\', E_USER_WARNING); |
|
| 89 | } |
|
| 90 | if ($tpl === null) |
|
| 91 | $this->triggerError(\'Load Templates : Resource "' . $resource . ':' . $identifier . '" was not found.\', E_USER_WARNING); |
|
| 92 | elseif ($tpl === false) |
|
| 93 | $this->triggerError(\'Load Templates : Resource "' . $resource . '" does not support extends.\', E_USER_WARNING); |
|
| 94 | if ($tpl->getUid() != "' . $tpl->getUid() . '") { ob_end_clean(); return false; }'; |
|
| 95 | } |
|
| 96 | ||
| 97 | return $out; |
|
| 98 | } |
|