From 17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd Mon Sep 17 00:00:00 2001 From: David M Date: Wed, 4 Jan 2006 06:37:17 +0000 Subject: - 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 --- phpBB/includes/functions_display.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'phpBB/includes/functions_display.php') diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 15f48e10b4..647fb0f972 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -675,12 +675,10 @@ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_ $attachment_tpl = array(); $template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/attachment.html'; - if (!($fp = @fopen($template_filename, 'rb'))) + if (($attachment_template = file_get_contents($template_filename)) === false) { trigger_error('Could not load template file "' . $template_filename . '"'); } - $attachment_template = fread($fp, filesize($template_filename)); - @fclose($fp); // replace \ with \\ and then ' with \'. $attachment_template = str_replace('\\', '\\\\', $attachment_template); -- cgit v1.2.1