Skip to content

Commit

Permalink
Merge pull request civicrm#11281 from nielosz/recent-items-dupe-check
Browse files Browse the repository at this point in the history
CRM-21433: Optimize dupe checking in Recent Items stack
  • Loading branch information
colemanw authored and sluc23 committed Jan 10, 2018
2 parents b22e914 + b3666e2 commit b6ce288
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Utils/Recent.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public static function add(

// make sure item is not already present in list
for ($i = 0; $i < count(self::$_recent); $i++) {
if (self::$_recent[$i]['url'] == $url) {
if (self::$_recent[$i]['type'] === $type && self::$_recent[$i]['id'] === $id) {
// delete item from array
array_splice(self::$_recent, $i, 1);
break;
Expand Down

0 comments on commit b6ce288

Please sign in to comment.