Comments

StryKaizer created an issue. See original summary.

strykaizer’s picture

Status: Active » Needs review
StatusFileSize
new583 bytes
leksat’s picture

Status: Needs review » Needs work

Phpdoc still says that $extensions should be a string, while in fact an array is passed here: http://cgit.drupalcode.org/search_api_attachments/tree/src/Plugin/search...

Other than that - looks good, thanks for the patch!

ekes’s picture

I can't actually work out at first glance why it stores a string; rather than storing an array and only imploding/exploding it when it's for the textfield of the form.

Sorry it's the mime types it stores as a string and goes exploding and imploding, when it could just be an array (if updated in the schema). The extensions are just left as they are. So string it should be.

ekes’s picture

Status: Needs work » Needs review
StatusFileSize
new1.23 KB

So the docblock is correct it should be returning a string, it was rather unnecessarily concatenating the array. So this is the fix from above, but adds that it returning a string directly and more obviously.

I've pushed a version of the repo with this and other patches from the queue that are RTBC'd to sandbox updated version of Search API Attachments 8.x-1.x.

  • izus committed 7ee1109 on 8.x-1.x authored by ekes
    Issue #2821884 by StryKaizer, ekes, Leksat, izus: Default excluded...
izus’s picture

Status: Needs review » Fixed

Actually here it doesn't change anything apart from switching the implode and explode uses.(i prefered to add supported extensions to an array so that we won't miss one day with the space at which we should be careful now when adding an extension support) but i'll take it :). contributions are all good :) and thanks for it !
this is now merged and will be part of next beta

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.