*
* @var string
*/
- const MAX_ITEMS = 30, STORE_NAME = 'CRM_Utils_Recent';
+ const STORE_NAME = 'CRM_Utils_Recent';
+
+ /**
+ * Max number of recent items to store
+ *
+ * @var int
+ */
+ const MAX_ITEMS = 30;
/**
* The list of recently viewed items.
* The link for the above title.
* @param string $id
* Object id.
- * @param $type
+ * @param string $type
* @param int $contactId
* @param string $contactName
* @param array $others
self::$_recent = array_filter(self::$_recent, function($item) use ($props) {
foreach ($props as $key => $val) {
- if (isset($item[$key]) && $item[$key] == $val) {
- return FALSE;
+ if (isset($item[$key]) && $item[$key] != $val) {
+ return TRUE;
}
}
- return TRUE;
+ return FALSE;
});
}