Commit Graph

55 Commits

Author SHA1 Message Date
Tautvidas Sipavičius
e13789b768 Fix "Static call to instance method" errors on Models
Paris uses magic methods to create model instance for static calls
2019-01-23 18:44:43 +02:00
Tautvidas Sipavičius
c09766a4df Add undocumented Model methods to PHPDoc to fix Premium rules 2019-01-23 16:36:17 +02:00
Tautvidas Sipavičius
9f13f68e39 Fix "Access to undefined property" rule violations 2019-01-23 11:33:47 +02:00
wxa
7b859660b7 End support for PHP 5.5 [MAILPOET-1317] 2018-10-31 15:21:34 +03:00
Pavel Dohnal
60ce501c20 Purge old logs
[MAILPOET-570]
2018-08-28 14:36:22 +02:00
Pavel Dohnal
99edc35b08 Handle bulk operations on subscribers filtered by dynamic segments
[PREMIUM-69]
2018-02-28 17:12:56 +00:00
Amine Ben hammou
b076e03a75 using static instead of self
renaming `internalCreateOrUpdate` to `_createOrUpdate`
renaming `$conditions` to `$keys`
adding block comment for `_createOrUpdate` method.
2018-02-12 11:15:46 +00:00
Amine Ben hammou
91622f8cd9 refactoring createOrUpdate method of models 2018-02-07 18:10:49 +00:00
Pavel Dohnal
8ff28fd974 Return error code for duplication errors
[PREMIUM-42]
2018-02-05 14:34:15 +00:00
Vlad
cf00813c7f Adds new method to validate model on request
Cleans up code formatting
2017-07-24 11:20:43 -04:00
mrcasual
5f74f34cba Adds notes explaining the fix 2017-07-17 12:15:39 -04:00
Vlad
a4dad46fb7 Adds asArray() method to the base Model that's used as proxy for
Idiorm's as_array()
2017-07-15 14:25:50 -04:00
stoletniy
a4282b6a3e Don't leak connection data in PDO exceptions [MAILPOET-966] 2017-06-30 09:29:48 +01:00
Vlad
d27968a215 Uses WP's is_email() to validate email addresses in Subscriber model 2017-06-04 18:19:37 -04:00
Alexey Stoletniy
bfc04bfa87 Fix bulk trashing/restoring not working for newsletters/forms on PHP 5.3 [MAILPOET-835] 2017-02-24 15:10:38 +03:00
Jonathan Labreuille
7fbf84db1f converted text domain to string instead of constant 2016-09-30 09:58:26 +02:00
Jonathan Labreuille
42202f676a updated Env::plugin_name to constant for text domain 2016-09-27 14:54:23 +02:00
Jonathan Labreuille
ba6198f956 added textdomain to __() calls 2016-09-27 14:53:44 +02:00
Jonathan Labreuille
4ebdff49e0 make Model::setTimestamp() public 2016-09-07 10:26:08 +02:00
Jonathan Labreuille
4a72995bf4 fix bulk actions and messages 2016-09-06 17:21:15 +02:00
Jonathan Labreuille
d93249f077 form & listing jsx update + Segment endpoint conversion 2016-09-05 11:51:58 +02:00
Vlad
42339927cf - Extends ORM's isNew() method to work on saved models 2016-08-22 09:26:25 -04:00
Tautvidas Sipavičius
0ac701eb20 Change line endings from DOS CRLF to Unix LF 2016-06-30 18:52:07 +03:00
Tautvidas Sipavičius
55d48df8a4 Fix indentation issues 2016-06-30 18:50:48 +03:00
Tautvidas Sipavičius
67661e3aad Remove useless constructors 2016-06-30 18:50:48 +03:00
Jonathan Labreuille
306cdeb68f Models unit tests update 2016-06-27 13:53:56 +02:00
Vlad
bc1fb235d3 - Removes unused method from the base model. Closes #511 2016-06-07 18:47:00 -04:00
Jonathan Labreuille
8292e9a744 Revert batch processing on bulk actions - too buggy
- minor fixes and cleanup
2016-05-27 14:15:46 +02:00
Jonathan Labreuille
3c46a5b434 Optimized Bulk actions
- Updated SQL schema for every created_at column so that it has a default value
- Updated unit tests based on recent changes (new methods in SubscriberSegment model)
- Added check for HelpScout initialization code so that it doesn't throw errors
2016-05-27 14:15:46 +02:00
Jonathan Labreuille
ceebb18bdf minor spacing fix 2016-05-27 14:14:35 +02:00
Jonathan Labreuille
d10a29598d prevent deletion of WP Users segment in Segments listing 2016-05-27 14:14:35 +02:00
Jonathan Labreuille
8c56c8da5e Fixed bulk actions (return false if no items were selected)
- added missing check for WPUsers segment in case it does not exist
2016-05-27 14:14:35 +02:00
Jonathan Labreuille
c4ddb38d18 Prevent WP users from being trashed/deleted
- return actual rowCount of affected rows for bulk actions (based on PDO last statement)
- prevent removal of WP Users segment relationship with subscribers.
2016-05-27 14:14:35 +02:00
Jonathan Labreuille
cf6466197a Fixed Subscribers' bulk actions when filtering by a segment
- filter by segment is now affected by the selected group (all, trash,...)
- updated relationship methods between subscribers & segments (to account for subsegment status)
2016-02-29 13:34:17 +01:00
Jonathan Labreuille
67036ddb61 cleanup and bugfix on bulk actions 2016-02-15 15:50:47 +01:00
Jonathan Labreuille
6c0f6a07cd removed useless constant 2016-02-15 15:40:21 +01:00
Jonathan Labreuille
8139a7dd0a Subscribers page review
- added screen option to set number of items per page
- improved bulk actions in order to handle large sets
2016-02-15 15:40:21 +01:00
mrcasual
841c69af59 Merge pull request #348 from mailpoet/page_reviews
Page reviews
2016-02-12 13:36:47 -05:00
Jonathan Labreuille
e60bc7c387 handle duplicates in model 2016-02-12 19:24:04 +01:00
Jonathan Labreuille
409697ee64 Sending queue router update
- cleaned up useless code
- bugfixes
- improved code coverage
2016-02-11 11:30:01 -05:00
Jonathan Labreuille
c2cb88f995 Unit tests fixed + models & routers update 2016-02-04 11:41:05 +01:00
Jonathan Labreuille
12c9623e2f Better Error handling for models
- added (array)getErrors() to models, returns false if no errors
- converted Forms::saveEditor method to use getErrors
- added error handling on the form editor view
2016-02-03 12:23:42 +01:00
Jonathan Labreuille
a2ef62302f More Unit Tests + Initializer fix
- added unit test for Router\Forms
- updated unit test for Model\Segment to reflect changes
2016-02-02 17:22:11 +01:00
Jonathan Labreuille
e9110680ee Listings
- fixed selection field JSX
- fixed bulk actions (added filter function)
- added getPublished/getTrashed static methods on Model
- fixed step 3 of newsletter process
- updated save/get methods of all listing-able models to conform with the new norm
2015-11-09 13:26:33 +01:00
Jonathan Labreuille
a4cf2f9c76 Major refactoring of listing/router/model relation
- updated Subscribers listing
- udpated Segments listing
- added Forms router
2015-10-29 15:30:24 +01:00
Jonathan Labreuille
103da61d45 basic listing files 2015-10-28 13:19:48 +01:00
Jonathan Labreuille
89b04e8691 Subscriber & Segment listings
- fixed filters
- added load/save state from url
- added goBack on forms in order to get back listing states
wx# Please enter the commit message for your changes. Lines starting
2015-10-27 16:24:00 +01:00
MrCasual
e583db6f56 - Adds global filter to search custom fields
- Updates tests
2015-10-19 20:31:04 -04:00
MrCasual
e8abc4cb47 - Model returns validation errors upon save (Closes #122)
- Fixed acceptance test for Newsletters (Closes #126)
2015-09-13 19:40:42 -04:00
marco
e386c3aa38 Cleanup tests. 2015-08-20 00:21:10 +02:00