/** * delete an item from the recent stack * * @param string $id contact id that had to be removed * * @return void * @access public * @static */ static function delContact($id) { self::initialize(); $tempRecent = self::$_recent; self::$_recent = ''; // rebuild recent. for ($i = 0; $i < count($tempRecent); $i++) { // don't include deleted contact in recent. if (CRM_Utils_Array::value('contact_id', $tempRecent[$i]) == $id) { continue; } self::$_recent[] = $tempRecent[$i]; } $session = CRM_Core_Session::singleton(); $session->set(self::STORE_NAME, self::$_recent); }