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

Merge branch 'ticket/9549' into develop

* ticket/9549:
  [ticket/9549] Display users in their primary group instead of their first group
  [ticket/9549] Change default value of "sort legend by group name" to false.
  [ticket/9549] Fix displaying empty groups
  [ticket/9549] Fix language strings.
  [ticket/9549] Only add group to legend/teampage when the checkbox is checked.
  [ticket/9549] New method move() to move a group more than 1 up/down.
  [ticket/9549] Fix some minor issues with descriptions and coding-guidelines.
  [ticket/9549] Throw an error when the given field-name is invalid.
  [ticket/9549] Make the class non static and extend delete_group function.
  [ticket/9549] Add template changes for subsilver2.
  [ticket/9549] Enhance teampage and legend functionality
  [ticket/9549] Add the module and files for the ACP.
  [ticket/9549] Update database with the new config values and columns
  [ticket/9549] Enhance teampage functionality with a new class, group_positions.

Conflicts:
	phpBB/install/database_update.php
This commit is contained in:
Oleg Pudeyev
2011-03-01 16:57:00 -05:00
25 changed files with 1244 additions and 263 deletions

View File

@@ -930,8 +930,19 @@ function database_update_info()
),
),
// No changes from 3.1.0-dev to 3.1.0-A1
'3.1.0-dev' => array(),
// Changes from 3.1.0-dev to 3.1.0-A1
'3.1.0-dev' => array(
'add_columns' => array(
GROUPS_TABLE => array(
'group_teampage' => array('UINT', 0, 'after' => 'group_legend'),
),
),
'change_columns' => array(
GROUPS_TABLE => array(
'group_legend' => array('UINT', 0),
),
),
),
);
}
@@ -1902,6 +1913,56 @@ function change_database_data(&$no_updates, $version)
// Changes from 3.1.0-dev to 3.1.0-A1
case '3.1.0-dev':
set_config('use_system_cron', 0);
$sql = 'UPDATE ' . GROUPS_TABLE . '
SET group_teampage = 1
WHERE group_type = ' . GROUP_SPECIAL . "
AND group_name = 'ADMINISTRATORS'";
_sql($sql, $errored, $error_ary);
$sql = 'UPDATE ' . GROUPS_TABLE . '
SET group_teampage = 2
WHERE group_type = ' . GROUP_SPECIAL . "
AND group_name = 'GLOBAL_MODERATORS'";
_sql($sql, $errored, $error_ary);
set_config('legend_sort_groupname', '0');
set_config('teampage_multiple', '1');
set_config('teampage_forums', '1');
$sql = 'SELECT group_id
FROM ' . GROUPS_TABLE . '
WHERE group_legend = 1
ORDER BY group_name ASC';
$result = $db->sql_query($sql);
$next_legend = 1;
while ($row = $db->sql_fetchrow($result))
{
$sql = 'UPDATE ' . GROUPS_TABLE . '
SET group_legend = ' . $next_legend . '
WHERE group_id = ' . (int) $row['group_id'];
_sql($sql, $errored, $error_ary);
$next_legend++;
}
$db->sql_freeresult($result);
unset($next_legend);
// Install modules
$modules_to_install = array(
'position' => array(
'base' => 'groups',
'class' => 'acp',
'title' => 'ACP_GROUPS_POSITION',
'auth' => 'acl_a_group',
'cat' => 'ACP_GROUPS',
),
);
_add_modules($modules_to_install);
$no_updates = false;
break;
}
}