unable to delete accounts using tickboxes on admin/accounts - make all the action names consistent
This commit is contained in:
parent
8d479aa1c7
commit
668f56807a
@ -16,6 +16,9 @@ class Accounts {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function post() {
|
function post() {
|
||||||
|
|
||||||
|
logger('post: ' . print_r($_POST,true));
|
||||||
|
|
||||||
$pending = ( x($_POST, 'pending') ? $_POST['pending'] : array() );
|
$pending = ( x($_POST, 'pending') ? $_POST['pending'] : array() );
|
||||||
$users = ( x($_POST, 'user') ? $_POST['user'] : array() );
|
$users = ( x($_POST, 'user') ? $_POST['user'] : array() );
|
||||||
$blocked = ( x($_POST, 'blocked') ? $_POST['blocked'] : array() );
|
$blocked = ( x($_POST, 'blocked') ? $_POST['blocked'] : array() );
|
||||||
@ -24,7 +27,7 @@ class Accounts {
|
|||||||
|
|
||||||
// change to switch structure?
|
// change to switch structure?
|
||||||
// account block/unblock button was submitted
|
// account block/unblock button was submitted
|
||||||
if (x($_POST, 'page_users_block')) {
|
if (x($_POST, 'page_accounts_block')) {
|
||||||
for ($i = 0; $i < count($users); $i++) {
|
for ($i = 0; $i < count($users); $i++) {
|
||||||
// if account is blocked remove blocked bit-flag, otherwise add blocked bit-flag
|
// if account is blocked remove blocked bit-flag, otherwise add blocked bit-flag
|
||||||
$op = ($blocked[$i]) ? '& ~' : '| ';
|
$op = ($blocked[$i]) ? '& ~' : '| ';
|
||||||
@ -43,13 +46,13 @@ class Accounts {
|
|||||||
notice( sprintf( tt("%s account deleted", "%s accounts deleted", count($users)), count($users)) );
|
notice( sprintf( tt("%s account deleted", "%s accounts deleted", count($users)), count($users)) );
|
||||||
}
|
}
|
||||||
// registration approved button was submitted
|
// registration approved button was submitted
|
||||||
if (x($_POST, 'page_users_approve')) {
|
if (x($_POST, 'page_accounts_approve')) {
|
||||||
foreach ($pending as $hash) {
|
foreach ($pending as $hash) {
|
||||||
account_allow($hash);
|
account_allow($hash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// registration deny button was submitted
|
// registration deny button was submitted
|
||||||
if (x($_POST, 'page_users_deny')) {
|
if (x($_POST, 'page_accounts_deny')) {
|
||||||
foreach ($pending as $hash) {
|
foreach ($pending as $hash) {
|
||||||
account_deny($hash);
|
account_deny($hash);
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="selectall"><a href="#" onclick="return toggle_selectall('pending_ckbx');">{{$select_all}}</a></div>
|
<div class="selectall"><a href="#" onclick="return toggle_selectall('pending_ckbx');">{{$select_all}}</a></div>
|
||||||
<div class="submit"><input type="submit" name="page_users_deny" value="{{$deny}}"> <input type="submit" name="page_users_approve" value="{{$approve}}"></div>
|
<div class="submit"><input type="submit" name="page_accounts_deny" value="{{$deny}}"> <input type="submit" name="page_accounts_approve" value="{{$approve}}"></div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<p>{{$no_pending}}</p>
|
<p>{{$no_pending}}</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@ -80,7 +80,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="selectall"><a href="#" onclick="return toggle_selectall('users_ckbx');">{{$select_all}}</a></div>
|
<div class="selectall"><a href="#" onclick="return toggle_selectall('users_ckbx');">{{$select_all}}</a></div>
|
||||||
<div class="submit"><input type="submit" name="page_users_block" value="{{$block}}/{{$unblock}}"> <input type="submit" name="page_users_delete" value="{{$delete}}" onclick="return confirm_delete_multi()"></div>
|
<div class="submit"><input type="submit" name="page_accounts_block" value="{{$block}}/{{$unblock}}"> <input type="submit" name="page_accounts_delete" value="{{$delete}}" onclick="return confirm_delete_multi()"></div>
|
||||||
{{else}}
|
{{else}}
|
||||||
NO USERS?!?
|
NO USERS?!?
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
Reference in New Issue
Block a user