You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying a very simple search and it's returning 0 results when the Client::SEARCH_SCOPE_ALL is used but has results when using Client::SEARCH_SCOPE_PERSONAL. I would assume that the all scope would bring back the same if not more results.
Delving into this there are a number of code issues, firstly the usort in findNotes_processResultsWithContext is returning a boolean and not the sorted results, it probably needs to change to this:
Then the method can continue to run and return the results.
Secondly the findNotes_nextFindInLinkedScopeWithContext method doesn't return anything so going back up the chain it's returning null and not the results. Probably need to add something like this:
if (count($context->linkedNotebooksToSearch) == 0) {
return $this->findNotes_processResultsWithContext($context);
}
and
$this->findNotes_nextFindInLinkedScopeWithContext($context); // not sure why this is here - would seem to loop recursively
return $this->findNotes_processResultsWithContext($context);
Again would create a pull request but already got other changes in my fork and not sure how to do multiple forks. Overall a bit disappointing using this official library, it's been a pig to work with and integrate.
The text was updated successfully, but these errors were encountered:
Trying a very simple search and it's returning 0 results when the
Client::SEARCH_SCOPE_ALL
is used but has results when usingClient::SEARCH_SCOPE_PERSONAL
. I would assume that the all scope would bring back the same if not more results.$search = new \Evernote\Model\Search('Evernote');
$notebook = null;
$scope = \Evernote\Client::SEARCH_SCOPE_PERSONAL; // Has results
//$scope = \Evernote\Client::SEARCH_SCOPE_ALL; // No results
$order = \Evernote\Client::SORT_ORDER_REVERSE | \Evernote\Client::SORT_ORDER_RECENTLY_CREATED;
$maxResult = 5;
$results = $this->service->findNotesWithSearch($search, $notebook, $scope, $order, $maxResult);
Delving into this there are a number of code issues, firstly the
usort
infindNotes_processResultsWithContext
is returning a boolean and not the sorted results, it probably needs to change to this:Then the method can continue to run and return the results.
Secondly the
findNotes_nextFindInLinkedScopeWithContext
method doesn't return anything so going back up the chain it's returning null and not the results. Probably need to add something like this:and
Again would create a pull request but already got other changes in my fork and not sure how to do multiple forks. Overall a bit disappointing using this official library, it's been a pig to work with and integrate.
The text was updated successfully, but these errors were encountered: