mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[feature/sphinx-fulltext-search] remove all reference returns
PHPBB3-10946
This commit is contained in:
parent
f609555b1a
commit
bfd01f0187
2 changed files with 9 additions and 9 deletions
|
@ -44,7 +44,7 @@ class sphinx_config
|
||||||
* @param string $name The name of the section that shall be returned
|
* @param string $name The name of the section that shall be returned
|
||||||
* @return sphinx_config_section The section object or null if none was found
|
* @return sphinx_config_section The section object or null if none was found
|
||||||
*/
|
*/
|
||||||
function &get_section_by_name($name)
|
function get_section_by_name($name)
|
||||||
{
|
{
|
||||||
for ($i = 0, $size = sizeof($this->sections); $i < $size; $i++)
|
for ($i = 0, $size = sizeof($this->sections); $i < $size; $i++)
|
||||||
{
|
{
|
||||||
|
@ -62,7 +62,7 @@ class sphinx_config
|
||||||
* @param string $name The name for the new section
|
* @param string $name The name for the new section
|
||||||
* @return sphinx_config_section The newly created section object
|
* @return sphinx_config_section The newly created section object
|
||||||
*/
|
*/
|
||||||
function &add_section($name)
|
function add_section($name)
|
||||||
{
|
{
|
||||||
$this->sections[] = new sphinx_config_section($name, '');
|
$this->sections[] = new sphinx_config_section($name, '');
|
||||||
return $this->sections[sizeof($this->sections) - 1];
|
return $this->sections[sizeof($this->sections) - 1];
|
||||||
|
@ -345,7 +345,7 @@ class sphinx_config_section
|
||||||
* @return sphinx_config_section The first variable object from this section with the
|
* @return sphinx_config_section The first variable object from this section with the
|
||||||
* given name or null if none was found
|
* given name or null if none was found
|
||||||
*/
|
*/
|
||||||
function &get_variable_by_name($name)
|
function get_variable_by_name($name)
|
||||||
{
|
{
|
||||||
for ($i = 0, $size = sizeof($this->variables); $i < $size; $i++)
|
for ($i = 0, $size = sizeof($this->variables); $i < $size; $i++)
|
||||||
{
|
{
|
||||||
|
@ -382,7 +382,7 @@ class sphinx_config_section
|
||||||
* @param string $value The value for the new variable
|
* @param string $value The value for the new variable
|
||||||
* @return sphinx_config_variable Variable object that was created
|
* @return sphinx_config_variable Variable object that was created
|
||||||
*/
|
*/
|
||||||
function &create_variable($name, $value)
|
function create_variable($name, $value)
|
||||||
{
|
{
|
||||||
$this->variables[] = new sphinx_config_variable($name, $value, '');
|
$this->variables[] = new sphinx_config_variable($name, $value, '');
|
||||||
return $this->variables[sizeof($this->variables) - 1];
|
return $this->variables[sizeof($this->variables) - 1];
|
||||||
|
|
|
@ -323,10 +323,10 @@ class phpbb_search_fulltext_sphinx
|
||||||
|
|
||||||
foreach ($config_data as $section_name => $section_data)
|
foreach ($config_data as $section_name => $section_data)
|
||||||
{
|
{
|
||||||
$section = &$config_object->get_section_by_name($section_name);
|
$section = $config_object->get_section_by_name($section_name);
|
||||||
if (!$section)
|
if (!$section)
|
||||||
{
|
{
|
||||||
$section = &$config_object->add_section($section_name);
|
$section = $config_object->add_section($section_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($delete as $key => $void)
|
foreach ($delete as $key => $void)
|
||||||
|
@ -346,10 +346,10 @@ class phpbb_search_fulltext_sphinx
|
||||||
|
|
||||||
if (!isset($non_unique[$key]))
|
if (!isset($non_unique[$key]))
|
||||||
{
|
{
|
||||||
$variable = &$section->get_variable_by_name($key);
|
$variable = $section->get_variable_by_name($key);
|
||||||
if (!$variable)
|
if (!$variable)
|
||||||
{
|
{
|
||||||
$variable = &$section->create_variable($key, $value);
|
$variable = $section->create_variable($key, $value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -358,7 +358,7 @@ class phpbb_search_fulltext_sphinx
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$variable = &$section->create_variable($key, $value);
|
$variable = $section->create_variable($key, $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue