diff options
author | David M <davidmj@users.sourceforge.net> | 2006-01-04 06:37:17 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2006-01-04 06:37:17 +0000 |
commit | 17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd (patch) | |
tree | a336e7f3bff32c0afe1e78c67efdfc8f2ee71f53 /phpBB/includes/functions_template.php | |
parent | 6583da5bf03f563b97047871d60ed3ae70af69d0 (diff) | |
download | forums-17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd.tar forums-17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd.tar.gz forums-17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd.tar.bz2 forums-17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd.tar.xz forums-17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd.zip |
- file_get_contents instead of imploding file()s or fread()ing till the maximum filesize
- language and style properly use compression
- language now prompts user for methods
- functions_compress does not need to eval() to get a hex date, instead calls pack()
- A writing method is defined at the end of tar operations only if data has been sent to the archive
- BBCode parser does not have to eval(), it instead uses the regex to loop around the matches
Hopefully nothing broke :-)
git-svn-id: file:///svn/phpbb/trunk@5422 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_template.php')
-rw-r--r-- | phpBB/includes/functions_template.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/phpBB/includes/functions_template.php b/phpBB/includes/functions_template.php index 429346b7a4..88ea84d41d 100644 --- a/phpBB/includes/functions_template.php +++ b/phpBB/includes/functions_template.php @@ -44,13 +44,12 @@ class template_compile function _tpl_load_file($handle) { // Try and open template for read - if (!($fp = @fopen($this->template->files[$handle], 'r'))) + if (!file_exists($this->template->files[$handle])) { trigger_error("template->_tpl_load_file(): File {$this->template->files[$handle]} does not exist or is empty", E_USER_ERROR); } - $this->template->compiled_code[$handle] = $this->compile(trim(@fread($fp, filesize($this->template->files[$handle])))); - @fclose($fp); + $this->template->compiled_code[$handle] = $this->compile(trim(@file_get_contents($this->template->files[$handle]))); // Actually compile the code now. $this->compile_write($handle, $this->template->compiled_code[$handle]); |