|
|
@ -1008,7 +1008,7 @@ |
|
|
|
|
|
|
|
$boards = Array(); |
|
|
|
foreach($_POST as $name => $null) { |
|
|
|
if(preg_match('/^board_(\w+)/', $name, $m)) |
|
|
|
if(preg_match('/^board_(.+)$/', $name, $m)) |
|
|
|
$boards[] = $m[1]; |
|
|
|
} |
|
|
|
$boards = implode(',', $boards); |
|
|
@ -1021,20 +1021,26 @@ |
|
|
|
$query->execute() or error(db_error($query)); |
|
|
|
|
|
|
|
modLog('Create a new user: "' . $_POST['username'] . '"'); |
|
|
|
} |
|
|
|
header('Location: ?/users', true, $config['redirect_http']); |
|
|
|
} else { |
|
|
|
|
|
|
|
$__boards = '<ul style="list-style:none;padding:2px 5px">'; |
|
|
|
$boards = listBoards(); |
|
|
|
$boards = array_merge( |
|
|
|
Array(Array('uri' => '*', 'title' => 'All') |
|
|
|
), listBoards()); |
|
|
|
foreach($boards as &$_board) { |
|
|
|
$__boards .= '<li>' . |
|
|
|
'<input type="checkbox" name="board_' . $_board['uri'] . '" id="board_' . $_board['uri'] . '"/> ' . |
|
|
|
'<input type="checkbox" name="board_' . $_board['uri'] . '" id="board_' . $_board['uri'] . '"' . |
|
|
|
'<label style="display:inline" for="board_' . $_board['uri'] . '">' . |
|
|
|
sprintf($config['board_abbreviation'], $_board['uri']) . |
|
|
|
($_board['uri'] == '*' ? |
|
|
|
'<em>"*"</em>' |
|
|
|
: |
|
|
|
sprintf($config['board_abbreviation'], $_board['uri']) |
|
|
|
) . |
|
|
|
' - ' . $_board['title'] . |
|
|
|
'</label>' . |
|
|
|
'</li>'; |
|
|
|
} |
|
|
|
$__boards .= '</ul>'; |
|
|
|
|
|
|
|
$body = '<fieldset><legend>New user</legend>' . |
|
|
|
|
|
|
@ -1065,6 +1071,7 @@ |
|
|
|
,'mod'=>true |
|
|
|
) |
|
|
|
); |
|
|
|
} |
|
|
|
} elseif(preg_match('/^\/users\/(\d+)(\/(promote|demote|delete))?$/', $query, $matches)) { |
|
|
|
$modID = &$matches[1]; |
|
|
|
|
|
|
@ -1112,7 +1119,7 @@ |
|
|
|
if(!isset($change_password_only)) { |
|
|
|
$boards = Array(); |
|
|
|
foreach($_POST as $name => $null) { |
|
|
|
if(preg_match('/^board_(\w+)/', $name, $m)) |
|
|
|
if(preg_match('/^board_(.+)$/', $name, $m)) |
|
|
|
$boards[] = $m[1]; |
|
|
|
} |
|
|
|
$boards = implode(',', $boards); |
|
|
@ -1149,7 +1156,10 @@ |
|
|
|
} |
|
|
|
|
|
|
|
$__boards = '<ul style="list-style:none;padding:2px 5px">'; |
|
|
|
$boards = listBoards(); |
|
|
|
$boards = array_merge( |
|
|
|
Array(Array('uri' => '*', 'title' => 'All') |
|
|
|
), listBoards()); |
|
|
|
|
|
|
|
$_mod['boards'] = explode(',', $_mod['boards']); |
|
|
|
foreach($boards as &$_board) { |
|
|
|
$__boards .= '<li>' . |
|
|
@ -1159,7 +1169,11 @@ |
|
|
|
: '') . |
|
|
|
'/> ' . |
|
|
|
'<label style="display:inline" for="board_' . $_board['uri'] . '">' . |
|
|
|
sprintf($config['board_abbreviation'], $_board['uri']) . |
|
|
|
($_board['uri'] == '*' ? |
|
|
|
'<em>"*"</em>' |
|
|
|
: |
|
|
|
sprintf($config['board_abbreviation'], $_board['uri']) |
|
|
|
) . |
|
|
|
' - ' . $_board['title'] . |
|
|
|
'</label>' . |
|
|
|
'</li>'; |
|
|
|