From: Anthony Talarico Date: Tue, 21 Nov 2017 21:40:57 +0000 (-0500) Subject: fixing bug relating to the list admin model X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=f257a8fccaeb20ee3b00028ff4c7e5196ef0eafa;p=WP-Plugins%2Fglm-member-db-for-sale.git fixing bug relating to the list admin model fixing where clause declaration in the admin view model --- diff --git a/models/admin/forSale/index.php b/models/admin/forSale/index.php index a8c1274..993e829 100644 --- a/models/admin/forSale/index.php +++ b/models/admin/forSale/index.php @@ -105,7 +105,7 @@ class GlmMembersAdmin_forSale_index extends GlmDataForSale $isModerated = false; $memberID = false; $haveMember = false; - $where = 'TRUE'; + $where = ' TRUE '; $isPending = ( !empty( $_REQUEST['pending-item'] ) ) ? true : false; $textSearch = ( !empty( $_REQUEST['text-search'] ) ) ? filter_var($_REQUEST['text-search'], FILTER_SANITIZE_STRING) : false; @@ -183,9 +183,8 @@ class GlmMembersAdmin_forSale_index extends GlmDataForSale } if($isPending){ $where .= ' AND active = 0 '; - } - if($textSearch){ - $where .= " AND title LIKE '%$textSearch%'"; + } else if($textSearch){ + $where .= " AND title LIKE '%$textSearch%' "; } $item_data = $this->getList($where,'topic DESC, title'); switch ($option) {