1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

[ticket/11700] Move all recent code to namespaces

PHPBB3-11700
This commit is contained in:
Nils Adermann
2013-09-10 14:01:09 +02:00
parent 196e1813cd
commit b95fdacdd3
420 changed files with 2316 additions and 1840 deletions

View File

@@ -7,6 +7,8 @@
*
*/
namespace phpbb\search;
/**
* @ignore
*/
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
* phpBB's own db driven fulltext search, version 2
* @package search
*/
class phpbb_search_fulltext_native extends phpbb_search_base
class fulltext_native extends \phpbb\search\base
{
/**
* Associative array holding index stats
@@ -80,19 +82,19 @@ class phpbb_search_fulltext_native extends phpbb_search_base
/**
* Config object
* @var phpbb_config
* @var \phpbb\config\config
*/
protected $config;
/**
* Database connection
* @var phpbb_db_driver
* @var \phpbb\db\driver\driver
*/
protected $db;
/**
* User object
* @var phpbb_user
* @var \phpbb\user
*/
protected $user;
@@ -1222,7 +1224,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
return;
}
// Split old and new post/subject to obtain array of 'words'
// Split old and new \post/subject to obtain array of 'words'
$split_text = $this->split_message($message);
$split_title = $this->split_message($subject);
@@ -1269,7 +1271,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
// We now have unique arrays of all words to be added and removed and
// individual arrays of added and removed words for text and title. What
// we need to do now is add the new words (if they don't already exist)
// we need to do now is add the new \words (if they don't already exist)
// and then add (or remove) matches between the words and this post
if (sizeof($unique_add_words))
{
@@ -1306,7 +1308,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
$this->db->sql_transaction('begin');
}
// now update the search match table, remove links to removed words and add links to new words
// now update the search match table, remove links to removed words and add links to new \words
foreach ($words['del'] as $word_in => $word_ary)
{
$title_match = ($word_in == 'title') ? 1 : 0;
@@ -1466,7 +1468,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
WHERE ' . $this->db->sql_in_set('word_id', $sql_in);
$this->db->sql_query($sql);
// by setting search_last_gc to the new time here we make sure that if a user reloads because the
// by setting search_last_gc to the new \time here we make sure that if a user reloads because the
// following query takes too long, he won't run into it again
set_config('search_last_gc', time(), true);
@@ -1556,7 +1558,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
* @param string $encoding Text encoding
* @return string Cleaned up text, only alphanumeric chars are left
*
* @todo normalizer::cleanup being able to be used?
* @todo \normalizer::cleanup being able to be used?
*/
protected function cleanup($text, $allowed_chars = null, $encoding = 'utf-8')
{
@@ -1588,7 +1590,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
* If we use it more widely, an instance of that class should be held in a
* a global variable instead
*/
utf_normalizer::nfc($text);
\utf_normalizer::nfc($text);
/**
* The first thing we do is: