aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/adm/style/acp_groups_position.html2
-rw-r--r--phpBB/includes/group_positions.php11
-rw-r--r--phpBB/language/en/acp/groups.php4
-rw-r--r--tests/group_positions/group_positions_test.php2
4 files changed, 9 insertions, 10 deletions
diff --git a/phpBB/adm/style/acp_groups_position.html b/phpBB/adm/style/acp_groups_position.html
index 9b18701179..bf6fda8742 100644
--- a/phpBB/adm/style/acp_groups_position.html
+++ b/phpBB/adm/style/acp_groups_position.html
@@ -155,4 +155,4 @@
</fieldset>
</form>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/includes/group_positions.php b/phpBB/includes/group_positions.php
index a697d96f66..951014c0c0 100644
--- a/phpBB/includes/group_positions.php
+++ b/phpBB/includes/group_positions.php
@@ -2,8 +2,7 @@
/**
*
* @package phpBB3
-* @version $Id$
-* @copyright (c) 2005 phpBB Group
+* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
@@ -125,10 +124,10 @@ class phpbb_group_positions
}
/**
- * Deletes a group by group_id
+ * Deletes a group by setting the field to self::GROUP_DISABLED and closing the gap in the list.
*
* @param int $group_id group_id of the group to be deleted
- * @param bool $skip_group Skip the group itself, to save the query, when you need to update it anyway.
+ * @param bool $skip_group Skip setting the group to GROUP_DISABLED, to save the query, when you need to update it anyway.
* @return void
*/
public function delete_group($group_id, $skip_group = false)
@@ -177,7 +176,7 @@ class phpbb_group_positions
$this->db->sql_query($sql);
$sql = 'UPDATE ' . GROUPS_TABLE . '
- SET group_' . $this->field . ' = ' . ($current_value - 1) . '
+ SET group_' . $this->field . ' = group_' . $this->field . ' - 1
WHERE group_id = ' . (int) $group_id;
$this->db->sql_query($sql);
@@ -208,7 +207,7 @@ class phpbb_group_positions
{
// Only update when we move another one up, otherwise it was the last.
$sql = 'UPDATE ' . GROUPS_TABLE . '
- SET group_' . $this->field . ' = ' . ($current_value + 1) . '
+ SET group_' . $this->field . ' = group_' . $this->field . ' + 1
WHERE group_id = ' . (int) $group_id;
$this->db->sql_query($sql);
}
diff --git a/phpBB/language/en/acp/groups.php b/phpBB/language/en/acp/groups.php
index 9cc386f6fd..1fcf213c43 100644
--- a/phpBB/language/en/acp/groups.php
+++ b/phpBB/language/en/acp/groups.php
@@ -110,7 +110,7 @@ $lang = array_merge($lang, array(
'LEGEND_EXPLAIN' => 'These are the groups, which are viewed on the group legend:',
'LEGEND_SETTINGS' => 'Legend settings',
'LEGEND_SORT_GROUPNAME' => 'Sort legend by group name',
- 'LEGEND_SORT_GROUPNAME_EXPLAIN' => 'The order from bellow is ignored when this option is enabled.',
+ 'LEGEND_SORT_GROUPNAME_EXPLAIN' => 'The order below is ignored when this option is enabled.',
'MANAGE_LEGEND' => 'Manage group legend',
'MANAGE_TEAMPAGE' => 'Manage teampage',
@@ -131,7 +131,7 @@ $lang = array_merge($lang, array(
'TEAMPAGE_EXPLAIN' => 'These are the groups, which are viewed on the teampage:',
'TEAMPAGE_FORUMS' => 'Display moderator forums',
- 'TEAMPAGE_FORUMS_EXPLAIN' => 'If set to yes, moderators will have a list with all of the forums, where they have moderator permissions, in their row. This can be very SQL intensive for big boards.',
+ 'TEAMPAGE_FORUMS_EXPLAIN' => 'If set to yes, moderators will have a list with all of the forums, where they have moderator permissions, in their row. This can be very database intensive for big boards.',
'TEAMPAGE_MULTIPLE' => 'Display users in all groups',
'TEAMPAGE_MULTIPLE_EXPLAIN' => 'If set to no, the users will only be displayed in their first group.',
'TEAMPAGE_SETTINGS' => 'Teampage settings',
diff --git a/tests/group_positions/group_positions_test.php b/tests/group_positions/group_positions_test.php
index 449217c9b7..7454402194 100644
--- a/tests/group_positions/group_positions_test.php
+++ b/tests/group_positions/group_positions_test.php
@@ -2,7 +2,7 @@
/**
*
* @package testing
-* @copyright (c) 2008 phpBB Group
+* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/