|
@@ 65-67 (lines=3) @@
|
| 62 |
|
$data = []; |
| 63 |
|
if ($GLOBALS['xoopsUser'] && ($GLOBALS['xoopsUser'] instanceof \XoopsUser)) { |
| 64 |
|
switch ($action) { |
| 65 |
|
case 'pending': |
| 66 |
|
$sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('smallworld_friends') . " WHERE me = '" . $id . "' AND status = " . Constants::FRIEND_STATUS_PENDING; |
| 67 |
|
break; |
| 68 |
|
case 'friends': |
| 69 |
|
$sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('smallworld_friends') . " WHERE me = '" . $id . "' AND status = " . Constants::FRIEND_STATUS_APPROVED; |
| 70 |
|
break; |
|
@@ 68-70 (lines=3) @@
|
| 65 |
|
case 'pending': |
| 66 |
|
$sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('smallworld_friends') . " WHERE me = '" . $id . "' AND status = " . Constants::FRIEND_STATUS_PENDING; |
| 67 |
|
break; |
| 68 |
|
case 'friends': |
| 69 |
|
$sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('smallworld_friends') . " WHERE me = '" . $id . "' AND status = " . Constants::FRIEND_STATUS_APPROVED; |
| 70 |
|
break; |
| 71 |
|
case 'following': |
| 72 |
|
$sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('smallworld_followers') . " WHERE me = '" . $id . "'"; |
| 73 |
|
break; |