- Updates DB query for custom fields

- Updates models and tests for Subscribers and CustomFields
This commit is contained in:
Marco
2015-10-16 15:52:37 +02:00
committed by MrCasual
54 changed files with 3123 additions and 280 deletions

View File

@@ -8,10 +8,12 @@ class CustomField extends Model {
function __construct() {
parent::__construct();
$this->addValidations('name', array(
'required' => __('You need to specify a name.')
));
$this->addValidations('type', array(
'required' => __('You need to specify a type.')
));
}
function subscribers() {
@@ -20,6 +22,6 @@ class CustomField extends Model {
__NAMESPACE__ . '\SubscriberCustomField',
'custom_field_id',
'subscriber_id'
);
)->select_expr(MP_SUBSCRIBER_CUSTOM_FIELD_TABLE.'.value');
}
}