Remove useless constructors
This commit is contained in:
@ -5,8 +5,4 @@ if(!defined('ABSPATH')) exit;
|
|||||||
|
|
||||||
class NewsletterLink extends Model {
|
class NewsletterLink extends Model {
|
||||||
public static $_table = MP_NEWSLETTER_LINKS_TABLE;
|
public static $_table = MP_NEWSLETTER_LINKS_TABLE;
|
||||||
|
|
||||||
function __construct() {
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,4 @@ if(!defined('ABSPATH')) exit;
|
|||||||
|
|
||||||
class NewsletterOption extends Model {
|
class NewsletterOption extends Model {
|
||||||
public static $_table = MP_NEWSLETTER_OPTION_TABLE;
|
public static $_table = MP_NEWSLETTER_OPTION_TABLE;
|
||||||
|
|
||||||
function __construct() {
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,4 @@ if(!defined('ABSPATH')) exit;
|
|||||||
|
|
||||||
class NewsletterPost extends Model {
|
class NewsletterPost extends Model {
|
||||||
public static $_table = MP_NEWSLETTER_POSTS_TABLE;
|
public static $_table = MP_NEWSLETTER_POSTS_TABLE;
|
||||||
|
|
||||||
function __construct() {
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,4 @@ if(!defined('ABSPATH')) exit;
|
|||||||
|
|
||||||
class NewsletterSegment extends Model {
|
class NewsletterSegment extends Model {
|
||||||
public static $_table = MP_NEWSLETTER_SEGMENT_TABLE;
|
public static $_table = MP_NEWSLETTER_SEGMENT_TABLE;
|
||||||
|
|
||||||
function __construct() {
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -10,10 +10,6 @@ class SendingQueue extends Model {
|
|||||||
const STATUS_SCHEDULED = 'scheduled';
|
const STATUS_SCHEDULED = 'scheduled';
|
||||||
const STATUS_PAUSED = 'paused';
|
const STATUS_PAUSED = 'paused';
|
||||||
|
|
||||||
function __construct() {
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
function pause() {
|
function pause() {
|
||||||
if($this->count_processed === $this->count_total) {
|
if($this->count_processed === $this->count_total) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -5,8 +5,4 @@ if(!defined('ABSPATH')) exit;
|
|||||||
|
|
||||||
class StatisticsClicks extends Model {
|
class StatisticsClicks extends Model {
|
||||||
public static $_table = MP_STATISTICS_CLICKS_TABLE;
|
public static $_table = MP_STATISTICS_CLICKS_TABLE;
|
||||||
|
|
||||||
function __construct() {
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -6,10 +6,6 @@ if(!defined('ABSPATH')) exit;
|
|||||||
class StatisticsForms extends Model {
|
class StatisticsForms extends Model {
|
||||||
public static $_table = MP_STATISTICS_FORMS_TABLE;
|
public static $_table = MP_STATISTICS_FORMS_TABLE;
|
||||||
|
|
||||||
function __construct() {
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function record($form_id, $subscriber_id) {
|
public static function record($form_id, $subscriber_id) {
|
||||||
if($form_id > 0 && $subscriber_id > 0) {
|
if($form_id > 0 && $subscriber_id > 0) {
|
||||||
// check if we already have a record for today
|
// check if we already have a record for today
|
||||||
|
@ -6,10 +6,6 @@ if(!defined('ABSPATH')) exit;
|
|||||||
class StatisticsNewsletters extends Model {
|
class StatisticsNewsletters extends Model {
|
||||||
public static $_table = MP_STATISTICS_NEWSLETTERS_TABLE;
|
public static $_table = MP_STATISTICS_NEWSLETTERS_TABLE;
|
||||||
|
|
||||||
function __construct() {
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
static function createMultiple(array $data) {
|
static function createMultiple(array $data) {
|
||||||
$values = array();
|
$values = array();
|
||||||
foreach($data as $value) {
|
foreach($data as $value) {
|
||||||
|
@ -5,8 +5,4 @@ if(!defined('ABSPATH')) exit;
|
|||||||
|
|
||||||
class StatisticsOpens extends Model {
|
class StatisticsOpens extends Model {
|
||||||
public static $_table = MP_STATISTICS_OPENS_TABLE;
|
public static $_table = MP_STATISTICS_OPENS_TABLE;
|
||||||
|
|
||||||
function __construct() {
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -5,8 +5,4 @@ if(!defined('ABSPATH')) exit;
|
|||||||
|
|
||||||
class StatisticsUnsubscribes extends Model {
|
class StatisticsUnsubscribes extends Model {
|
||||||
public static $_table = MP_STATISTICS_UNSUBSCRIBES_TABLE;
|
public static $_table = MP_STATISTICS_UNSUBSCRIBES_TABLE;
|
||||||
|
|
||||||
function __construct() {
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -8,10 +8,6 @@ if(!defined('ABSPATH')) exit;
|
|||||||
class SubscriberCustomField extends Model {
|
class SubscriberCustomField extends Model {
|
||||||
public static $_table = MP_SUBSCRIBER_CUSTOM_FIELD_TABLE;
|
public static $_table = MP_SUBSCRIBER_CUSTOM_FIELD_TABLE;
|
||||||
|
|
||||||
function __construct() {
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
static function createOrUpdate($data = array()) {
|
static function createOrUpdate($data = array()) {
|
||||||
$custom_field = CustomField::findOne($data['custom_field_id']);
|
$custom_field = CustomField::findOne($data['custom_field_id']);
|
||||||
if($custom_field === false) {
|
if($custom_field === false) {
|
||||||
|
@ -8,10 +8,6 @@ if(!defined('ABSPATH')) exit;
|
|||||||
class SubscriberSegment extends Model {
|
class SubscriberSegment extends Model {
|
||||||
public static $_table = MP_SUBSCRIBER_SEGMENT_TABLE;
|
public static $_table = MP_SUBSCRIBER_SEGMENT_TABLE;
|
||||||
|
|
||||||
function __construct() {
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
function subscriber() {
|
function subscriber() {
|
||||||
return $this->has_one(__NAMESPACE__.'\Subscriber', 'id', 'subscriber_id');
|
return $this->has_one(__NAMESPACE__.'\Subscriber', 'id', 'subscriber_id');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user