Skip to content

Commit 3558489

Browse files
committed
updates to abuse function adding paginated crud listing
1 parent 0bb3a94 commit 3558489

1 file changed

Lines changed: 2 additions & 20 deletions

File tree

src/abuse.php

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -98,26 +98,8 @@ function_requirements('abuse_admin');
9898
add_output('Invalid complaint');
9999
}
100100
} else {
101-
$db->query("select * from abuse where abuse_status='pending' and abuse_lid='" . $db->real_escape($GLOBALS['tf']->accounts->data['account_lid']) . "'");
102-
if ($db->num_rows() > 0) {
103-
$table = new \TFTable;
104-
$table->set_title('Abuse Complaints');
105-
$table->add_field('IP');
106-
$table->add_field('Time');
107-
$table->add_field('Type');
108-
$table->add_field('');
109-
$table->add_row();
110-
while ($db->next_record(MYSQL_ASSOC)) {
111-
$table->add_field($db->Record['abuse_ip']);
112-
$table->add_field($db->Record['abuse_time']);
113-
$table->add_field($db->Record['abuse_type']);
114-
$table->add_field('<a href="'.$GLOBALS['tf']->link('abuse.php', 'id='.$db->Record['abuse_id'] . ($logged_in === true ? '' : '&key='.$key)).'">Update</a>');
115-
$table->add_row();
116-
}
117-
add_output($table->get_table());
118-
} else {
119-
add_output('No Abuse complaints');
120-
}
101+
function_requirements('crud_abuse');
102+
crud_abuse();
121103
}
122104
}
123105
}

0 commit comments

Comments
 (0)