+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018 |
+ | Copyright CiviCRM LLC (c) 2004-2019 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
*/
/**
// make sure item is not already present in list
for ($i = 0; $i < count(self::$_recent); $i++) {
- if (self::$_recent[$i]['type'] === $type && self::$_recent[$i]['id'] === $id) {
+ if (self::$_recent[$i]['type'] === $type && self::$_recent[$i]['id'] == $id) {
// delete item from array
array_splice(self::$_recent, $i, 1);
break;
}
}
+ CRM_Utils_Hook::recent(self::$_recent);
$session = CRM_Core_Session::singleton();
$session->set(self::STORE_NAME, self::$_recent);
}
self::$_recent[] = $tempRecent[$i];
}
+ CRM_Utils_Hook::recent(self::$_recent);
$session = CRM_Core_Session::singleton();
$session->set(self::STORE_NAME, self::$_recent);
}
/**
* Check if a provider is allowed to add stuff.
- * If correspondig setting is empty, all are allowed
+ * If corresponding setting is empty, all are allowed
*
* @param string $providerName
+ * @return bool
*/
public static function isProviderEnabled($providerName) {
/**
* Gets the list of available providers to civi's recent items stack
+ *
+ * @return array
*/
public static function getProviders() {
$providers = array(