mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 14:07:04 +03:00
Contacts suggestions example plugin
This commit is contained in:
parent
86d763420d
commit
436e54891e
9 changed files with 106 additions and 16 deletions
|
|
@ -608,6 +608,32 @@ class Utils
|
|||
return self::WebVersionPath().'static/';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $aSuggestions
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function RemoveSuggestionsdDuplicates($aSuggestions)
|
||||
{
|
||||
$aResult = array();
|
||||
|
||||
if (is_array($aSuggestions))
|
||||
{
|
||||
$aCache = array();
|
||||
foreach ($aSuggestions as $aItem)
|
||||
{
|
||||
$sLine = \implode('~~', $aItem);
|
||||
if (!isset($aCache[$sLine]))
|
||||
{
|
||||
$aCache[$sLine] = true;
|
||||
$aResult[] = $aItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $aResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sFileName
|
||||
* @param bool $bProcessSections = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue