Use localuser()
This commit is contained in:
parent
39560218f8
commit
543c8f8459
1 changed files with 3 additions and 3 deletions
|
@ -646,21 +646,21 @@ class Contact extends BaseModule
|
||||||
return $arr['output'];
|
return $arr['output'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$select_uid = $_SESSION['uid'];
|
$select_uid = local_user();
|
||||||
|
|
||||||
// @TODO: Replace with parameter from router
|
// @TODO: Replace with parameter from router
|
||||||
$type = $a->argv[1] ?? '';
|
$type = $a->argv[1] ?? '';
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'blocked':
|
case 'blocked':
|
||||||
$sql_extra = sprintf(" AND EXISTS(SELECT `id` from `user-contact` WHERE `contact`.`id` = `user-contact`.`cid` and `user-contact`.`uid` = %d and `user-contact`.`blocked`)", intval($_SESSION['uid']));
|
$sql_extra = sprintf(" AND EXISTS(SELECT `id` from `user-contact` WHERE `contact`.`id` = `user-contact`.`cid` and `user-contact`.`uid` = %d and `user-contact`.`blocked`)", intval(local_user()));
|
||||||
$select_uid = 0;
|
$select_uid = 0;
|
||||||
break;
|
break;
|
||||||
case 'hidden':
|
case 'hidden':
|
||||||
$sql_extra = " AND `hidden` AND NOT `blocked` AND NOT `pending`";
|
$sql_extra = " AND `hidden` AND NOT `blocked` AND NOT `pending`";
|
||||||
break;
|
break;
|
||||||
case 'ignored':
|
case 'ignored':
|
||||||
$sql_extra = sprintf(" AND EXISTS(SELECT `id` from `user-contact` WHERE `contact`.`id` = `user-contact`.`cid` and `user-contact`.`uid` = %d and `user-contact`.`ignored`)", intval($_SESSION['uid']));
|
$sql_extra = sprintf(" AND EXISTS(SELECT `id` from `user-contact` WHERE `contact`.`id` = `user-contact`.`cid` and `user-contact`.`uid` = %d and `user-contact`.`ignored`)", intval(local_user()));
|
||||||
$select_uid = 0;
|
$select_uid = 0;
|
||||||
break;
|
break;
|
||||||
case 'archived':
|
case 'archived':
|
||||||
|
|
Loading…
Reference in a new issue