mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-09-02 08:09:19 +08:00
[Legacy]_Add_global_history_viewed_DB_integration
This commit is contained in:
parent
04312106de
commit
36790eb3f3
1 changed files with 1 additions and 7 deletions
|
@ -48,19 +48,13 @@ class TrackerManagerPort
|
|||
* @param array $modules
|
||||
* @return array
|
||||
*/
|
||||
public function getModule(array $modules): array
|
||||
public function getModule(array $modules, int $history_max_viewed = 10): array
|
||||
{
|
||||
global $current_user;
|
||||
$db = DBManagerFactory::getInstance();
|
||||
$userId = $db->quote($current_user->id);
|
||||
$tracker = BeanFactory::newBean('Trackers');
|
||||
|
||||
if (!empty($modules)) {
|
||||
$history_max_viewed = 10;
|
||||
} else {
|
||||
$history_max_viewed = (!empty($GLOBALS['sugar_config']['history_max_viewed'])) ? $GLOBALS['sugar_config']['history_max_viewed'] : 50;
|
||||
}
|
||||
|
||||
$table = $tracker->table_name;
|
||||
|
||||
if (!empty($modules)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue