public function getFeaturedEventsData( $featured )
{
$this->postAddTimes = true;
+ $where_parts = array();
if ( $featured ) {
- $where .= "T.featured = 1";
+ $where_parts[] = "T.featured = 1";
} else {
//$where .= "T.featured = 0";
}
+ $where_parts[] = "T.status = " . $this->config['status_numb']['Active'] . "
+ AND T.id IN (
+ SELECT event
+ FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "times AS ET
+ WHERE active
+ AND " . $this->dateRange . "
+ )
+ ";
+ $where = implode( ' AND ', $where_parts );
$events = $this->getList( $where );
$this->postAddTimes = false;
return $events;
* @return string
* @access public
*/
- function getEventDate(
- $sdate,
- $edate,
- $dateType,
- $microFormat = false
- ) {
+ function getEventDate( $sdate, $edate, $dateType, $microFormat = false )
+ {
switch($dateType) {
case "Postgres":
$postgresPattern = "/([0-9]{1,2})[/-]([0-9]{1,2})[/-]([0-9]{4})/";