aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_display.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2004-12-19 17:59:15 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2004-12-19 17:59:15 +0000
commit5ac4556ef18b87a040515bc33b5863af0f2e4795 (patch)
tree90a1e105bbad824aedfeafe6a69781f86bfa8d89 /phpBB/includes/functions_display.php
parent3c6c673476a90a22c0dc1c5f99b2c47b25a1be0e (diff)
downloadforums-5ac4556ef18b87a040515bc33b5863af0f2e4795.tar
forums-5ac4556ef18b87a040515bc33b5863af0f2e4795.tar.gz
forums-5ac4556ef18b87a040515bc33b5863af0f2e4795.tar.bz2
forums-5ac4556ef18b87a040515bc33b5863af0f2e4795.tar.xz
forums-5ac4556ef18b87a040515bc33b5863af0f2e4795.zip
- some fixes/changes
git-svn-id: file:///svn/phpbb/trunk@5035 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_display.php')
-rw-r--r--phpBB/includes/functions_display.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 70636a8962..a01f58d9b6 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -500,11 +500,17 @@ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_
$attachment_tpl = array();
// Generate Template
- // TODO: secondary template
- $template_filename = $phpbb_root_path . 'styles/' . $user->theme['primary']['template_path'] . '/template/attachment.html';
+ $style = 'primary';
+
+ if (!empty($user->theme['secondary']))
+ {
+ $style = (file_exists($phpbb_root_path . 'styles/' . $user->theme['primary']['template_path'] . '/template/attachment.html')) ? 'primary' : 'secondary';
+ }
+
+ $template_filename = $phpbb_root_path . 'styles/' . $user->theme[$style]['template_path'] . '/template/attachment.html';
if (!($fp = @fopen($template_filename, 'rb')))
{
- trigger_error('Could not load attachment template');
+ trigger_error('Could not load template file "' . $template_filename . '"');
}
$attachment_template = fread($fp, filesize($template_filename));
@fclose($fp);