Fix indentation issues
This commit is contained in:
@ -14,20 +14,16 @@ class BootStrapMenu {
|
||||
return ($this->daemon) ?
|
||||
array_merge(
|
||||
array(
|
||||
'timeSinceStart' =>
|
||||
Carbon::createFromFormat(
|
||||
'timeSinceStart' => Carbon::createFromFormat(
|
||||
'Y-m-d H:i:s',
|
||||
$this->daemon->created_at,
|
||||
'UTC'
|
||||
)
|
||||
->diffForHumans(),
|
||||
'timeSinceUpdate' =>
|
||||
Carbon::createFromFormat(
|
||||
)->diffForHumans(),
|
||||
'timeSinceUpdate' => Carbon::createFromFormat(
|
||||
'Y-m-d H:i:s',
|
||||
$this->daemon->updated_at,
|
||||
'UTC'
|
||||
)
|
||||
->diffForHumans()
|
||||
)->diffForHumans()
|
||||
),
|
||||
json_decode($this->daemon->value, true)
|
||||
) :
|
||||
|
@ -287,12 +287,20 @@ class Newsletter extends Model {
|
||||
$orm = $orm
|
||||
->left_outer_join(
|
||||
MP_NEWSLETTER_OPTION_TABLE,
|
||||
array(MP_NEWSLETTERS_TABLE.'.id', '=',
|
||||
MP_NEWSLETTER_OPTION_TABLE.'.newsletter_id'))
|
||||
array(
|
||||
MP_NEWSLETTERS_TABLE.'.id',
|
||||
'=',
|
||||
MP_NEWSLETTER_OPTION_TABLE.'.newsletter_id'
|
||||
)
|
||||
)
|
||||
->left_outer_join(
|
||||
MP_NEWSLETTER_OPTION_FIELDS_TABLE,
|
||||
array(MP_NEWSLETTER_OPTION_FIELDS_TABLE.'.id','=',
|
||||
MP_NEWSLETTER_OPTION_TABLE.'.option_field_id'))
|
||||
array(
|
||||
MP_NEWSLETTER_OPTION_FIELDS_TABLE.'.id',
|
||||
'=',
|
||||
MP_NEWSLETTER_OPTION_TABLE.'.option_field_id'
|
||||
)
|
||||
)
|
||||
->group_by(MP_NEWSLETTERS_TABLE.'.id');
|
||||
return $orm;
|
||||
}
|
||||
|
@ -322,12 +322,20 @@ class Subscriber extends Model {
|
||||
$orm = $orm
|
||||
->leftOuterJoin(
|
||||
MP_SUBSCRIBER_CUSTOM_FIELD_TABLE,
|
||||
array(MP_SUBSCRIBERS_TABLE.'.id', '=',
|
||||
MP_SUBSCRIBER_CUSTOM_FIELD_TABLE.'.subscriber_id'))
|
||||
array(
|
||||
MP_SUBSCRIBERS_TABLE.'.id',
|
||||
'=',
|
||||
MP_SUBSCRIBER_CUSTOM_FIELD_TABLE.'.subscriber_id'
|
||||
)
|
||||
)
|
||||
->leftOuterJoin(
|
||||
MP_CUSTOM_FIELDS_TABLE,
|
||||
array(MP_CUSTOM_FIELDS_TABLE.'.id','=',
|
||||
MP_SUBSCRIBER_CUSTOM_FIELD_TABLE.'.custom_field_id'))
|
||||
array(
|
||||
MP_CUSTOM_FIELDS_TABLE.'.id',
|
||||
'=',
|
||||
MP_SUBSCRIBER_CUSTOM_FIELD_TABLE.'.custom_field_id'
|
||||
)
|
||||
)
|
||||
->groupBy(MP_SUBSCRIBERS_TABLE.'.id');
|
||||
return $orm;
|
||||
}
|
||||
@ -345,12 +353,18 @@ class Subscriber extends Model {
|
||||
$orm = $orm
|
||||
->leftOuterJoin(
|
||||
MP_SUBSCRIBER_CUSTOM_FIELD_TABLE,
|
||||
array(MP_SUBSCRIBERS_TABLE.'.id', '=',
|
||||
MP_SUBSCRIBER_CUSTOM_FIELD_TABLE.'.subscriber_id'))
|
||||
array(
|
||||
MP_SUBSCRIBERS_TABLE.'.id', '=',
|
||||
MP_SUBSCRIBER_CUSTOM_FIELD_TABLE.'.subscriber_id'
|
||||
)
|
||||
)
|
||||
->leftOuterJoin(
|
||||
MP_CUSTOM_FIELDS_TABLE,
|
||||
array(MP_CUSTOM_FIELDS_TABLE.'.id','=',
|
||||
MP_SUBSCRIBER_CUSTOM_FIELD_TABLE.'.custom_field_id'));
|
||||
array(
|
||||
MP_CUSTOM_FIELDS_TABLE.'.id','=',
|
||||
MP_SUBSCRIBER_CUSTOM_FIELD_TABLE.'.custom_field_id'
|
||||
)
|
||||
);
|
||||
return $orm;
|
||||
}
|
||||
|
||||
@ -532,7 +546,8 @@ class Subscriber extends Model {
|
||||
SubscriberSegment::subscribeManyToSegments(
|
||||
$subscriber_ids, array($segment->id)
|
||||
);
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
return array(
|
||||
'subscribers' => $subscribers_count,
|
||||
@ -653,8 +668,9 @@ class Subscriber extends Model {
|
||||
str_repeat(
|
||||
'(' . rtrim(str_repeat('?,', count($columns)), ',') . ')' . ', '
|
||||
, count($values)
|
||||
)
|
||||
, ', '),
|
||||
),
|
||||
', '
|
||||
),
|
||||
Helpers::flattenArray($values)
|
||||
);
|
||||
}
|
||||
|
@ -179,23 +179,25 @@ class Export {
|
||||
|
||||
function getSubscribers($offset, $limit) {
|
||||
// JOIN subscribers on segment and subscriber_segment tables
|
||||
$subscribers = Subscriber::
|
||||
left_outer_join(
|
||||
$subscribers = Subscriber::left_outer_join(
|
||||
SubscriberSegment::$_table,
|
||||
array(
|
||||
Subscriber::$_table . '.id',
|
||||
'=',
|
||||
SubscriberSegment::$_table . '.subscriber_id'
|
||||
))
|
||||
)
|
||||
)
|
||||
->left_outer_join(
|
||||
Segment::$_table,
|
||||
array(
|
||||
Segment::$_table . '.id',
|
||||
'=',
|
||||
SubscriberSegment::$_table . '.segment_id'
|
||||
))
|
||||
)
|
||||
)
|
||||
->filter('filterWithCustomFieldsForExport')
|
||||
->groupBy(Subscriber::$_table . '.id');
|
||||
|
||||
if($this->subscribers_without_segment !== false) {
|
||||
// if there are subscribers who do not belong to any segment, use
|
||||
// a CASE function to group them under "Not In Segment"
|
||||
|
@ -293,8 +293,7 @@ class Import {
|
||||
);
|
||||
}
|
||||
}
|
||||
$query = Subscriber::selectMany(
|
||||
array(
|
||||
$query = Subscriber::selectMany(array(
|
||||
'id',
|
||||
'email'
|
||||
));
|
||||
|
Reference in New Issue
Block a user