@@ 36-44 (lines=9) @@ | ||
33 | $id = $GLOBALS['xoopsUser']->getVar('uid'); |
|
34 | $msgowner = Request::getInt('msgowner', 0, 'POST'); |
|
35 | ||
36 | if ($helper->isUserAdmin() || $id == $msgowner) { |
|
37 | if (isset($_POST['smallworld_com_id'])) { |
|
38 | $smallworld_com_id = Request::getInt('smallworld_com_id', 0, 'POST'); |
|
39 | if (0 !== $smallworld_com_id) { |
|
40 | $swDB = new Smallworld\SwDatabase(); |
|
41 | $data = $swDB->deleteWallComment($smallworld_com_id); |
|
42 | } |
|
43 | } |
|
44 | } |
|
45 |
@@ 38-44 (lines=7) @@ | ||
35 | $id = ($GLOBALS['xoopsUser'] && ($GLOBALS['xoopsUser'] instanceof \XoopsUser)) ? $GLOBALS['xoopsUser']->getVar('uid') : 0; |
|
36 | $msgowner = Request::getInt('msgowner', 0, 'POST'); |
|
37 | ||
38 | if ($helper->isUserAdmin() || ($id == $msgowner && 0 !== $msgowner)) { |
|
39 | $swDB = new Smallworld\SwDatabase(); |
|
40 | if (Request::hasVar('smallworld_msg_id', 'POST')) { |
|
41 | $smallworld_msg_id = Request::getInt('smallworld_msg_id', 0, 'POST'); |
|
42 | $data = $swDB->deleteWallMsg($id, $smallworld_msg_id); |
|
43 | } |
|
44 | } |
|
45 | $GLOBALS['xoopsLogger']->activated = $prevLogger; // restore logger to previous state |