mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
Merge pull request #4010 from Elsensee/ticket/14264
[ticket/14264] Don't use constants as return values
This commit is contained in:
@@ -21,6 +21,6 @@ class phpbb_textreparser_forum_description_test extends phpbb_textreparser_test_
|
||||
|
||||
protected function get_reparser()
|
||||
{
|
||||
return new \phpbb\textreparser\plugins\forum_description($this->db);
|
||||
return new \phpbb\textreparser\plugins\forum_description($this->db, FORUMS_TABLE);
|
||||
}
|
||||
}
|
||||
|
@@ -21,6 +21,6 @@ class phpbb_textreparser_forum_rules_test extends phpbb_textreparser_test_row_ba
|
||||
|
||||
protected function get_reparser()
|
||||
{
|
||||
return new \phpbb\textreparser\plugins\forum_rules($this->db);
|
||||
return new \phpbb\textreparser\plugins\forum_rules($this->db, FORUMS_TABLE);
|
||||
}
|
||||
}
|
||||
|
@@ -21,6 +21,6 @@ class phpbb_textreparser_group_description_test extends phpbb_textreparser_test_
|
||||
|
||||
protected function get_reparser()
|
||||
{
|
||||
return new \phpbb\textreparser\plugins\group_description($this->db);
|
||||
return new \phpbb\textreparser\plugins\group_description($this->db, GROUPS_TABLE);
|
||||
}
|
||||
}
|
||||
|
@@ -21,6 +21,6 @@ class phpbb_textreparser_pm_text_test extends phpbb_textreparser_test_row_based_
|
||||
|
||||
protected function get_reparser()
|
||||
{
|
||||
return new \phpbb\textreparser\plugins\pm_text($this->db);
|
||||
return new \phpbb\textreparser\plugins\pm_text($this->db, PRIVMSGS_TABLE);
|
||||
}
|
||||
}
|
||||
|
@@ -21,6 +21,6 @@ class phpbb_textreparser_poll_title_test extends phpbb_textreparser_test_row_bas
|
||||
|
||||
protected function get_reparser()
|
||||
{
|
||||
return new \phpbb\textreparser\plugins\poll_title($this->db);
|
||||
return new \phpbb\textreparser\plugins\poll_title($this->db, TOPICS_TABLE);
|
||||
}
|
||||
}
|
||||
|
@@ -21,6 +21,6 @@ class phpbb_textreparser_post_text_test extends phpbb_textreparser_test_row_base
|
||||
|
||||
protected function get_reparser()
|
||||
{
|
||||
return new \phpbb\textreparser\plugins\post_text($this->db);
|
||||
return new \phpbb\textreparser\plugins\post_text($this->db, POSTS_TABLE);
|
||||
}
|
||||
}
|
||||
|
@@ -24,8 +24,13 @@ abstract class phpbb_textreparser_test_row_based_plugin extends phpbb_database_t
|
||||
{
|
||||
$reparser = $this->get_reparser();
|
||||
$columns = $reparser->get_columns();
|
||||
|
||||
$reflection_reparser = new ReflectionClass(get_class($reparser));
|
||||
$table_property = $reflection_reparser->getProperty('table');
|
||||
$table_property->setAccessible(true);
|
||||
|
||||
$sql = 'SELECT ' . $columns['id'] . ' AS id, ' . $columns['text'] . ' AS text
|
||||
FROM ' . $reparser->get_table_name() . '
|
||||
FROM ' . $table_property->getValue($reparser) . '
|
||||
WHERE ' . $this->db->sql_in_set($columns['id'], $ids) . '
|
||||
ORDER BY id';
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
@@ -21,6 +21,6 @@ class phpbb_textreparser_user_signature_test extends phpbb_textreparser_test_row
|
||||
|
||||
protected function get_reparser()
|
||||
{
|
||||
return new \phpbb\textreparser\plugins\user_signature($this->db);
|
||||
return new \phpbb\textreparser\plugins\user_signature($this->db, USERS_TABLE);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user