This is a fix for the previous fix #7313
I'm getting better at fixing my own fixes
Issue
When having the "state"/"published" filter in the article/module/category manager set to "unpublished", that state should be used as default value when creating a new item. However in this specific case it didn't work.
Solution
My code was only checking if a (boolean) value is present. That works fine for most filters since zero is never a valid case for eg a category or access level. However for the state it is a valid case and thus it failed.
The solution is to use explicite checks instead of the generic boolean check.
Testing
Test creating new articles/categories/modules while you have active filters in Search Tools. The active filters should be preselected in the respective field in the form.
Especially the published/state filter is interesting as that is where it was broken before and now should be fixed.
Test worked. The only field not responding in the articles and categories is the tags field. But I don't know if this is normal behaviour and that the tags alway have to be newly selected...
test works good