octobercms/october — pull request #775 by alvaro-canepa (2014-11-17 03:20:15+00:00)
Title: Fix backend search

Backend search doesn't work properly if exists a previous where sentence of `deleted_at`.
The problem is on the use of `orWhere`, without validate for previous wheres, making a final SQL like this

`table_name`.`deleted_at` is null or (((lower(table_name.column_one) LIKE '%term%')

I don't know if my solution is the correct one. It work fine on my tests.

Thanks