|
@@ 397-405 (lines=9) @@
|
| 394 |
|
$sql = 'INSERT INTO ' . $xoopsDB->prefix('smallworld_friends') . " (id,me,you,status,date) VALUES ('', '" . $userid . "', '" . $friendid . "', '1', UNIX_TIMESTAMP())"; |
| 395 |
|
$result = $xoopsDB->queryF($sql); |
| 396 |
|
} |
| 397 |
|
if ($status > 0) { |
| 398 |
|
$sql = 'DELETE FROM ' . $xoopsDB->prefix('smallworld_friends') . " WHERE me = '" . (int)$friendid . "' AND you = '" . (int)$userid . "'"; |
| 399 |
|
$sql2 = 'DELETE FROM ' . $xoopsDB->prefix('smallworld_friends') . " WHERE me = '" . (int)$userid . "' AND you = '" . (int)$friendid . "'"; |
| 400 |
|
$result = $xoopsDB->queryF($sql); |
| 401 |
|
$result2 = $xoopsDB->queryF($sql2); |
| 402 |
|
|
| 403 |
|
// Since friendship is canceled also following is deleted |
| 404 |
|
$this->toogleFollow(1, $userid, $friendid); |
| 405 |
|
} |
| 406 |
|
} |
| 407 |
|
|
| 408 |
|
/** |
|
@@ 448-453 (lines=6) @@
|
| 445 |
|
$query = 'INSERT INTO ' . $xoopsDB->prefix('smallworld_friends') . " (id,me,you,status,date) VALUES ('', '" . $myUid . "', '" . $friend . "', '2', UNIX_TIMESTAMP())"; |
| 446 |
|
$result = $xoopsDB->queryF($query); |
| 447 |
|
} |
| 448 |
|
if ($stat < 0) { |
| 449 |
|
$sql = 'DELETE FROM ' . $xoopsDB->prefix('smallworld_friends') . " WHERE me = '" . (int)$friend . "' AND you = '" . (int)$myUid . "'"; |
| 450 |
|
$sql2 = 'DELETE FROM ' . $xoopsDB->prefix('smallworld_friends') . " WHERE you = '" . (int)$friend . "' AND me = '" . (int)$myUid . "'"; |
| 451 |
|
$result = $xoopsDB->queryF($sql); |
| 452 |
|
$result2 = $xoopsDB->queryF($sql2); |
| 453 |
|
} |
| 454 |
|
} |
| 455 |
|
|
| 456 |
|
/** |