aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/db/dbal.php6
-rw-r--r--phpBB/includes/diff/diff.php11
-rw-r--r--phpBB/includes/diff/engine.php6
-rw-r--r--phpBB/includes/diff/renderer.php8
-rw-r--r--phpBB/includes/functions.php6
-rw-r--r--phpBB/includes/search/fulltext_mysql.php8
-rwxr-xr-xphpBB/includes/search/fulltext_native.php46
-rwxr-xr-xphpBB/includes/search/search.php6
-rw-r--r--phpBB/includes/template.php25
-rw-r--r--phpBB/includes/ucp/ucp_pm.php5
-rw-r--r--phpBB/includes/utf/utf_normalizer.php22
-rw-r--r--phpBB/includes/utf/utf_tools.php54
-rw-r--r--phpBB/search.php3
13 files changed, 91 insertions, 115 deletions
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php
index d2d3efedaa..ad0fdf5541 100644
--- a/phpBB/includes/db/dbal.php
+++ b/phpBB/includes/db/dbal.php
@@ -307,15 +307,15 @@ class dbal
}
else
{
- return $field . ($negate ? ' NOT IN ' : ' IN ' ) . '(' . implode(', ', array_map(array($this, '_sql_validate_value'), $array)) . ')';
+ return $field . ($negate ? ' NOT IN ' : ' IN ') . '(' . implode(', ', array_map(array($this, '_sql_validate_value'), $array)) . ')';
}
}
/**
* Run more than one insert statement.
*
- * @param $sql_ary array multi-dimensional array holding the statement data.
- * @param $table string table name to run the statements on
+ * @param string $table table name to run the statements on
+ * @param array &$sql_ary multi-dimensional array holding the statement data.
*
* @return bool false if no statements were executed.
* @access public
diff --git a/phpBB/includes/diff/diff.php b/phpBB/includes/diff/diff.php
index fd2d557a19..ca8d16fd3e 100644
--- a/phpBB/includes/diff/diff.php
+++ b/phpBB/includes/diff/diff.php
@@ -23,17 +23,12 @@ include_once($phpbb_root_path . 'includes/diff/renderer.' . $phpEx);
* Code from pear.php.net, Text_Diff-0.2.1 (beta) package
* http://pear.php.net/package/Text_Diff/
*
-* Modified by Acyd Burn to meet our coding standards
+* Modified by phpBB Group to meet our coding standards
* and being able to integrate into phpBB
-*/
-
-/**
+*
* General API for generating and formatting diffs - the differences between
* two sequences of strings.
*
-* The PHP diff code used in this package was originally written by Geoffrey
-* T. Dairiki and is used with his permission.
-*
* @package phpBB3
* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
*/
@@ -182,7 +177,7 @@ class diff
/**
* Removes trailing newlines from a line of text. This is meant to be used with array_walk().
*
- * @param string $line The line to trim.
+ * @param string &$line The line to trim.
* @param integer $key The index of the line in the array. Not used.
*/
function trim_newlines(&$line, $key)
diff --git a/phpBB/includes/diff/engine.php b/phpBB/includes/diff/engine.php
index c230d865cd..5fcb317dd5 100644
--- a/phpBB/includes/diff/engine.php
+++ b/phpBB/includes/diff/engine.php
@@ -19,11 +19,9 @@ if (!defined('IN_PHPBB'))
* Code from pear.php.net, Text_Diff-0.2.1 (beta) package
* http://pear.php.net/package/Text_Diff/
*
-* Modified by Acyd Burn to meet our coding standards
+* Modified by phpBB Group to meet our coding standards
* and being able to integrate into phpBB
-*/
-
-/**
+*
* Class used internally by Diff to actually compute the diffs. This class is
* implemented using native PHP code.
*
diff --git a/phpBB/includes/diff/renderer.php b/phpBB/includes/diff/renderer.php
index 408addb858..984fd65708 100644
--- a/phpBB/includes/diff/renderer.php
+++ b/phpBB/includes/diff/renderer.php
@@ -19,11 +19,9 @@ if (!defined('IN_PHPBB'))
* Code from pear.php.net, Text_Diff-0.2.1 (beta) package
* http://pear.php.net/package/Text_Diff/
*
-* Modified by Acyd Burn to meet our coding standards
+* Modified by phpBB Group to meet our coding standards
* and being able to integrate into phpBB
-*/
-
-/**
+*
* A class to render Diffs in different formats.
*
* This class renders the diff in classic diff format. It is intended that
@@ -86,7 +84,7 @@ class diff_renderer
/**
* Renders a diff.
*
- * @param diff $diff A diff object.
+ * @param diff &$diff A diff object.
*
* @return string The formatted output.
*/
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 8021e0c6c2..6b87e9acf9 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -153,7 +153,7 @@ function gen_rand_string($num_chars = 8)
/**
* Return unique id
-* @param $extra additional entropy
+* @param string $extra additional entropy
*/
function unique_id($extra = 'c')
{
@@ -401,9 +401,9 @@ if (!function_exists('stripos'))
* Find position of first occurrence of a case-insensitive string
*
* @param string $haystack is the string to search in
- * @param string needle is the string to search for
+ * @param string $needle is the string to search for
*
- * @return Returns the numeric position of the first occurrence of needle in the haystack string. Unlike strpos(), stripos() is case-insensitive.
+ * @return mixed Returns the numeric position of the first occurrence of needle in the haystack string. Unlike strpos(), stripos() is case-insensitive.
* Note that the needle may be a string of one or more characters.
* If needle is not found, stripos() will return boolean FALSE.
*/
diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php
index 755bd5b814..09e9162d83 100644
--- a/phpBB/includes/search/fulltext_mysql.php
+++ b/phpBB/includes/search/fulltext_mysql.php
@@ -103,9 +103,9 @@ class fulltext_mysql extends search_backend
* Splits keywords entered by a user into an array of words stored in $this->split_words
* Stores the tidied search query in $this->search_query
*
- * @param string $keywords Contains the keyword as entered by the user
+ * @param string &$keywords Contains the keyword as entered by the user
* @param string $terms is either 'all' or 'any'
- * @return false if no valid keywords were found and otherwise true
+ * @return bool false if no valid keywords were found and otherwise true
*/
function split_keywords(&$keywords, $terms)
{
@@ -215,7 +215,7 @@ class fulltext_mysql extends search_backend
/**
* Performs a search on keywords depending on display specific params.
*
- * @param array $id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
+ * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
* @param int $start indicates the first index of the page
* @param int $per_page number of ids each page is supposed to contain
* @return total number of results
@@ -412,7 +412,7 @@ class fulltext_mysql extends search_backend
/**
* Performs a search on an author's posts without caring about message contents. Depends on display specific params
*
- * @param array $id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
+ * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
* @param int $start indicates the first index of the page
* @param int $per_page number of ids each page is supposed to contain
* @return total number of results
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php
index f0c2b18efb..07ebfc6047 100755
--- a/phpBB/includes/search/fulltext_native.php
+++ b/phpBB/includes/search/fulltext_native.php
@@ -39,7 +39,7 @@ class fulltext_native extends search_backend
/**
* Initialises the fulltext_native search backend with min/max word length and makes sure the UTF-8 normalizer is loaded.
*
- * @param boolean|string $error is passed by reference and should either be set to false on success or an error message on failure.
+ * @param boolean|string &$error is passed by reference and should either be set to false on success or an error message on failure.
*
* @access public
*/
@@ -341,17 +341,17 @@ class fulltext_native extends search_backend
* Performs a search on keywords depending on display specific params. You have to run split_keywords() first.
*
* @param string $type contains either posts or topics depending on what should be searched for
- * @param string $fields contains either titleonly (topic titles should be searched), msgonly (only message bodies should be searched), firstpost (only subject and body of the first post should be searched) or all (all post bodies and subjects should be searched)
- * @param string $terms is either 'all' (use query as entered, words without prefix should default to "have to be in field") or 'any' (ignore search query parts and just return all posts that contain any of the specified words)
- * @param array $sort_by_sql contains SQL code for the ORDER BY part of a query
- * @param string $sort_key is the key of $sort_by_sql for the selected sorting
- * @param string $sort_dir is either a or d representing ASC and DESC
- * @param string $sort_days specifies the maximum amount of days a post may be old
- * @param array $ex_fid_ary specifies an array of forum ids which should not be searched
- * @param array $m_approve_fid_ary specifies an array of forum ids in which the searcher is allowed to view unapproved posts
- * @param int $topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
- * @param array $author_ary an array of author ids if the author should be ignored during the search the array is empty
- * @param array $id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
+ * @param string &$fields contains either titleonly (topic titles should be searched), msgonly (only message bodies should be searched), firstpost (only subject and body of the first post should be searched) or all (all post bodies and subjects should be searched)
+ * @param string &$terms is either 'all' (use query as entered, words without prefix should default to "have to be in field") or 'any' (ignore search query parts and just return all posts that contain any of the specified words)
+ * @param array &$sort_by_sql contains SQL code for the ORDER BY part of a query
+ * @param string &$sort_key is the key of $sort_by_sql for the selected sorting
+ * @param string &$sort_dir is either a or d representing ASC and DESC
+ * @param string &$sort_days specifies the maximum amount of days a post may be old
+ * @param array &$ex_fid_ary specifies an array of forum ids which should not be searched
+ * @param array &$m_approve_fid_ary specifies an array of forum ids in which the searcher is allowed to view unapproved posts
+ * @param int &$topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
+ * @param array &$author_ary an array of author ids if the author should be ignored during the search the array is empty
+ * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
* @param int $start indicates the first index of the page
* @param int $per_page number of ids each page is supposed to contain
* @return boolean|int total number of results
@@ -701,15 +701,15 @@ class fulltext_native extends search_backend
* Performs a search on an author's posts without caring about message contents. Depends on display specific params
*
* @param string $type contains either posts or topics depending on what should be searched for
- * @param array $sort_by_sql contains SQL code for the ORDER BY part of a query
- * @param string $sort_key is the key of $sort_by_sql for the selected sorting
- * @param string $sort_dir is either a or d representing ASC and DESC
- * @param string $sort_days specifies the maximum amount of days a post may be old
- * @param array $ex_fid_ary specifies an array of forum ids which should not be searched
- * @param array $m_approve_fid_ary specifies an array of forum ids in which the searcher is allowed to view unapproved posts
- * @param int $topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
- * @param array $author_ary an array of author ids
- * @param array $id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
+ * @param array &$sort_by_sql contains SQL code for the ORDER BY part of a query
+ * @param string &$sort_key is the key of $sort_by_sql for the selected sorting
+ * @param string &$sort_dir is either a or d representing ASC and DESC
+ * @param string &$sort_days specifies the maximum amount of days a post may be old
+ * @param array &$ex_fid_ary specifies an array of forum ids which should not be searched
+ * @param array &$m_approve_fid_ary specifies an array of forum ids in which the searcher is allowed to view unapproved posts
+ * @param int &$topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
+ * @param array &$author_ary an array of author ids
+ * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
* @param int $start indicates the first index of the page
* @param int $per_page number of ids each page is supposed to contain
* @return boolean|int total number of results
@@ -996,8 +996,8 @@ class fulltext_native extends search_backend
*
* @param string $mode Contains the post mode: edit, post, reply, quote
* @param int $post_id The id of the post which is modified/created
- * @param string $message New or updated post content
- * @param string $subject New or updated post subject
+ * @param string &$message New or updated post content
+ * @param string &$subject New or updated post subject
* @param int $poster_id Post author's user id
* @param int $forum_id The id of the forum in which the post is located
*
diff --git a/phpBB/includes/search/search.php b/phpBB/includes/search/search.php
index 4c8387bd22..ee9fa0ea98 100755
--- a/phpBB/includes/search/search.php
+++ b/phpBB/includes/search/search.php
@@ -89,8 +89,8 @@ class search_backend
/**
* Retrieves cached search results
*
- * @param int result_count will contain the number of all results for the search (not only for the current page)
- * @param array id_ary is filled with the ids belonging to the requested page that are stored in the cache
+ * @param int &$result_count will contain the number of all results for the search (not only for the current page)
+ * @param array &$id_ary is filled with the ids belonging to the requested page that are stored in the cache
*
* @return int SEARCH_RESULT_NOT_IN_CACHE or SEARCH_RESULT_IN_CACHE or SEARCH_RESULT_INCOMPLETE
*/
@@ -151,7 +151,7 @@ class search_backend
/**
* Caches post/topic ids
*
- * @param array id_ary contains a list of post or topic ids that shall be cached, the first element
+ * @param array &$id_ary contains a list of post or topic ids that shall be cached, the first element
* must have the absolute index $start in the result set.
*/
function save_ids($search_key, $keywords, $author_ary, $result_count, &$id_ary, $start, $sort_dir)
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php
index 36a0b8920b..76a89869f5 100644
--- a/phpBB/includes/template.php
+++ b/phpBB/includes/template.php
@@ -368,23 +368,12 @@ class template
/**
* Change already assigned key variable pair (one-dimensional - single loop entry)
*
- * Some Examples:
- * <code>
- * alter_block_array('loop', $vararray); // Insert vararray at the beginning
- * alter_block_array('loop', $vararray, 2); // Insert vararray at position 2
- * alter_block_array('loop', $vararray, array('KEY' => 'value')); // Insert vararray at the position where the key 'KEY' has the value of 'value'
- * alter_block_array('loop', $vararray, false); // Insert vararray at first position
- * alter_block_array('loop', $vararray, true); // Insert vararray at last position (assign_block_vars equivalence)
+ * An example of how to use this function:
+ * {@example alter_block_array.php}
*
- * alter_block_array('loop', $vararray, 2, 'change'); // Change/Merge vararray with existing array at position 2
- * alter_block_array('loop', $vararray, array('KEY' => 'value'), 'change'); // Change/Merge vararray with existing array at the position where the key 'KEY' has the value of 'value'
- * alter_block_array('loop', $vararray, false, 'change'); // Change/Merge vararray with existing array at first position
- * alter_block_array('loop', $vararray, true, 'change'); // Change/Merge vararray with existing array at last position
- * </code>
- *
- * @param string $blockname the blockname, for example 'loop'
- * @param array $vararray the var array to insert/add or merge
- * @param mixed $key Key to search for
+ * @param string $blockname the blockname, for example 'loop'
+ * @param array $vararray the var array to insert/add or merge
+ * @param mixed $key Key to search for
*
* array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position]
*
@@ -393,7 +382,7 @@ class template
* If key is false the position is set to 0
* If key is true the position is set to the last entry
*
- * @param insert|change $mode Mode to execute
+ * @param string $mode Mode to execute (valid modes are 'insert' and 'change')
*
* If insert, the vararray is inserted at the given position (position counting from zero).
* If change, the current block gets merged with the vararray (resulting in new key/value pairs be added and existing keys be replaced by the new value).
@@ -401,7 +390,7 @@ class template
* Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array)
* and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars)
*
- * @return false on error, true on success
+ * @return bool false on error, true on success
* @access public
*/
function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert')
diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php
index 14afc81686..c7c77836d4 100644
--- a/phpBB/includes/ucp/ucp_pm.php
+++ b/phpBB/includes/ucp/ucp_pm.php
@@ -10,9 +10,8 @@
/**
* Private Message Class
*
-* @param int $folder display folder with the id used
-* @param inbox|outbox|sentbox display folder with the associated name
-*
+* $_REQUEST['folder'] display folder with the id used
+* $_REQUEST['folder'] inbox|outbox|sentbox display folder with the associated name
*
* Display Messages (default to inbox) - mode=view
* Display single message - mode=view&p=[msg_id] or &p=[msg_id] (short linkage)
diff --git a/phpBB/includes/utf/utf_normalizer.php b/phpBB/includes/utf/utf_normalizer.php
index 5c4ddda610..649c6c2249 100644
--- a/phpBB/includes/utf/utf_normalizer.php
+++ b/phpBB/includes/utf/utf_normalizer.php
@@ -214,12 +214,12 @@ class utf_normalizer
/**
* Recompose a UTF string
*
- * @param string $str Unchecked UTF string
- * @param integer $pos Position of the first UTF char (in bytes)
- * @param integer $len Length of the string (in bytes)
- * @param array $qc Quick-check array, passed by reference but never modified
- * @param array $decomp_map Decomposition mapping, passed by reference but never modified
- * @return string The string, validated and recomposed
+ * @param string $str Unchecked UTF string
+ * @param integer $pos Position of the first UTF char (in bytes)
+ * @param integer $len Length of the string (in bytes)
+ * @param array &$qc Quick-check array, passed by reference but never modified
+ * @param array &$decomp_map Decomposition mapping, passed by reference but never modified
+ * @return string The string, validated and recomposed
*
* @access private
*/
@@ -916,11 +916,11 @@ class utf_normalizer
/**
* Decompose a UTF string
*
- * @param string $str UTF string
- * @param integer $pos Position of the first UTF char (in bytes)
- * @param integer $len Length of the string (in bytes)
- * @param array $decomp_map Decomposition mapping, passed by reference but never modified
- * @return string The string, decomposed and sorted canonically
+ * @param string $str UTF string
+ * @param integer $pos Position of the first UTF char (in bytes)
+ * @param integer $len Length of the string (in bytes)
+ * @param array &$decomp_map Decomposition mapping, passed by reference but never modified
+ * @return string The string, decomposed and sorted canonically
*
* @access private
*/
diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php
index 0a4763b080..9f2b3c2dda 100644
--- a/phpBB/includes/utf/utf_tools.php
+++ b/phpBB/includes/utf/utf_tools.php
@@ -7,9 +7,8 @@
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
* @todo make sure the replacements are called correctly
-* already done: strtolower, strtoupper, ucfirst, str_split, strrpos, strlen (hopefully!), strpos, substr
-* remaining: clean_username, htmlentities (no longer needed for internal data?), htmlspecialchars (using charset)
-* strspn, chr, ord
+* already done: strtolower, strtoupper, ucfirst, str_split, strrpos, strlen (hopefully!), strpos, substr, htmlspecialchars
+* remaining: strspn, chr, ord
*/
/**
@@ -63,7 +62,7 @@ if (!extension_loaded('xml'))
/**
* Implementation of PHP's native utf8_decode for people without XML support
*
- * @param string $string UTF-8 encoded data
+ * @param string $str UTF-8 encoded data
* @return string ISO-8859-1 encoded data
*/
function utf8_decode($str)
@@ -241,9 +240,9 @@ else
* Find position of last occurrence of a char in a string
*
* @author Harry Fuecks
- * @param string haystack
- * @param string needle
- * @param integer (optional) offset (from left)
+ * @param string $str haystack
+ * @param string $needle needle
+ * @param integer $offset (optional) offset (from left)
* @return mixed integer position or FALSE on failure
*/
function utf8_strrpos($str, $needle, $offset = null)
@@ -286,9 +285,9 @@ else
* Find position of first occurrence of a string
*
* @author Harry Fuecks
- * @param string haystack
- * @param string needle
- * @param integer offset in characters (from left)
+ * @param string $str haystack
+ * @param string $needle needle
+ * @param integer $offset offset in characters (from left)
* @return mixed integer position or FALSE on failure
*/
function utf8_strpos($str, $needle, $offset = null)
@@ -489,9 +488,9 @@ else
* necessary. It isn't necessary for +ve offsets and no specified length
*
* @author Chris Smith<chris@jalakai.co.uk>
- * @param string
- * @param integer number of UTF-8 characters offset (from left)
- * @param integer (optional) length in UTF-8 characters from offset
+ * @param string $str
+ * @param integer $offset number of UTF-8 characters offset (from left)
+ * @param integer $length (optional) length in UTF-8 characters from offset
* @return mixed string or FALSE if failure
*/
function utf8_substr($str, $offset, $length = NULL)
@@ -631,8 +630,8 @@ else
* Convert a string to an array
*
* @author Harry Fuecks
-* @param string UTF-8 encoded
-* @param int number to characters to split string by
+* @param string $str UTF-8 encoded
+* @param int $split_len number to characters to split string by
* @return string characters in string reverses
*/
function utf8_str_split($str, $split_len = 1)
@@ -657,8 +656,6 @@ function utf8_str_split($str, $split_len = 1)
* Find length of initial segment not matching mask
*
* @author Harry Fuecks
-* @param string
-* @return int
*/
function utf8_strspn($str, $mask, $start = null, $length = null)
{
@@ -838,8 +835,8 @@ function utf8_ord($chr)
/**
* Converts an NCR to a UTF-8 char
*
-* @param integer $cp UNICODE code point
-* @return string UTF-8 char
+* @param int $cp UNICODE code point
+* @return string UTF-8 char
*/
function utf8_chr($cp)
{
@@ -865,9 +862,8 @@ function utf8_chr($cp)
* Convert Numeric Character References to UTF-8 chars
*
* Notes:
-* - we do not convert NCRs recursively, if you pass &#38;#38; it will return &#38;
-* - we DO NOT check for the existence of the Unicode characters, therefore an entity
-* may be converted to an inexistent codepoint
+* - we do not convert NCRs recursively, if you pass &#38;#38; it will return &#38;
+* - we DO NOT check for the existence of the Unicode characters, therefore an entity may be converted to an inexistent codepoint
*
* @param string $text String to convert, encoded in UTF-8 (no normal form required)
* @return string UTF-8 string where NCRs have been replaced with the actual chars
@@ -897,9 +893,9 @@ function utf8_decode_ncr_callback($m)
* Takes an array of ints representing the Unicode characters and returns
* a UTF-8 string.
*
-* @param string $text text to be case folded
-* @param string $option determines how we will fold the cases
-* @return string case folded text
+* @param string $text text to be case folded
+* @param string $option determines how we will fold the cases
+* @return string case folded text
*/
function utf8_case_fold($text, $option = 'full')
{
@@ -940,8 +936,8 @@ function utf8_case_fold($text, $option = 'full')
* A wrapper function for the normalizer which takes care of including the class if required and modifies the passed strings
* to be in NFC (Normalization Form Composition).
*
-* @param mixed $strings a string or an array of strings to normalize
-* @return mixed the normalized content, preserving array keys if array given.
+* @param mixed $strings a string or an array of strings to normalize
+* @return mixed the normalized content, preserving array keys if array given.
*/
function utf8_normalize_nfc($strings)
{
@@ -981,8 +977,8 @@ function utf8_normalize_nfc($strings)
* functions used here you need to rebuild/update the username_clean column in the users table. And all other
* columns that store a clean string otherwise you will break this functionality.
*
-* @param $text An unclean string, mabye user input (has to be valid UTF-8!)
-* @return Cleaned up version of the input string
+* @param string $text An unclean string, mabye user input (has to be valid UTF-8!)
+* @return string Cleaned up version of the input string
*/
function utf8_clean_string($text)
{
diff --git a/phpBB/search.php b/phpBB/search.php
index 5cb2d5dc6e..a9c098adc7 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -227,7 +227,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$search->split_keywords($keywords, $search_terms);
if (empty($search->search_query) && !sizeof($author_id_ary) && !$search_id)
{
- $ignored = (sizeof($search->common_words)) ? sprintf($user->lang['IGNORED_TERMS_EXPLAIN'], htmlspecialchars(implode(' ', $search->common_words))) . '<br />' : '';
+ $ignored = (sizeof($search->common_words)) ? sprintf($user->lang['IGNORED_TERMS_EXPLAIN'], htmlspecialchars(implode(' ', $search->common_words), ENT_COMPAT, 'UTF-8')) . '<br />' : '';
trigger_error($ignored . sprintf($user->lang['NO_KEYWORDS'], $search->word_length['min'], $search->word_length['max']));
}
}
@@ -436,6 +436,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
}
// define some vars for urls
+ // @todo preg_replace still needed?
$hilit = preg_replace('#&amp;(\#[0-9]+;)#', '&$1', htmlspecialchars(implode('|', explode(' ', preg_replace('#\s+#', ' ', str_replace(array('+', '-', '|', '(', ')'), ' ', $keywords))))));
$u_hilit = urlencode($keywords);
$u_show_results = ($show_results != 'posts') ? '&amp;sr=' . $show_results : '';