bricoleurs / bricolage

Content management and publishing system
http://www.bricolagecms.org/
111 stars 51 forks source link

Fix (un)expired search to really be a boolean #21

Closed gregheo closed 13 years ago

gregheo commented 13 years ago

Allow unexpired => 0/1 and the reverse expired => 0/1.

Not sure if the SQL style ((where clause) = 1) is completely up to the standard but it works. Alternate plan: just make it an "on" switch where { unexpired => 1} and { expired => 1 } are opposites.

theory commented 13 years ago

Yeah, don't care for the use of 0/1. Why not just leave unexpired as it was and make expired also require no parameter?

gregheo commented 13 years ago

That's OK too. I think it was Phillip who needed to get a list of expired stories and was trying { unexpired => 0 }.

I figured since it works for active/inactive and the docs say it's a boolean, keep it a 0/1 boolean.

theory commented 13 years ago

Great. Can you update the branch and add a test or three, please?