Merged
Conversation
… objects - Introduce Horde_ActiveSync_Search_Params to pass typed search parameters to getSearchResults() instead of a loosely-structured $search_query array - Separate $query, $options, $rebuildResults, and $deepTraversal into distinct variables for clarity - Fix missing break in documentlibrary case causing fall-through into mailbox and overwriting $maxResults with 100 - Fix $maxResults, $query, $searchbodypreference undefined when Options block is absent or default switch branch is hit - Fix null Range being treated as a protocol error; omitting Range is valid and should use default start/limit values - Fix bare STORE_STATUS_RANGEERR reference (missing self::) - Results pagination and total count now delegated to the backend via Search_Results object instead of being done in-place with array_slice()
ralflang
approved these changes
Mar 11, 2026
…options and deepTraversal in Adapter.php - Add $options and $deepTraversal parameters to queryMailbox() and _doQuery(), matching the Search_Params refactor in the driver layer - Add typed signatures (array, bool, return type) to both methods - Move $imap_query, $mboxes, and $results initialization to after the early AND-query validation, avoiding unnecessary object creation on error
723db70 to
e52f047
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Redesign
_handle()to useSearch_Params/Search_ResultsobjectsHorde_ActiveSync_Search_Paramsto pass typed search parametersto
getSearchResults()instead of a loosely-structured$search_queryarray$query,$options,$rebuildResults, and$deepTraversalintodistinct variables for clarity
documentlibrarycase causing fall-through intomailbox and overwriting
$maxResultswith 100$maxResults,$query,$searchbodypreferenceundefined when Optionsblock is absent or default switch branch is hit
valid and should use default start/limit values
STORE_STATUS_RANGEERRreference (missingself::)Search_Resultsobject instead of being done in-place witharray_slice()Update
queryMailbox()and_doQuery()to accept options anddeepTraversalinAdapter.php$optionsand$deepTraversalparameters toqueryMailbox()and_doQuery(),matching the
Search_Paramsrefactor in the driver layer$imap_query,$mboxes, and$resultsinitialization to after theearly AND-query validation, avoiding unnecessary object creation on error
IMPORTANT: Requires changes in horde/Core#61.