Skip to content
Snippets Groups Projects
Commit a66cc6af authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FEAT #12091 TIME 2:00 added followed resources in search scope

parent 278dbf75
No related branches found
No related tags found
No related merge requests found
...@@ -137,8 +137,15 @@ where ...@@ -137,8 +137,15 @@ where
where users_entities.user_id = :user_id_folders where users_entities.user_id = :user_id_folders
)"; )";
$where_string = ''.$where_string." and ( ".$_SESSION['user']['security'][$coll]['DOC']['where']." or res_id in (".$whereFolders.")) "; $whereFollowed = "select res_id from users_followed_resources where user_id = :user_id_followed";
$parameters = array_merge($parameters, array(":user_id_folders" => $_SESSION['user']['UserId']));
$user = \User\models\UserModel::getByLogin(['login' => $_SESSION['user']['UserId'], 'select' => ['id']]);
$where_string = ''.$where_string." and ( ".$_SESSION['user']['security'][$coll]['DOC']['where']." or res_id in (".$whereFolders.") or res_id in (".$whereFollowed.")) ";
$parameters = array_merge($parameters, [
"user_id_folders" => $_SESSION['user']['UserId'],
"user_id_followed" => $user['id']
]);
} }
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment