Skip to content

Commit

Permalink
花晨月夕的建议,修改Template类;
Browse files Browse the repository at this point in the history
  • Loading branch information
rainbowsoft committed Nov 2, 2023
1 parent 8e73539 commit 1d8e979
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zb_system/function/lib/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public function CompileFiles()
}
}
foreach ($this->templates as $name => $content) {
$s = RemoveBOM($this->CompileFile($content));
$s = RemoveBOM($this->CompileFile($content, $name));
@file_put_contents($this->path . $name . '.php', $s);
}
}
Expand Down Expand Up @@ -324,10 +324,10 @@ protected function addNonexistentTags()
*
* @return mixed
*/
public function CompileFile($content)
public function CompileFile($content, $filename = '')
{
foreach ($GLOBALS['hooks']['Filter_Plugin_Template_Compiling_Begin'] as $fpname => &$fpsignal) {
$fpreturn = $fpname($this, $content);
$fpreturn = $fpname($this, $content, $filename);
if ($fpsignal == PLUGIN_EXITSIGNAL_RETURN) {
$fpsignal = PLUGIN_EXITSIGNAL_NONE;

Expand Down

0 comments on commit 1d8e979

Please sign in to comment.