diff --git a/phpBB/adm/admin_viewlogs.php b/phpBB/adm/admin_viewlogs.php
index 620e423a47..37034d49fe 100644
--- a/phpBB/adm/admin_viewlogs.php
+++ b/phpBB/adm/admin_viewlogs.php
@@ -147,9 +147,11 @@ $log_data = array();
$log_count = 0;
view_log($mode, $log_data, $log_count, $config['topics_per_page'], $start, $forum_id, 0, 0, $sql_where, $sql_sort);
+$row_class = '';
+
if ($log_count)
{
- for($i = 0; $i < sizeof($log_data); $i++)
+ for ($i = 0; $i < sizeof($log_data); $i++)
{
$row_class = ($row_class == 'row1') ? 'row2' : 'row1';
@@ -165,7 +167,7 @@ if ($log_count)
foreach (array('viewtopic', 'viewlogs', 'viewforum') as $check)
{
- if ($log_data[$i][$check])
+ if (isset($log_data[$i][$check]) && $log_data[$i][$check])
{
$data[] = '' . $user->lang['LOGVIEW_' . strtoupper($check)] . '';
}
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('
', $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'] = '';
}
+ $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'];
diff --git a/phpBB/language/en/admin.php b/phpBB/language/en/admin.php
index 1af0520fc7..cb3693a3ff 100644
--- a/phpBB/language/en/admin.php
+++ b/phpBB/language/en/admin.php
@@ -144,12 +144,12 @@ $lang += array(
'LOG_PRUNE' => 'Pruned forums
» %s',
'LOG_AUTO_PRUNE' => 'Auto-pruned forums
» %s',
- 'LOG_BAN_EXCLUDE_USER' => 'Excluded user from ban for reason %s
» %s ',
- 'LOG_BAN_EXCLUDE_IP' => 'Excluded ip from ban for reason %s
» %s ',
- 'LOG_BAN_EXCLUDE_EMAIL' => 'Excluded email from ban for reason %s
» %s ',
- 'LOG_BAN_USER' => 'Banned User for reason %s
» %s ',
- 'LOG_BAN_IP' => 'Banned ip for reason %s
» %s',
- 'LOG_BAN_EMAIL' => 'Banned email for reason %s
» %s',
+ 'LOG_BAN_EXCLUDE_USER' => 'Excluded user from ban for reason "%s"
» %s ',
+ 'LOG_BAN_EXCLUDE_IP' => 'Excluded ip from ban for reason "%s"
» %s ',
+ 'LOG_BAN_EXCLUDE_EMAIL' => 'Excluded email from ban for reason "%s"
» %s ',
+ 'LOG_BAN_USER' => 'Banned User for reason "%s"
» %s ',
+ 'LOG_BAN_IP' => 'Banned ip for reason "%s"
» %s',
+ 'LOG_BAN_EMAIL' => 'Banned email for reason "%s"
» %s',
'LOG_UNBAN_USER' => 'Unbanned user
» %s',
'LOG_UNBAN_IP' => 'Unbanned ip
» %s',
'LOG_UNBAN_EMAIL' => 'Unbanned email
» %s',
diff --git a/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html b/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html
index 5b22975b9b..4f175ac0ff 100644
--- a/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html
+++ b/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html
@@ -52,52 +52,14 @@
{L_AUTHOR} | {L_MESSAGE} | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
+ ![]() |
||||||||||
-
-
-
- {AUTHOR_NAME}
- - -
{L_JOINED}: {AUTHOR_JOINED} - {L_POSTS}: {AUTHOR_POSTS} - {L_LOCATION}: {AUTHOR_FROM} - - - |
|