Skip to content

Commit

Permalink
Merge tag 'SimplaCMS-ProCoupons.php' into develop
Browse files Browse the repository at this point in the history
Tagging version Coupons.php SimplaCMS-ProCoupons.php
  • Loading branch information
osben committed Sep 12, 2016
2 parents 0d4ca7a + 53d14fe commit e8ed669
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions api/Coupons.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,6 @@ public function count_coupons($filter = array())
if(isset($filter['valid']))
$valid_filter = $this->db->placehold('AND ((DATE(NOW()) <= DATE(c.expire) OR c.expire IS NULL) AND (c.usages=0 OR NOT c.single))');

if(isset($filter['keyword']))
{
$keywords = explode(' ', $filter['keyword']);
foreach($keywords as $keyword)
$keyword_filter .= $this->db->placehold('AND (b.name LIKE "%'.$this->db->escape(trim($keyword)).'%" OR b.meta_keywords LIKE "%'.$this->db->escape(trim($keyword)).'%") ');
}

$query = $this->db->placehold("SELECT COUNT(distinct c.id) as count
FROM __coupons c
WHERE 1
Expand Down

0 comments on commit e8ed669

Please sign in to comment.