diff options
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/acm/acm_file.php | 6 | ||||
-rw-r--r-- | phpBB/includes/bbcode.php | 3 | ||||
-rw-r--r-- | phpBB/includes/functions_display.php | 12 | ||||
-rw-r--r-- | phpBB/includes/message_parser.php | 9 | ||||
-rw-r--r-- | phpBB/includes/template.php | 2 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_pm_viewmessage.php | 4 |
6 files changed, 19 insertions, 17 deletions
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php index 27a126dc84..e4bc077f2b 100644 --- a/phpBB/includes/acm/acm_file.php +++ b/phpBB/includes/acm/acm_file.php @@ -13,7 +13,7 @@ class acm { - var $vars = ''; + var $vars = array(); var $var_expires = array(); var $is_modified = FALSE; @@ -90,7 +90,7 @@ class acm if (file_exists($this->cache_dir . 'data_global.' . $phpEx)) { - if (!is_array($this->vars)) + if (!sizeof($this->vars)) { $this->load(); } @@ -190,7 +190,7 @@ class acm } else { - if (!is_array($this->vars)) + if (!sizeof($this->vars)) { $this->load(); } diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index e0b22fd140..2ed8b00e0e 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -45,6 +45,7 @@ class bbcode if ($bbcode_bitfield !== false) { $this->bbcode_bitfield = $bbcode_bitfield; + // Init those added with a new bbcode_bitfield (already stored codes will not get parsed again) $this->bbcode_cache_init(); } @@ -112,7 +113,7 @@ class bbcode if ($this->bbcode_bitfield & $user->theme['primary']['bbcode_bitfield']) { - $style = (file_exists($phpbb_root_path . 'styles/templates/' . $user->theme['primary']['template_path'] . '/bbcode.html')) ? 'primary' : 'secondary'; + $style = (file_exists($phpbb_root_path . 'styles/' . $user->theme['primary']['template_path'] . '/template/bbcode.html')) ? 'primary' : 'secondary'; } } 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); diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 02e8d685f3..00c57c81e6 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -11,13 +11,6 @@ // // ------------------------------------------------------------- -/* - TODO list for M-3: - - add other languages to syntax highlighter - - better (and unified, wrt other pages such as registration) validation for urls, emails, etc... - - need size limit checks on img/flash tags ... probably warrants some discussion -*/ - if (!defined('IN_PHPBB')) { exit; @@ -718,6 +711,7 @@ class parse_message extends bbcode_firstpass if ($config['max_' . $mode . '_urls'] && $num_urls > $config['max_' . $mode . '_urls']) { $this->warn_msg[] = sprintf($user->lang['TOO_MANY_URLS'], $config['max_' . $mode . '_urls']); + return $this->warn_msg; } if (!$update_this_message) @@ -729,7 +723,6 @@ class parse_message extends bbcode_firstpass $this->message_status = 'parsed'; return; - //return implode('<br />', $this->warn_msg); } // Formatting text for display diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index a95423f4a9..317bf8c5b6 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -157,7 +157,7 @@ class template trigger_error("template->_tpl_load(): No file specified for handle $handle", E_USER_ERROR); } - if (!file_exists($this->files[$handle])) + if (!file_exists($this->files[$handle]) && !empty($user->theme['secondary'])) { $this->tpl = 'secondary'; $this->files[$handle] = $phpbb_root_path . 'styles/' . $user->theme['secondary']['template_path'] . '/template/' . $this->filename[$handle]; diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index b8edbcc0db..1e7964765e 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -15,7 +15,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) { global $phpbb_root_path, $phpEx, $SID, $user, $template, $auth, $config, $db; - $user->add_lang('viewtopic'); + $user->add_lang(array('viewtopic', 'memberlist')); $msg_id = (int) $msg_id; $folder_id = (int) $folder_id; @@ -412,6 +412,8 @@ function get_user_informations($user_id, $user_row) $user_row['avatar'] = '<img src="' . $avatar_img . '" width="' . $user_row['user_avatar_width'] . '" height="' . $user_row['user_avatar_height'] . '" border="0" alt="" />'; } + $user_row['rank_title'] = $user_row['rank_image'] = ''; + if (!empty($user_row['user_rank'])) { $user_row['rank_title'] = $ranks['special'][$user_row['user_rank']]['rank_title']; |