fix minors issues
This commit is contained in:
@ -11,7 +11,7 @@ use MailPoet\WP\Hooks;
|
||||
*/
|
||||
class DynamicSubscribersGetter extends SubscribersGetter {
|
||||
|
||||
protected $segment_index;
|
||||
protected $segment_index = 0;
|
||||
|
||||
public function reset() {
|
||||
parent::reset();
|
||||
@ -40,7 +40,7 @@ class DynamicSubscribersGetter extends SubscribersGetter {
|
||||
->selectMany(array(
|
||||
'list_status' => Subscriber::$_table . '.status'
|
||||
))
|
||||
->selectExpr("'{$name}' AS segment_name")
|
||||
->selectExpr("'". $name . "' AS segment_name")
|
||||
->offset($this->offset)
|
||||
->limit($this->batch_size)
|
||||
->findArray();
|
||||
|
@ -97,6 +97,7 @@ class Export {
|
||||
)
|
||||
) . PHP_EOL
|
||||
);
|
||||
|
||||
$subscribers = $this->getSubscribers();
|
||||
while($subscribers !== false) {
|
||||
$processed_subscribers += count($subscribers);
|
||||
|
@ -17,11 +17,11 @@ class ImportExportFactory {
|
||||
$this->action = $action;
|
||||
}
|
||||
|
||||
function getSegments($with_confirmed_subscribers = false) {
|
||||
function getSegments() {
|
||||
if($this->action === self::IMPORT_ACTION) {
|
||||
$segments = Segment::getSegmentsForImport();
|
||||
} else {
|
||||
$segments = Segment::getSegmentsForExport($with_confirmed_subscribers);
|
||||
$segments = Segment::getSegmentsForExport();
|
||||
$segments = Hooks::applyFilters('mailpoet_segments_with_subscriber_count', $segments);
|
||||
$segments = array_values(array_filter($segments, function($segment) {
|
||||
return $segment['subscribers'] > 0;
|
||||
|
Reference in New Issue
Block a user