Skip to content

Commit

Permalink
Fix incompatible function signature
Browse files Browse the repository at this point in the history
Fixes #73
  • Loading branch information
michael-e committed Apr 30, 2017
1 parent 79e93fa commit c640881
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fields/field.email_newsletter_manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,13 @@ public function prepareTableValue($data, XMLElement $link = null, $entry_id = nu
return parent::prepareTableValue(array('value' => $value), $link);
}

public function buildSortingSQL(&$joins, &$where, &$sort, $order = 'ASC', &$select = null)
public function buildSortingSQL(&$joins, &$where, &$sort, $order = 'ASC')
{
if (in_array(strtolower($order), array('random', 'rand'))) {
$sort = 'ORDER BY RAND()';
} else {
$joins .= "LEFT OUTER JOIN `tbl_entries_data_".$this->get('id')."` AS `ed` ON (`e`.`id` = `ed`.`entry_id`) LEFT JOIN `tbl_email_newsletters` as `nl` on `ed`.`newsletter_id` = `nl`.`id`";
$sort = sprintf('ORDER BY `nl`.`status` %s', $order);
$select = '`nl`.`status`';
}
}

Expand Down

0 comments on commit c640881

Please sign in to comment.