diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index c9a0ac9876..5db02b774a 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -112,10 +112,10 @@ function generate_forum_nav(&$forum_data)
if (empty($forum_data['forum_parents']))
{
$sql = 'SELECT forum_id, forum_name
- FROM ' . FORUMS_TABLE . '
- WHERE left_id < ' . $forum_data['left_id'] . '
- AND right_id > ' . $forum_data['right_id'] . '
- ORDER BY left_id ASC';
+ FROM ' . FORUMS_TABLE . '
+ WHERE left_id < ' . $forum_data['left_id'] . '
+ AND right_id > ' . $forum_data['right_id'] . '
+ ORDER BY left_id ASC';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
@@ -124,8 +124,8 @@ function generate_forum_nav(&$forum_data)
}
$sql = 'UPDATE ' . FORUMS_TABLE . "
- SET forum_parents = '" . $db->sql_escape(serialize($forum_parents)) . "'
- WHERE parent_id = " . $forum_data['parent_id'];
+ SET forum_parents = '" . $db->sql_escape(serialize($forum_parents)) . "'
+ WHERE parent_id = " . $forum_data['parent_id'];
$db->sql_query($sql);
}
else
@@ -150,7 +150,7 @@ function generate_forum_nav(&$forum_data)
$template->assign_vars(array(
'FORUM_ID' => $forum_data['forum_id'],
'FORUM_NAME' => $forum_data['forum_name'],
- 'FORUM_DESC' => strip_tags($forum_data['forum_desc'])
+ 'FORUM_DESC' => $forum_data['forum_desc']
));
return;
@@ -186,15 +186,51 @@ function get_moderators(&$forum_moderators, $forum_id = false)
}
// User authorisation levels output
-function get_forum_rules($mode, &$rules, &$forum_id)
+function gen_forum_rules($mode, &$forum_id)
{
- global $SID, $auth, $user;
+ global $SID, $template, $auth, $user;
- $rules .= (($auth->acl_gets('f_post', 'm_', 'a_', $forum_id)) ? $user->lang['Rules_post_can'] : $user->lang['Rules_post_cannot']) . '
';
- $rules .= (($auth->acl_gets('f_reply', 'm_', 'a_', $forum_id)) ? $user->lang['Rules_reply_can'] : $user->lang['Rules_reply_cannot']) . '
';
- $rules .= (($auth->acl_gets('f_edit', 'm_', 'a_', $forum_id)) ? $user->lang['Rules_edit_can'] : $user->lang['Rules_edit_cannot']) . '
';
- $rules .= (($auth->acl_gets('f_delete', 'm_', 'a_', $forum_id) || $auth->acl_get('m_delete', $forum_id)) ? $user->lang['Rules_delete_can'] : $user->lang['Rules_delete_cannot']) . '
';
- $rules .= (($auth->acl_gets('f_attach', 'm_', 'a_', $forum_id)) ? $user->lang['Rules_attach_can'] : $user->lang['Rules_attach_cannot']) . '
';
+ $rules = array('post', 'reply', 'edit', 'delete', 'attach');
+
+ foreach ($rules as $rule)
+ {
+ $template->assign_block_vars('rules', array(
+ 'RULE' => ($auth->acl_gets('f_' . $rule, 'm_', 'a_', $forum_id)) ? $user->lang['RULES_' . strtoupper($rule) . '_CAN'] : $user->lang['RULES_' . strtoupper($rule) . '_CANNOT'])
+ );
+ }
+
+ return;
+}
+
+function gen_sort_selects(&$limit_days, &$sort_by_text, &$s_limit_days, &$s_sort_key, &$s_sort_dir)
+{
+ global $user;
+
+ $sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']);
+
+ $s_limit_days = '';
+
+ $s_sort_key = '';
+
+ $s_sort_dir = '';
return;
}
diff --git a/phpBB/includes/page_header.php b/phpBB/includes/page_header.php
index d4eff4578a..f01716fd31 100644
--- a/phpBB/includes/page_header.php
+++ b/phpBB/includes/page_header.php
@@ -269,17 +269,17 @@ $template->assign_vars(array(
'SITENAME' => $config['sitename'],
'SITE_DESCRIPTION' => $config['site_desc'],
'PAGE_TITLE' => $page_title,
- 'LAST_VISIT_DATE' => sprintf($user->lang['You_last_visit'], $s_last_visit),
- 'CURRENT_TIME' => sprintf($user->lang['Current_time'], $user->format_date(time())),
+ 'LAST_VISIT_DATE' => sprintf($user->lang['YOU_LAST_VISIT'], $s_last_visit),
+ 'CURRENT_TIME' => sprintf($user->lang['CURRENT_TIME'], $user->format_date(time())),
'TOTAL_USERS_ONLINE' => $l_online_users,
'LOGGED_IN_USER_LIST' => $online_userlist,
- 'RECORD_USERS' => sprintf($user->lang['Record_online_users'], $config['record_online_users'], $user->format_date($config['record_online_date'])),
+ 'RECORD_USERS' => sprintf($user->lang['RECORD_ONLINE_USERS'], $config['record_online_users'], $user->format_date($config['record_online_date'])),
'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text,
'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new,
'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread,
'L_LOGIN_LOGOUT' => $l_login_logout,
- 'L_INDEX' => $user->lang['Forum_Index'],
+ 'L_INDEX' => $user->lang['FORUM_INDEX'],
'U_PRIVATEMSGS' => 'privmsg.'.$phpEx.$SID.'&folder=inbox',
'U_MEMBERLIST' => 'memberlist.'.$phpEx.$SID,
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index de1ef3aaa8..bedb211f25 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -72,7 +72,7 @@ class session
if ($this->load > doubleval($config['limit_load']))
{
- trigger_error('Board_unavailable');
+ trigger_error('BOARD_UNAVAILABLE');
}
}
}
@@ -150,7 +150,7 @@ class session
if (intval($row['sessions']) > intval($config['active_sessions']))
{
- trigger_error('Board_unavailable');
+ trigger_error('BOARD_UNAVAILABLE');
}
}
@@ -215,7 +215,10 @@ class session
if ($banned)
{
- trigger_error('You_been_banned');
+ // TODO
+ // Note that at present this doesn't surround the administrator
+ // text with an appropriate URL
+ trigger_error('BOARD_BANNED');
}
}
@@ -449,8 +452,7 @@ class user extends session
AND t.template_id = s.template_id
AND c.theme_id = s.style_id
AND i.imageset_id = s.imageset_id";
-
- $result = $db->sql_query($sql);
+ $result = $db->sql_query($sql, 600);
if (!($this->theme = $db->sql_fetchrow($result)))
{
@@ -488,7 +490,7 @@ class user extends session
$alt = (!empty($this->lang[$alt])) ? $this->lang[$alt] : '';
$width = ($width) ? 'width="' . $width . '" ' : '';
- $imgs[$img] = '
img_lang, $this->theme[$img]) . '" ' . $width . 'alt="' . $alt . '" title="' . $alt . '" />';
+ $imgs[$img] = '
img_lang, $this->theme[$img]) . ' ' . $width . 'alt="' . $alt . '" title="' . $alt . '" />';
}
return $imgs[$img];
}
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php
index 7a89c634e0..9f1fe1b57b 100644
--- a/phpBB/includes/template.php
+++ b/phpBB/includes/template.php
@@ -724,6 +724,10 @@ class Template {
return;
}
+
+
+
+
function compile_cache_clear($mode, &$dir, &$template)
{
$template_list = array();
@@ -795,8 +799,6 @@ class Template {
'#\' \. \(\(isset\(\$this\->_tpldata\[\'([a-z0-9_\.]+?)\'\].*?[\'([a-z0-9_\.]+?)\'\].*?\[\'([A-Z0-9_]+?)\'\]\)\).*?\'\'\) \. \'#s',
);
-//' . ((isset($this->_tpldata['faq_block_link.'][$_faq_block_link_i]['faq_row_link.'][$_faq_row_link_i]['U_FAQ_LINK'])) ? $this->_tpldata['faq_block_link.'][$_faq_block_link_i]['faq_row_link.'][$_faq_row_link_i]['U_FAQ_LINK'] : '') . '
-
$replace_tags = array(
'\1',
'\1',