mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Minor improvements (#1605)
* Minor improvements * Updated * Update functions_delete.php * Update attach_maintenance.php * Update attach_maintenance.php * Update config.php * Updated * Update viewtopic_attach.tpl * Updated * Update CHANGELOG.md
This commit is contained in:
parent
c6b4672734
commit
82e7552a9e
8 changed files with 22 additions and 15 deletions
|
@ -186,12 +186,6 @@ function delete_attachment($post_id_array = 0, $attach_id_array = 0, $page = 0,
|
|||
DB()->sql_freeresult($result);
|
||||
|
||||
if ($num_rows == 0) {
|
||||
// TorrServer integration
|
||||
if ($bb_cfg['torr_server']['enabled']) {
|
||||
$torrServer = new \TorrentPier\TorrServerAPI();
|
||||
$torrServer->removeM3U($attach_id_array[$i]);
|
||||
}
|
||||
|
||||
$sql = 'SELECT attach_id, physical_filename, thumbnail
|
||||
FROM ' . BB_ATTACHMENTS_DESC . '
|
||||
WHERE attach_id = ' . (int)$attach_id_array[$i];
|
||||
|
@ -219,6 +213,12 @@ function delete_attachment($post_id_array = 0, $attach_id_array = 0, $page = 0,
|
|||
if (!(DB()->sql_query($sql))) {
|
||||
bb_die($lang['ERROR_DELETED_ATTACHMENTS']);
|
||||
}
|
||||
|
||||
// TorrServer integration
|
||||
if ($bb_cfg['torr_server']['enabled']) {
|
||||
$torrServer = new \TorrentPier\TorrServerAPI();
|
||||
$torrServer->removeM3U($attachments[$j]['attach_id']);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
DB()->sql_freeresult($result);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue