mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-17 22:11:26 +02:00
- some fixes/changes
git-svn-id: file:///svn/phpbb/trunk@5035 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
@@ -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';
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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
|
||||
|
@@ -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];
|
||||
|
@@ -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'];
|
||||
|
Reference in New Issue
Block a user