|
@@ 593-600 (lines=8) @@
|
| 590 |
|
$lid = MylinksUtility::mylinks_cleanVars($_GET, 'lid', 0, 'int', array('min' => 0)); |
| 591 |
|
|
| 592 |
|
$dbTables = array('links', 'text', 'votedata', 'broken', 'mod'); |
| 593 |
|
foreach ($dbTables as $thisTable) { |
| 594 |
|
$sql = sprintf('DELETE FROM %s WHERE lid = %u', $xoopsDB->prefix("mylinks_{$thisTable}"), $lid); |
| 595 |
|
$result = $xoopsDB->query($sql); |
| 596 |
|
if (!$result) { |
| 597 |
|
MylinksUtility::show_message(_MD_MYLINKS_DBNOTUPDATED); |
| 598 |
|
exit(); |
| 599 |
|
} |
| 600 |
|
} |
| 601 |
|
// delete comments & notifications |
| 602 |
|
xoops_comment_delete($xoopsModule->getVar('mid'), $lid); |
| 603 |
|
xoops_notification_deletebyitem($xoopsModule->getVar('mid'), 'link', $lid); |
|
@@ 727-734 (lines=8) @@
|
| 724 |
|
if ($lidArray) { |
| 725 |
|
$linkIDs = '(' . implode(',', $lidArray) . ')'; |
| 726 |
|
$dbTables = array('links', 'text', 'votedata', 'broken', 'mod'); |
| 727 |
|
foreach ($dbTables as $thisTable) { |
| 728 |
|
$sql = sprintf('DELETE FROM %s WHERE lid IN %s', $xoopsDB->prefix("mylinks_{$thisTable}"), $linkIDs); |
| 729 |
|
$result = $xoopsDB->query($sql); |
| 730 |
|
if (!result) { |
| 731 |
|
MylinksUtility::show_message(_MD_MYLINKS_NORECORDFOUND); |
| 732 |
|
exit(); |
| 733 |
|
} |
| 734 |
|
} |
| 735 |
|
// remove any notifications and comments for these listings |
| 736 |
|
foreach ($lidArray as $this_lid) { |
| 737 |
|
xoops_comment_delete($xoopsModule->getVar('mid'), $this_lid); |