mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Contacts suggestions example plugin
This commit is contained in:
parent
86d763420d
commit
436e54891e
9 changed files with 106 additions and 16 deletions
|
|
@ -305,11 +305,9 @@ class Actions
|
|||
$mResult = array();
|
||||
}
|
||||
|
||||
// \RainLoop\Providers\Suggestions\ISuggestions
|
||||
// $mResult[] = new \RainLoop\Providers\Suggestions\TestSuggestions();
|
||||
|
||||
if (\is_array($mResult) && \RainLoop\Utils::IsOwnCloud())
|
||||
{
|
||||
// \RainLoop\Providers\Suggestions\ISuggestions
|
||||
$mResult[] = new \RainLoop\Providers\Suggestions\OwnCloudSuggestions();
|
||||
}
|
||||
|
||||
|
|
@ -7011,8 +7009,10 @@ class Actions
|
|||
$aResult = \array_merge($aResult, $aSuggestionsProviderResult);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$aResult = \RainLoop\Utils::RemoveSuggestionsdDuplicates($aResult);
|
||||
if ($iLimit < \count($aResult))
|
||||
{
|
||||
$aResult = \array_slice($aResult, 0, $iLimit);
|
||||
|
|
@ -7020,6 +7020,7 @@ class Actions
|
|||
|
||||
$this->Plugins()->RunHook('ajax.suggestions-post', array(&$aResult, $sQuery, $oAccount, $iLimit));
|
||||
|
||||
$aResult = \RainLoop\Utils::RemoveSuggestionsdDuplicates($aResult);
|
||||
if ($iLimit < \count($aResult))
|
||||
{
|
||||
$aResult = \array_slice($aResult, 0, $iLimit);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue