mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-16 16:28:53 +00:00
Wasn't grabbing appropriate user_id for given username entries
git-svn-id: file:///svn/phpbb/trunk@3491 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
7c96e14e76
commit
d2a016659d
1 changed files with 17 additions and 13 deletions
|
@ -251,8 +251,6 @@ if (!empty($forum_id) || !empty($group_id) || !empty($username) ||
|
||||||
$s_hidden_fields = '';
|
$s_hidden_fields = '';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!empty($forum_id))
|
if (!empty($forum_id))
|
||||||
{
|
{
|
||||||
$sql = "SELECT forum_name, parent_id
|
$sql = "SELECT forum_name, parent_id
|
||||||
|
@ -405,24 +403,30 @@ if (!empty($forum_id) || !empty($group_id) || !empty($username) ||
|
||||||
{
|
{
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
$sql = ($_POST['type'] == 'group') ? "SELECT group_id AS id, group_name AS name FROM " . GROUPS_TABLE . " WHERE group_id IN ($where_sql) ORDER BY group_name ASC" : "SELECT user_id AS id, username AS name, user_founder FROM " . USERS_TABLE . " WHERE user_id IN ($where_sql) ORDER BY username, user_regdate ASC";
|
echo "2 >> " . $sql = ($_POST['type'] == 'group') ? "SELECT group_id AS id, group_name AS name, group_type FROM " . GROUPS_TABLE . " WHERE group_id IN ($where_sql) ORDER BY group_name ASC" : "SELECT user_id AS id, username AS name, user_founder FROM " . USERS_TABLE . " WHERE username IN ($where_sql) ORDER BY username, user_regdate ASC";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
if ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$ug_test = (!empty($user->lang[$row['name']])) ? $user->lang[$row['name']] : $row['name'];
|
|
||||||
$ug .= (!strstr($ug, $ug_test)) ? $ug_test . "\n" : '';
|
|
||||||
|
|
||||||
$ug_test = '<input type="hidden" name="entries[]" value="' . $row['id'] . '" />';
|
do
|
||||||
$ug_hidden .= (!strstr($ug_hidden, $ug_test)) ? $ug_test : '';
|
{
|
||||||
|
$ug_test = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang[$row['name']] : $row['name'];
|
||||||
|
$ug .= (!strstr($ug, $ug_test)) ? $ug_test . "\n" : '';
|
||||||
|
|
||||||
$auth_values[$row['auth_value']] = (isset($auth_group[$row['auth_value']])) ? min($auth_group[$row['auth_value']], $row['auth_allow_deny']) : $row['auth_allow_deny'];
|
$ug_test = '<input type="hidden" name="entries[]" value="' . $row['id'] . '" />';
|
||||||
|
$ug_hidden .= (!strstr($ug_hidden, $ug_test)) ? $ug_test : '';
|
||||||
|
|
||||||
|
$auth_values[$row['auth_value']] = (isset($auth_group[$row['auth_value']])) ? min($auth_group[$row['auth_value']], $row['auth_allow_deny']) : $row['auth_allow_deny'];
|
||||||
|
}
|
||||||
|
while ($row = $db->sql_fetchrow($result));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
echo htmlspecialchars($ug_hidden);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Now we'll build a list of preset options ...
|
// Now we'll build a list of preset options ...
|
||||||
$preset_options = $preset_js = $preset_update_options = '';
|
$preset_options = $preset_js = $preset_update_options = '';
|
||||||
|
@ -850,7 +854,7 @@ if (!empty($forum_id) || !empty($group_id) || !empty($username) ||
|
||||||
<td class="row1" align="center"><textarea cols="40" rows="4" name="entries"></textarea></td>
|
<td class="row1" align="center"><textarea cols="40" rows="4" name="entries"></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="cat" align="center"> <input type="submit" name="add" value="<?php echo $user->lang['SUBMIT']; ?>" class="mainoption" /> <input type="reset" value="<?php echo $user->lang['RESET']; ?>" class="liteoption" /> <input type="submit" name="usersubmit" value="<?php echo $user->lang['Find_username']; ?>" class="liteoption" onclick="window.open('<?php echo "../memberlist.$phpEx$SID"; ?>&mode=searchuser&form=2&field=entries', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740');return false;" /><input type="hidden" name="type" value="user" /><input type="hidden" name="advanced" value="1" /><input type="hidden" name="new" value="1" /><input type="hidden" name="f" value="<?php echo $forum_id; ?>" /></td>
|
<td class="cat" align="center"> <input type="submit" name="add" value="<?php echo $user->lang['SUBMIT']; ?>" class="mainoption" /> <input type="reset" value="<?php echo $user->lang['RESET']; ?>" class="liteoption" /> <input type="submit" name="usersubmit" value="<?php echo $user->lang['FIND_USERNAME']; ?>" class="liteoption" onclick="window.open('<?php echo "../memberlist.$phpEx$SID"; ?>&mode=searchuser&form=2&field=entries', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740');return false;" /><input type="hidden" name="type" value="user" /><input type="hidden" name="advanced" value="1" /><input type="hidden" name="new" value="1" /><input type="hidden" name="f" value="<?php echo $forum_id; ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table></form></td>
|
</table></form></td>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue