diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-10-06 18:43:55 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-10-06 18:43:55 +0000 |
commit | 0f0d160ded7fd129d40a4ec0372cab11d7ce7a88 (patch) | |
tree | f8e6f506f09bb6fdb81deece5da18f2ee41e3a7e /phpBB/includes | |
parent | c645088a34bfcaf31ba10e90badb148a284e7133 (diff) | |
download | forums-0f0d160ded7fd129d40a4ec0372cab11d7ce7a88.tar forums-0f0d160ded7fd129d40a4ec0372cab11d7ce7a88.tar.gz forums-0f0d160ded7fd129d40a4ec0372cab11d7ce7a88.tar.bz2 forums-0f0d160ded7fd129d40a4ec0372cab11d7ce7a88.tar.xz forums-0f0d160ded7fd129d40a4ec0372cab11d7ce7a88.zip |
- 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
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/acp/acp_styles.php | 2 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 2 | ||||
-rw-r--r-- | phpBB/includes/functions_user.php | 2 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_forum.php | 1 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_post.php | 21 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_topic.php | 1 | ||||
-rw-r--r-- | phpBB/includes/session.php | 17 | ||||
-rw-r--r-- | phpBB/includes/ucp/info/ucp_attachments.php | 2 | ||||
-rw-r--r-- | phpBB/includes/ucp/info/ucp_prefs.php | 2 | ||||
-rw-r--r-- | phpBB/includes/ucp/info/ucp_profile.php | 2 |
10 files changed, 31 insertions, 21 deletions
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 9bca995249..0cb03d2577 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -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); } } diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index a5e6570116..5c260e6547 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -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) { diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 6178849cf5..0482197913 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -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'; } diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index 71573586f5..959ff52a1b 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -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) : '', diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index 10f7ad5811..65b0f372a1 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -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')) ); } } diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index b0d883e7e5..58bfefca0a 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -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, diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 41708d19ab..0489bdba38 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -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); } diff --git a/phpBB/includes/ucp/info/ucp_attachments.php b/phpBB/includes/ucp/info/ucp_attachments.php index 6028b5922a..a6aa393da5 100644 --- a/phpBB/includes/ucp/info/ucp_attachments.php +++ b/phpBB/includes/ucp/info/ucp_attachments.php @@ -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')), ), ); } diff --git a/phpBB/includes/ucp/info/ucp_prefs.php b/phpBB/includes/ucp/info/ucp_prefs.php index 4700ebc43a..53a012ea3c 100644 --- a/phpBB/includes/ucp/info/ucp_prefs.php +++ b/phpBB/includes/ucp/info/ucp_prefs.php @@ -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')), ), ); } diff --git a/phpBB/includes/ucp/info/ucp_profile.php b/phpBB/includes/ucp/info/ucp_profile.php index 61daccda45..86b731c280 100644 --- a/phpBB/includes/ucp/info/ucp_profile.php +++ b/phpBB/includes/ucp/info/ucp_profile.php @@ -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')), ), ); } |