|
@@ 244-255 (lines=12) @@
|
| 241 |
|
$rdq = preg_quote($this->right_delimiter, '~'); |
| 242 |
|
|
| 243 |
|
// run template source through prefilter functions |
| 244 |
|
if (count($this->_plugins['prefilter']) > 0) { |
| 245 |
|
foreach ($this->_plugins['prefilter'] as $filter_name => $prefilter) { |
| 246 |
|
if ($prefilter === false) continue; |
| 247 |
|
if ($prefilter[3] || is_callable($prefilter[0])) { |
| 248 |
|
$source_content = call_user_func_array($prefilter[0], |
| 249 |
|
array($source_content, &$this)); |
| 250 |
|
$this->_plugins['prefilter'][$filter_name][3] = true; |
| 251 |
|
} else { |
| 252 |
|
$this->_trigger_fatal_error("[plugin] prefilter '$filter_name' is not implemented"); |
| 253 |
|
} |
| 254 |
|
} |
| 255 |
|
} |
| 256 |
|
|
| 257 |
|
/* fetch all special blocks */ |
| 258 |
|
$search = "~{$ldq}\*(.*?)\*{$rdq}|{$ldq}\s*literal\s*{$rdq}(.*?){$ldq}\s*/literal\s*{$rdq}|{$ldq}\s*php\s*{$rdq}(.*?){$ldq}\s*/php\s*{$rdq}~s"; |
|
@@ 386-397 (lines=12) @@
|
| 383 |
|
} |
| 384 |
|
|
| 385 |
|
// run compiled template through postfilter functions |
| 386 |
|
if (count($this->_plugins['postfilter']) > 0) { |
| 387 |
|
foreach ($this->_plugins['postfilter'] as $filter_name => $postfilter) { |
| 388 |
|
if ($postfilter === false) continue; |
| 389 |
|
if ($postfilter[3] || is_callable($postfilter[0])) { |
| 390 |
|
$compiled_content = call_user_func_array($postfilter[0], |
| 391 |
|
array($compiled_content, &$this)); |
| 392 |
|
$this->_plugins['postfilter'][$filter_name][3] = true; |
| 393 |
|
} else { |
| 394 |
|
$this->_trigger_fatal_error("Smarty plugin error: postfilter '$filter_name' is not implemented"); |
| 395 |
|
} |
| 396 |
|
} |
| 397 |
|
} |
| 398 |
|
|
| 399 |
|
// put header at the top of the compiled template |
| 400 |
|
$template_header = "<?php /* Smarty version ".$this->_version.", created on ".strftime("%Y-%m-%d %H:%M:%S")."\n"; |