aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/admin_viewlogs.php6
-rw-r--r--phpBB/includes/acm/acm_file.php6
-rw-r--r--phpBB/includes/bbcode.php3
-rw-r--r--phpBB/includes/functions_display.php12
-rw-r--r--phpBB/includes/message_parser.php9
-rw-r--r--phpBB/includes/template.php2
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php4
-rw-r--r--phpBB/language/en/admin.php12
-rw-r--r--phpBB/styles/subSilver/template/ucp_pm_viewmessage.html43
9 files changed, 31 insertions, 66 deletions
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[] = '<a href="' . $log_data[$i][$check] . '">' . $user->lang['LOGVIEW_' . strtoupper($check)] . '</a>';
}
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'];
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' => '<b>Pruned forums</b><br />&#187; %s',
'LOG_AUTO_PRUNE' => '<b>Auto-pruned forums</b><br />&#187; %s',
- 'LOG_BAN_EXCLUDE_USER' => '<b>Excluded user from ban</b> for reason %s<br />&#187; %s ',
- 'LOG_BAN_EXCLUDE_IP' => '<b>Excluded ip from ban</b> for reason %s<br />&#187; %s ',
- 'LOG_BAN_EXCLUDE_EMAIL' => '<b>Excluded email from ban</b> for reason %s<br />&#187; %s ',
- 'LOG_BAN_USER' => '<b>Banned User</b> for reason %s<br />&#187; %s ',
- 'LOG_BAN_IP' => '<b>Banned ip</b> for reason %s<br />&#187; %s',
- 'LOG_BAN_EMAIL' => '<b>Banned email</b> for reason %s<br />&#187; %s',
+ 'LOG_BAN_EXCLUDE_USER' => '<b>Excluded user from ban</b> for reason "<i>%s</i>"<br />&#187; %s ',
+ 'LOG_BAN_EXCLUDE_IP' => '<b>Excluded ip from ban</b> for reason "<i>%s</i>"<br />&#187; %s ',
+ 'LOG_BAN_EXCLUDE_EMAIL' => '<b>Excluded email from ban</b> for reason "<i>%s</i>"<br />&#187; %s ',
+ 'LOG_BAN_USER' => '<b>Banned User</b> for reason "<i>%s</i>"<br />&#187; %s ',
+ 'LOG_BAN_IP' => '<b>Banned ip</b> for reason "<i>%s</i>"<br />&#187; %s',
+ 'LOG_BAN_EMAIL' => '<b>Banned email</b> for reason "<i>%s</i>"<br />&#187; %s',
'LOG_UNBAN_USER' => '<b>Unbanned user</b><br />&#187; %s',
'LOG_UNBAN_IP' => '<b>Unbanned ip</b><br />&#187; %s',
'LOG_UNBAN_EMAIL' => '<b>Unbanned email</b><br />&#187; %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 @@
<table class="tablebg" width="100%" cellspacing="1" cellpadding="0">
<tr>
- <th width="150" nowrap="nowrap">{L_AUTHOR}</th>
<th nowrap="nowrap">{L_MESSAGE}</th>
</tr>
<tr>
- <td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
+ <td class="spacer" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr class="row1">
- <td valign="top">
-
- <div align="center">
-
- <b class="postauthor">{AUTHOR_NAME}</b><br /><br />
-
- <table cellspacing="4" align="center">
- <!-- IF ONLINE_IMG -->
- <tr>
- <td>{ONLINE_IMG}</td>
- </tr>
- <!-- ENDIF -->
- <!-- IF AUTHOR_RANK -->
- <tr>
- <td class="postdetails">{AUTHOR_RANK}</td>
- </tr>
- <!-- ENDIF -->
- <!-- IF RANK_IMAGE -->
- <tr>
- <td>{RANK_IMAGE}</td>
- </tr>
- <!-- ENDIF -->
- <!-- IF AUTHOR_AVATAR -->
- <tr>
- <td>{AUTHOR_AVATAR}</td>
- </tr>
- <!-- ENDIF -->
- </table>
-
- <span class="postdetails">
- <!-- IF AUTHOR_POSTS --><br /><b>{L_JOINED}:</b> {AUTHOR_JOINED}<!-- ENDIF -->
- <!-- IF AUTHOR_POSTS --><br /><b>{L_POSTS}:</b> {AUTHOR_POSTS}<!-- ENDIF -->
- <!-- IF AUTHOR_FROM --><br /><b>{L_LOCATION}:</b> {AUTHOR_FROM}<!-- ENDIF -->
- </span>
-
- </div>
- </td>
<td valign="top"><table width="100%" cellspacing="5">
<tr>
<td>
@@ -153,12 +115,11 @@
</tr>
<tr class="row1">
- <td></td>
<td><div class="gensmall" style="float:left">&nbsp;<!-- IF U_AUTHOR_PROFILE --><a href="{U_AUTHOR_PROFILE}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF U_EMAIL --><a href="{U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF -->&nbsp;</div> <div class="gensmall" style="float:right"><!-- IF U_QUOTE --><a href="{U_QUOTE}">{QUOTE_IMG}</a> <!-- ENDIF --> <!-- IF U_POST_REPLY_PM --><a href="{U_POST_REPLY_PM}">{REPLY_IMG}</a><!-- ENDIF --> <!-- IF U_EDIT --><a href="{U_EDIT}">{EDIT_IMG}</a> <!-- ENDIF -->&nbsp;</div></td>
</tr>
<tr>
- <td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
+ <td class="spacer" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
</table>