mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
- support re-caching of theme data if stylesheet.css changed and load_tplcompile enabled
- mcp fixes - fixed some usability issues git-svn-id: file:///svn/phpbb/trunk@6447 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -2310,7 +2310,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
|
||||
{
|
||||
foreach ($matches[0] as $idx => $match)
|
||||
{
|
||||
$stylesheet = str_replace($match, $this->load_css_file($theme_row['theme_path'], $matches[1][$idx]), $stylesheet);
|
||||
$stylesheet = str_replace($match, acp_styles::load_css_file($theme_row['theme_path'], $matches[1][$idx]), $stylesheet);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -406,6 +406,7 @@ if (!function_exists('realpath'))
|
||||
* @copyright 2006 Project Minerva Team
|
||||
* @param string $path The path which we should attempt to resolve.
|
||||
* @return mixed
|
||||
* @ignore
|
||||
*/
|
||||
function phpbb_realpath($path)
|
||||
{
|
||||
@@ -582,6 +583,7 @@ else
|
||||
{
|
||||
/**
|
||||
* A wrapper for realpath
|
||||
* @ignore
|
||||
*/
|
||||
function phpbb_realpath($path)
|
||||
{
|
||||
|
@@ -1117,7 +1117,7 @@ function validate_username($username)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!preg_match('#^' . str_replace('\\\\', '\\', $config['allow_name_chars']) . '$#i', $username))
|
||||
if (!preg_match('#^' . str_replace('\\\\', '\\', $config['allow_name_chars']) . '$#i', $username) || strpos($username, '"') !== false || strpos($username, '"') !== false)
|
||||
{
|
||||
return 'INVALID_CHARS';
|
||||
}
|
||||
|
@@ -74,6 +74,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
||||
'S_CAN_LOCK' => $auth->acl_get('m_lock', $forum_id),
|
||||
'S_CAN_SYNC' => $auth->acl_get('m_', $forum_id),
|
||||
'S_CAN_APPROVE' => $auth->acl_get('m_approve', $forum_id),
|
||||
'S_MERGE_SELECT' => ($action == 'merge_select') ? true : false,
|
||||
|
||||
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
|
||||
'U_VIEW_FORUM_LOGS' => ($auth->acl_gets('a_', 'm_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=logs&mode=forum_logs&f=' . $forum_id) : '',
|
||||
|
@@ -134,6 +134,7 @@ function mcp_post_details($id, $mode, $action)
|
||||
'REPORTED_IMG' => $user->img('icon_topic_reported', $user->lang['POST_REPORTED']),
|
||||
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', $user->lang['POST_UNAPPROVED']),
|
||||
'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['EDIT_POST']),
|
||||
'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
|
||||
|
||||
'POSTER_NAME' => $poster,
|
||||
'POST_PREVIEW' => $message,
|
||||
@@ -220,20 +221,8 @@ function mcp_post_details($id, $mode, $action)
|
||||
$sql = 'SELECT poster_id, COUNT(poster_id) as postings
|
||||
FROM ' . POSTS_TABLE . "
|
||||
WHERE poster_ip = '" . $db->sql_escape($post_info['poster_ip']) . "'
|
||||
GROUP BY poster_id";
|
||||
|
||||
// Firebird does not support ORDER BY on aliased columns
|
||||
// MySQL does not support ORDER BY on functions
|
||||
switch (SQL_LAYER)
|
||||
{
|
||||
case 'firebird':
|
||||
$sql .= ' ORDER BY COUNT(poster_id) DESC';
|
||||
break;
|
||||
|
||||
default:
|
||||
$sql .= ' ORDER BY postings DESC';
|
||||
break;
|
||||
}
|
||||
GROUP BY poster_id
|
||||
ORDER BY postings DESC";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
@@ -256,7 +245,7 @@ function mcp_post_details($id, $mode, $action)
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$users_ary[$row['user_id']]['username'] = strtolower($row['username']);
|
||||
$users_ary[$row['user_id']]['username'] = $row['username'];
|
||||
$usernames_ary[strtolower($row['username'])] = $users_ary[$row['user_id']];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
@@ -269,7 +258,7 @@ function mcp_post_details($id, $mode, $action)
|
||||
'L_POST_S' => ($user_row['postings'] == 1) ? $user->lang['POST'] : $user->lang['POSTS'],
|
||||
|
||||
'U_PROFILE' => ($user_id == ANONYMOUS) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $user_id),
|
||||
'U_SEARCHPOSTS' => append_sid("{$phpbb_root_path}search.$phpEx", 'author=' . urlencode($user_row['username']) . '&sr=topics'))
|
||||
'U_SEARCHPOSTS' => append_sid("{$phpbb_root_path}search.$phpEx", 'author_id=' . $user_id . '&sr=topics'))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -197,6 +197,7 @@ function mcp_topic_view($id, $mode, $action)
|
||||
'S_CAN_APPROVE' => ($has_unapproved_posts && $auth->acl_get('m_approve', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_LOCK' => ($auth->acl_get('m_lock', $topic_info['forum_id'])) ? true : false,
|
||||
'S_REPORT_VIEW' => ($action == 'reports') ? true : false,
|
||||
'S_MERGE_VIEW' => ($action == 'merge') ? true : false,
|
||||
|
||||
'S_SHOW_TOPIC_ICONS' => $s_topic_icons,
|
||||
'S_TOPIC_ICON' => $icon_id,
|
||||
|
@@ -785,6 +785,7 @@ class session
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$ban_triggered_by = 'user';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if ((!empty($row['ban_userid']) && intval($row['ban_userid']) == $user_id) ||
|
||||
@@ -800,6 +801,20 @@ class session
|
||||
{
|
||||
$banned = true;
|
||||
$ban_row = $row;
|
||||
|
||||
if (!empty($row['ban_userid']) && intval($row['ban_userid']) == $user_id)
|
||||
{
|
||||
$ban_triggered_by = 'user';
|
||||
}
|
||||
else if (!empty($row['ban_ip']) && preg_match('#^' . str_replace('*', '.*?', $row['ban_ip']) . '$#i', $user_ip))
|
||||
{
|
||||
$ban_triggered_by = 'ip';
|
||||
}
|
||||
else
|
||||
{
|
||||
$ban_triggered_by = 'email';
|
||||
}
|
||||
|
||||
// Don't break. Check if there is an exclude rule for this user
|
||||
}
|
||||
}
|
||||
@@ -823,6 +838,8 @@ class session
|
||||
|
||||
$message = sprintf($this->lang[$message], $till_date, '<a href="mailto:' . $config['board_contact'] . '">', '</a>');
|
||||
$message .= ($ban_row['ban_give_reason']) ? '<br /><br />' . sprintf($this->lang['BOARD_BAN_REASON'], $ban_row['ban_give_reason']) : '';
|
||||
$message .= '<br /><br /><em>' . $user->lang['BAN_TRIGGERED_BY_' . strtoupper($ban_triggered_by)] . '</em>';
|
||||
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
|
@@ -20,7 +20,7 @@ class ucp_attachments_info
|
||||
'title' => 'UCP_ATTACHMENTS',
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
'attachments' => array('title' => 'UCP_ATTACHMENTS', 'auth' => 'acl_u_attach', 'cat' => array('UCP_ATTACHMENTS')),
|
||||
'attachments' => array('title' => 'UCP_MAIN_ATTACHMENTS', 'auth' => 'acl_u_attach', 'cat' => array('UCP_MAIN')),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@@ -21,8 +21,8 @@ class ucp_prefs_info
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
'personal' => array('title' => 'UCP_PREFS_PERSONAL', 'auth' => '', 'cat' => array('UCP_PREFS')),
|
||||
'view' => array('title' => 'UCP_PREFS_VIEW', 'auth' => '', 'cat' => array('UCP_PREFS')),
|
||||
'post' => array('title' => 'UCP_PREFS_POST', 'auth' => '', 'cat' => array('UCP_PREFS')),
|
||||
'view' => array('title' => 'UCP_PREFS_VIEW', 'auth' => '', 'cat' => array('UCP_PREFS')),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@@ -20,10 +20,10 @@ class ucp_profile_info
|
||||
'title' => 'UCP_PROFILE',
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
'reg_details' => array('title' => 'UCP_PROFILE_REG_DETAILS', 'auth' => '', 'cat' => array('UCP_PROFILE')),
|
||||
'profile_info' => array('title' => 'UCP_PROFILE_PROFILE_INFO', 'auth' => '', 'cat' => array('UCP_PROFILE')),
|
||||
'signature' => array('title' => 'UCP_PROFILE_SIGNATURE', 'auth' => '', 'cat' => array('UCP_PROFILE')),
|
||||
'avatar' => array('title' => 'UCP_PROFILE_AVATAR', 'auth' => '', 'cat' => array('UCP_PROFILE')),
|
||||
'reg_details' => array('title' => 'UCP_PROFILE_REG_DETAILS', 'auth' => '', 'cat' => array('UCP_PROFILE')),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user