1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 08:47:45 +02:00

Merge branch 'feature/avatars' of https://github.com/igorw/phpbb3 into feature/avatars

Conflicts:
	phpBB/adm/style/acp_groups.html
	phpBB/adm/style/acp_users_avatar.html
	phpBB/includes/acp/acp_groups.php
	phpBB/includes/acp/acp_users.php
	phpBB/includes/functions_display.php
	phpBB/install/database_update.php
	phpBB/install/schemas/mssql_schema.sql
	phpBB/styles/prosilver/template/ucp_avatar_options.html
This commit is contained in:
Marc Alexander
2012-11-12 14:57:28 +01:00
40 changed files with 1492 additions and 424 deletions

View File

@@ -1130,6 +1130,10 @@ function database_update_info()
'change_columns' => array(
GROUPS_TABLE => array(
'group_legend' => array('UINT', 0),
'group_avatar_type' => array('VCHAR:32', 0),
),
USERS_TABLE => array(
'user_avatar_type' => array('VCHAR:32', 0),
),
USERS_TABLE => array(
'user_timezone' => array('VCHAR:100', ''),
@@ -2710,6 +2714,26 @@ function change_database_data(&$no_updates, $version)
$config->set('display_last_subject', '1');
}
// Update avatars to modular types
$avatar_type_map = array(
AVATAR_UPLOAD => 'upload',
AVATAR_GALLERY => 'local',
AVATAR_REMOTE => 'remote',
);
foreach ($avatar_type_map as $old => $new)
{
$sql = 'UPDATE ' . USERS_TABLE . "
SET user_avatar_type = '" . $db->sql_escape($new) . "'
WHERE user_avatar_type = '" . $db->sql_escape($old) . "'";
_sql($sql, $errored, $error_ary);
$sql = 'UPDATE ' . GROUPS_TABLE . "
SET group_avatar_type = '" . $db->sql_escape($new) . "'
WHERE group_avatar_type = '" . $db->sql_escape($old) . "'";
_sql($sql, $errored, $error_ary);
}
$no_updates = false;
if (!isset($config['assets_version']))