DataInconsistency
2 weeks ago
License
2 months ago
Notices
2 months ago
pQuery
2 months ago
APIPermissionHelper.php
1 year ago
CdnAssetUrl.php
3 years ago
ConflictResolver.php
1 month ago
Cookies.php
2 months ago
DBCollationChecker.php
2 months ago
DOM.php
2 years ago
DateConverter.php
3 years ago
FreeDomains.php
3 years ago
Headers.php
1 year ago
Helpers.php
1 month ago
Installation.php
1 year ago
LegacyDatabase.php
1 year ago
Request.php
2 months ago
SecondLevelDomainNames.php
3 years ago
Security.php
2 months ago
ThirdPartyOutput.php
1 month ago
Url.php
2 months ago
index.php
3 years ago
LegacyDatabase.php
85 lines
| 1 | <?php declare(strict_types = 1); |
| 2 | |
| 3 | namespace MailPoet\Util; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | use MailPoet\Config\Env; |
| 9 | |
| 10 | /** |
| 11 | * These constants for table names were used with the idiorm ORM library that we removed. |
| 12 | * They are kept here for sometime for back compatibility with extensions that may still use them. |
| 13 | * |
| 14 | * PHP doesn't have a built-in support for deprecation of constants defined with define() function. |
| 15 | * But some IDEs like PHPStorm can recognize the @deprecated annotation and show warnings. |
| 16 | * |
| 17 | * We will remove them after January 2025. |
| 18 | */ |
| 19 | class LegacyDatabase { |
| 20 | public static function defineTableConstants() { |
| 21 | if (!defined('MP_SETTINGS_TABLE')) { |
| 22 | /** @deprecated */ |
| 23 | define('MP_SETTINGS_TABLE', Env::$dbPrefix . 'settings'); |
| 24 | /** @deprecated */ |
| 25 | define('MP_SEGMENTS_TABLE', Env::$dbPrefix . 'segments'); |
| 26 | /** @deprecated */ |
| 27 | define('MP_FORMS_TABLE', Env::$dbPrefix . 'forms'); |
| 28 | /** @deprecated */ |
| 29 | define('MP_CUSTOM_FIELDS_TABLE', Env::$dbPrefix . 'custom_fields'); |
| 30 | /** @deprecated */ |
| 31 | define('MP_SUBSCRIBERS_TABLE', Env::$dbPrefix . 'subscribers'); |
| 32 | /** @deprecated */ |
| 33 | define('MP_SUBSCRIBER_SEGMENT_TABLE', Env::$dbPrefix . 'subscriber_segment'); |
| 34 | /** @deprecated */ |
| 35 | define('MP_SUBSCRIBER_CUSTOM_FIELD_TABLE', Env::$dbPrefix . 'subscriber_custom_field'); |
| 36 | /** @deprecated */ |
| 37 | define('MP_SUBSCRIBER_IPS_TABLE', Env::$dbPrefix . 'subscriber_ips'); |
| 38 | /** @deprecated */ |
| 39 | define('MP_NEWSLETTER_SEGMENT_TABLE', Env::$dbPrefix . 'newsletter_segment'); |
| 40 | /** @deprecated */ |
| 41 | define('MP_SCHEDULED_TASKS_TABLE', Env::$dbPrefix . 'scheduled_tasks'); |
| 42 | /** @deprecated */ |
| 43 | define('MP_SCHEDULED_TASK_SUBSCRIBERS_TABLE', Env::$dbPrefix . 'scheduled_task_subscribers'); |
| 44 | /** @deprecated */ |
| 45 | define('MP_SENDING_QUEUES_TABLE', Env::$dbPrefix . 'sending_queues'); |
| 46 | /** @deprecated */ |
| 47 | define('MP_NEWSLETTERS_TABLE', Env::$dbPrefix . 'newsletters'); |
| 48 | /** @deprecated */ |
| 49 | define('MP_NEWSLETTER_TEMPLATES_TABLE', Env::$dbPrefix . 'newsletter_templates'); |
| 50 | /** @deprecated */ |
| 51 | define('MP_NEWSLETTER_OPTION_FIELDS_TABLE', Env::$dbPrefix . 'newsletter_option_fields'); |
| 52 | /** @deprecated */ |
| 53 | define('MP_NEWSLETTER_OPTION_TABLE', Env::$dbPrefix . 'newsletter_option'); |
| 54 | /** @deprecated */ |
| 55 | define('MP_NEWSLETTER_LINKS_TABLE', Env::$dbPrefix . 'newsletter_links'); |
| 56 | /** @deprecated */ |
| 57 | define('MP_NEWSLETTER_POSTS_TABLE', Env::$dbPrefix . 'newsletter_posts'); |
| 58 | /** @deprecated */ |
| 59 | define('MP_STATISTICS_NEWSLETTERS_TABLE', Env::$dbPrefix . 'statistics_newsletters'); |
| 60 | /** @deprecated */ |
| 61 | define('MP_STATISTICS_CLICKS_TABLE', Env::$dbPrefix . 'statistics_clicks'); |
| 62 | /** @deprecated */ |
| 63 | define('MP_STATISTICS_OPENS_TABLE', Env::$dbPrefix . 'statistics_opens'); |
| 64 | /** @deprecated */ |
| 65 | define('MP_STATISTICS_UNSUBSCRIBES_TABLE', Env::$dbPrefix . 'statistics_unsubscribes'); |
| 66 | /** @deprecated */ |
| 67 | define('MP_STATISTICS_FORMS_TABLE', Env::$dbPrefix . 'statistics_forms'); |
| 68 | /** @deprecated */ |
| 69 | define('MP_STATISTICS_WOOCOMMERCE_PURCHASES_TABLE', Env::$dbPrefix . 'statistics_woocommerce_purchases'); |
| 70 | /** @deprecated */ |
| 71 | define('MP_MAPPING_TO_EXTERNAL_ENTITIES_TABLE', Env::$dbPrefix . 'mapping_to_external_entities'); |
| 72 | /** @deprecated */ |
| 73 | define('MP_LOG_TABLE', Env::$dbPrefix . 'log'); |
| 74 | /** @deprecated */ |
| 75 | define('MP_STATS_NOTIFICATIONS_TABLE', Env::$dbPrefix . 'stats_notifications'); |
| 76 | /** @deprecated */ |
| 77 | define('MP_USER_FLAGS_TABLE', Env::$dbPrefix . 'user_flags'); |
| 78 | /** @deprecated */ |
| 79 | define('MP_FEATURE_FLAGS_TABLE', Env::$dbPrefix . 'feature_flags'); |
| 80 | /** @deprecated */ |
| 81 | define('MP_DYNAMIC_SEGMENTS_FILTERS_TABLE', Env::$dbPrefix . 'dynamic_segment_filters'); |
| 82 | } |
| 83 | } |
| 84 | } |
| 85 |