#12219

A little clean-up in the installer (thanks ToonArmy)


git-svn-id: file:///svn/phpbb/trunk@7744 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Henry Sudhof 2007-06-10 13:42:55 +00:00
parent de739b6532
commit afb7f26ccc
5 changed files with 19 additions and 11 deletions

View file

@ -258,6 +258,8 @@ p a {
<li>[Fix] Allow for posts per page in the MCP to change during topic selection (Bug #12067)</li>
<li>[Fix] Remove group avatars upon deletion from all profiles, not just the people having the group as default (Bug #12275, #12267)</li>
<li>[Fix] Allow for conversions to SQLite (Bug #12279) - patch provided by ToonArmy</li>
<li>[Fix] Apply colors to guests (Bug #12219)</li>
<li>[Fix] Set the Admin group as founder_manage during conversion (Bug #12287)</li>
</ul>

View file

@ -1667,12 +1667,12 @@ function add_default_groups()
global $db;
$default_groups = array(
'GUESTS' => array('', 0),
'REGISTERED' => array('', 0),
'REGISTERED_COPPA' => array('', 0),
'GLOBAL_MODERATORS' => array('00AA00', 1),
'ADMINISTRATORS' => array('AA0000', 1),
'BOTS' => array('9E8DA7', 0)
'GUESTS' => array('', 0, 0),
'REGISTERED' => array('', 0, 0),
'REGISTERED_COPPA' => array('', 0, 0),
'GLOBAL_MODERATORS' => array('00AA00', 1, 0),
'ADMINISTRATORS' => array('AA0000', 1, 1),
'BOTS' => array('9E8DA7', 0, 0)
);
$sql = 'SELECT *
@ -1698,6 +1698,7 @@ function add_default_groups()
'group_type' => GROUP_SPECIAL,
'group_colour' => $data[0],
'group_legend' => $data[1],
'group_founder_manage' => $data[2]
);
}

View file

@ -1635,7 +1635,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'topic_approved' => (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) ? 0 : 1,
'topic_title' => $subject,
'topic_first_poster_name' => (!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : ''),
'topic_first_poster_colour' => (($user->data['user_id'] != ANONYMOUS) ? $user->data['user_colour'] : ''),
'topic_first_poster_colour' => $user->data['user_colour'],
'topic_type' => $topic_type,
'topic_time_limit' => ($topic_type == POST_STICKY || $topic_type == POST_ANNOUNCE) ? ($data['topic_time_limit'] * 86400) : 0,
'topic_attachment' => (!empty($data['attachment_data'])) ? 1 : 0,
@ -1774,7 +1774,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'topic_last_post_time' => $current_time,
'topic_last_poster_id' => (int) $user->data['user_id'],
'topic_last_poster_name' => (!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : ''),
'topic_last_poster_colour' => (($user->data['user_id'] != ANONYMOUS) ? $user->data['user_colour'] : ''),
'topic_last_poster_colour' => $user->data['user_colour'],
);
}
@ -2012,7 +2012,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . $current_time;
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $user->data['user_id'];
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape((!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '')) . "'";
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . (($user->data['user_id'] != ANONYMOUS) ? $db->sql_escape($user->data['user_colour']) : '') . "'";
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($user->data['user_colour']) . "'";
}
else if ($post_mode == 'edit_last_post')
{

View file

@ -184,8 +184,14 @@ if (!$get_info)
'extensions',
'extension_groups'
);
}
$src_db->sql_freeresult($result);
}
elseif ($result)
{
$src_db->sql_freeresult($result);
}
/**
* Tests for further MODs can be included here.

View file

@ -1247,7 +1247,6 @@ class install_convert extends module
if (!$convert_row)
{
// move to the next batch or table
$src_db->sql_freeresult($___result);
break;
}