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