mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 21:33:54 -07:00
parent
f456c827d7
commit
f48e7121df
3 changed files with 11 additions and 3 deletions
|
@ -517,7 +517,11 @@ if ($mode) {
|
|||
case 'movedelcat':
|
||||
// Move or delete a category in the DB
|
||||
$from_id = (int)$_POST['from_id'];
|
||||
$to_id = (int)$_POST['to_id'];
|
||||
$to_id = (int)$_POST['to_id'] ?? -1;
|
||||
|
||||
if ($to_id === -1) {
|
||||
bb_die($lang['NOWHERE_TO_MOVE']);
|
||||
}
|
||||
|
||||
if ($from_id == $to_id || !cat_exists($from_id) || !cat_exists($to_id)) {
|
||||
bb_die('Bad input');
|
||||
|
|
|
@ -13,7 +13,11 @@ if (!defined('IN_AJAX')) {
|
|||
|
||||
global $datastore, $lang;
|
||||
|
||||
if (!$ranks = $datastore->get('ranks')) {
|
||||
$datastore->update('ranks');
|
||||
$ranks = $datastore->get('ranks');
|
||||
}
|
||||
|
||||
$rank_id = (int)$this->request['rank_id'];
|
||||
|
||||
if (!$user_id = (int)$this->request['user_id'] or !$profiledata = get_userdata($user_id)) {
|
||||
|
|
|
@ -152,7 +152,7 @@ function toggle_cat_list (val)
|
|||
</tbody>
|
||||
<tr>
|
||||
<td colspan="2" class="catBottom pad_4">
|
||||
<input type="submit" name="submit" value="{S_SUBMIT_VALUE}" class="bold" />
|
||||
<input type="submit" <!-- IF NOWHERE_TO_MOVE -->disabled<!-- ENDIF --> name="submit" value="{S_SUBMIT_VALUE}" class="bold" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue