diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php index 494288a600..05bea54bd7 100644 --- a/phpBB/includes/functions_profile_fields.php +++ b/phpBB/includes/functions_profile_fields.php @@ -37,7 +37,7 @@ class custom_profile case 'profile': // Show hidden fields to moderators/admins - if (!$auth->acl_gets('a_', 'm_')) + if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_')) { $sql_where .= ' AND f.field_hide = 0'; } @@ -199,7 +199,7 @@ class custom_profile FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . ' f WHERE l.lang_id = ' . $user->get_iso_lang_id() . ' AND f.field_active = 1 ' . - ((!$auth->acl_gets('a_', 'm_')) ? ' AND f.field_hide = 0 ' : '') . ' + ((!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_')) ? ' AND f.field_hide = 0 ' : '') . ' AND f.field_no_view = 0 AND l.field_id = f.field_id ORDER BY f.field_order'; @@ -264,7 +264,7 @@ class custom_profile case 'profile': // Show hidden fields to moderators/admins - if (!$auth->acl_gets('a_', 'm_')) + if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_')) { $sql_where .= ' AND f.field_hide = 0'; } diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index df000f5e04..10c53d78cd 100755 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -187,6 +187,8 @@ class fulltext_native extends search_backend preg_match_all('#([^\\s+\\-|*()]+)(?:$|[\\s+\\-|()])#u', $keywords, $exact_words); $exact_words = $exact_words[1]; + $common_ids = array(); + if (sizeof($exact_words)) { $sql = 'SELECT word_id, word_text, word_common @@ -200,6 +202,7 @@ class fulltext_native extends search_backend if ($row['word_common']) { $this->common_words[] = $row['word_text']; + $common_ids[$row['word_text']] = (int) $row['word_id']; continue; } @@ -316,7 +319,10 @@ class fulltext_native extends search_backend // throw an error if we shall not ignore unexistant words else if (!$ignore_no_id) { - trigger_error(sprintf($user->lang['WORD_IN_NO_POST'], $word)); + if (!isset($common_ids[$word])) + { + trigger_error(sprintf($user->lang['WORD_IN_NO_POST'], $word)); + } } } diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 80d66291d7..de78969c3f 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -1218,7 +1218,7 @@ class user extends session if (!defined('DEBUG_EXTRA') && !defined('ADMIN_START') && !defined('IN_INSTALL') && !defined('IN_LOGIN') && file_exists($phpbb_root_path . 'install')) { // Adjust the message slightly according to the permissions - if ($auth->acl_gets('a_', 'm_')) + if ($auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_')) { $message = 'REMOVE_INSTALL'; } @@ -1231,7 +1231,7 @@ class user extends session } // Is board disabled and user not an admin or moderator? - if ($config['board_disable'] && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_')) + if ($config['board_disable'] && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_')) { $message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE'; trigger_error($message); @@ -1240,7 +1240,7 @@ class user extends session // Is load exceeded? if ($config['limit_load'] && $this->load !== false) { - if ($this->load > floatval($config['limit_load']) && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_')) + if ($this->load > floatval($config['limit_load']) && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_') && !$auth->acl_gets('a_', 'm_')) { trigger_error('BOARD_UNAVAILABLE'); } diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index 5868471fdd..e5b2325d24 100755 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -215,7 +215,7 @@ $lang = array_merge($lang, array( 'MBSTRING_FUNC_OVERLOAD' => 'Function overloading', 'MBSTRING_FUNC_OVERLOAD_EXPLAIN' => 'mbstring.func_overload must be set to either 0 or 4', 'MBSTRING_ENCODING_TRANSLATION' => 'Transparent character encoding', - 'MBSTRING_ENCODING_TRANSLATION_EXPLAIN' => 'mbstring.encoding_translation must be set 0', + 'MBSTRING_ENCODING_TRANSLATION_EXPLAIN' => 'mbstring.encoding_translation must be set to 0', 'MBSTRING_HTTP_INPUT' => 'HTTP input character conversion', 'MBSTRING_HTTP_INPUT_EXPLAIN' => 'mbstring.http_input must be set to pass', 'MBSTRING_HTTP_OUTPUT' => 'HTTP output character conversion', diff --git a/phpBB/language/en/search.php b/phpBB/language/en/search.php index db922f340b..9b63bf6f38 100644 --- a/phpBB/language/en/search.php +++ b/phpBB/language/en/search.php @@ -50,8 +50,8 @@ $lang = array_merge($lang, array( 'NO_SEARCH' => 'Sorry but you are not permitted to use the search system.', 'NO_SEARCH_RESULTS' => 'No suitable matches were found.', 'NO_SEARCH_TIME' => 'Sorry but you cannot use search at this time. Please try again in a few minutes.', - 'WORD_IN_NO_POST' => 'No posts were found because the word %s is not contained in any post.', - 'WORDS_IN_NO_POST' => 'No posts were found because the words %s are not contained in any post.', + 'WORD_IN_NO_POST' => 'No posts were found because the word %s is not contained in any post.', + 'WORDS_IN_NO_POST' => 'No posts were found because the words %s are not contained in any post.', 'POST_CHARACTERS' => 'characters of posts', diff --git a/phpBB/search.php b/phpBB/search.php index 9985e287bd..ef3fa572c0 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -103,7 +103,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) $sql_where = (strpos($author, '*') !== false) ? ' LIKE ' : ' = '; $sql = 'SELECT user_id FROM ' . USERS_TABLE . " - WHERE username $sql_where '" . $db->sql_escape(preg_replace('#\*+#', '%', $author)) . "' + WHERE username_clean $sql_where '" . $db->sql_escape(preg_replace('#\*+#', '%', utf8_clean_string($author))) . "' AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')'; $result = $db->sql_query_limit($sql, 100);