1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 19:54:12 +02:00

[ticket/9109] Only query database once in phpbb_get_max_setting_from_group

More test cases have been added, too.

PHPBB3-9109
This commit is contained in:
Marc Alexander
2015-02-03 23:13:37 +01:00
committed by Joas Schilling
parent 291143fe6a
commit 5cc0488f74
3 changed files with 30 additions and 20 deletions

View File

@@ -23,6 +23,12 @@
<value>0</value>
<value>0</value>
</row>
<row>
<value>4</value>
<value></value>
<value>0</value>
<value>5</value>
</row>
</table>
<table name="phpbb_user_group">
<column>user_id</column>
@@ -58,5 +64,20 @@
<value>3</value>
<value>0</value>
</row>
<row>
<value>4</value>
<value>4</value>
<value>0</value>
</row>
<row>
<value>5</value>
<value>3</value>
<value>1</value>
</row>
<row>
<value>5</value>
<value>2</value>
<value>0</value>
</row>
</table>
</dataset>

View File

@@ -36,9 +36,13 @@ class phpbb_functions_privmsgs_get_max_setting_from_group_test extends phpbb_dat
array(1, 0, 'message_limit'),
array(2, 2, 'message_limit'),
array(3, 0, 'message_limit'),
array(4, 0, 'message_limit'),
array(5, 2, 'message_limit'),
array(1, 0, 'max_recipients'),
array(2, 4, 'max_recipients'),
array(3, 0, 'max_recipients'),
array(4, 5, 'max_recipients'),
array(5, 4, 'max_recipients'),
);
}