diff options
-rw-r--r-- | phpBB/develop/compile_template.php | 2 | ||||
-rw-r--r-- | phpBB/includes/template.php | 18 | ||||
-rw-r--r-- | phpBB/includes/template_compile.php | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/phpBB/develop/compile_template.php b/phpBB/develop/compile_template.php index e80e0f21b5..e741e909d8 100644 --- a/phpBB/develop/compile_template.php +++ b/phpBB/develop/compile_template.php @@ -21,4 +21,4 @@ include($phpbb_root_path . 'includes/template_compile.'.$phpEx); $file = $argv[1]; $compile = new phpbb_template_compile(); -echo $compile->compile_gen($file); +echo $compile->compile_file($file); diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index ac37dc3dd2..dc461fb60e 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -384,7 +384,7 @@ class phpbb_template $compile = new phpbb_template_compile(); - if ($compile->compile_write($source_file, $this->_compiled_file_for_handle($handle)) === false) + if ($compile->compile_file_to_file($source_file, $this->_compiled_file_for_handle($handle)) === false) { return false; } @@ -443,7 +443,7 @@ class phpbb_template $source_file = $this->_source_file_for_handle($handle); - if (($code = $compile->compile_gen($source_file)) === false) + if (($code = $compile->compile_file($source_file)) === false) { return false; } @@ -509,13 +509,13 @@ class phpbb_template { if ($row['template_filename'] == $this->filename[$handle]) { - $compile->compile_write($source_file, $this->_compiled_file_for_handle($handle)); + $compile->compile_file_to_file($source_file, $this->_compiled_file_for_handle($handle)); } else { $this->files[$row['template_filename']] = $file; $this->filename[$row['template_filename']] = $row['template_filename']; - $compile->compile_write($this->_source_file_for_handle($row['template_filename']), $this->_compiled_file_for_handle($row['template_filename'])); + $compile->compile_file_to_file($this->_source_file_for_handle($row['template_filename']), $this->_compiled_file_for_handle($row['template_filename'])); unset($this->compiled_code[$row['template_filename']]); unset($this->files[$row['template_filename']]); unset($this->filename[$row['template_filename']]); @@ -525,7 +525,7 @@ class phpbb_template if ($row['template_filename'] == $this->filename[$handle]) { $this->compiled_code[$handle] = $compile->compile(trim($row['template_data'])); - $compile->compile_write($handle, $this->compiled_code[$handle]); + $compile->compile_file_to_file($handle, $this->compiled_code[$handle]); } else { @@ -533,7 +533,7 @@ class phpbb_template if (!file_exists($this->cachepath . str_replace('/', '.', $row['template_filename']) . '.' . $phpEx)) { $this->filename[$row['template_filename']] = $row['template_filename']; - $compile->compile_write($row['template_filename'], $compile->compile(trim($row['template_data']))); + $compile->compile_file_to_file($row['template_filename'], $compile->compile(trim($row['template_data']))); unset($this->filename[$row['template_filename']]); } } @@ -551,14 +551,14 @@ class phpbb_template $this->files_template[$row['template_filename']] = $user->theme['template_inherits_id']; } // Try to load from filesystem and instruct to insert into the styles table... - $compile->compile_write($source_file, $this->_compiled_file_for_handle($handle)); + $compile->compile_file_to_file($source_file, $this->_compiled_file_for_handle($handle)); return false; } return false; } - $compile->compile_write($source_file, $this->_compiled_file_for_handle($handle)); + $compile->compile_file_to_file($source_file, $this->_compiled_file_for_handle($handle)); return false; } @@ -838,7 +838,7 @@ class phpbb_template $compile = new phpbb_template_compile(); $source_file = $this->_source_file_for_handle($handle); - if (($code = $compile->compile_gen($source_file)) !== false) + if (($code = $compile->compile_file($source_file)) !== false) { $code = ' ?> ' . $code . ' <?php '; eval($code); diff --git a/phpBB/includes/template_compile.php b/phpBB/includes/template_compile.php index dfbf578b58..553f99bd8c 100644 --- a/phpBB/includes/template_compile.php +++ b/phpBB/includes/template_compile.php @@ -871,7 +871,7 @@ class phpbb_template_compile * @param string $source_file Source template file * @return bool Return true on success otherwise false */ - public function compile_write($source_file, $compiled_file) + public function compile_file_to_file($source_file, $compiled_file) { $source_handle = @fopen($source_file, 'rb'); $destination_handle = @fopen($compiled_file, 'wb'); @@ -903,7 +903,7 @@ class phpbb_template_compile * @param string $source_file Source template file * @return string|bool Return compiled code on successful compilation otherwise false */ - public function compile_gen($source_file) + public function compile_file($source_file) { $source_handle = @fopen($source_file, 'rb'); $destination_handle = @fopen('php://temp' ,'r+b'); |