| @@ -5,49 +5,8 @@ | ||
| 5 | 5 | |
| 6 | 6 | class FrmDb { |
| 7 | 7 | |
| 8 | 8 | /** |
| 9 | - * The table name for Formidable Fields. | |
| 10 | - * | |
| 11 | - * @var string | |
| 12 | - */ | |
| 13 | - public $fields; | |
| 14 | - | |
| 15 | - /** | |
| 16 | - * The table name for Formidable Forms. | |
| 17 | - * | |
| 18 | - * @var string | |
| 19 | - */ | |
| 20 | - public $forms; | |
| 21 | - | |
| 22 | - /** | |
| 23 | - * The table name for Formidable Entries. | |
| 24 | - * | |
| 25 | - * @var string | |
| 26 | - */ | |
| 27 | - public $entries; | |
| 28 | - | |
| 29 | - /** | |
| 30 | - * The table name for Formidable Entry Metas. | |
| 31 | - * | |
| 32 | - * @var string | |
| 33 | - */ | |
| 34 | - public $entry_metas; | |
| 35 | - | |
| 36 | - public function __construct() { | |
| 37 | - if ( ! defined( 'ABSPATH' ) ) { | |
| 38 | - die( 'You are not allowed to call this page directly.' ); | |
| 39 | - } | |
| 40 | - | |
| 41 | - _deprecated_function( __METHOD__, '2.05.06', 'FrmMigrate' ); | |
| 42 | - global $wpdb; | |
| 43 | - $this->fields = $wpdb->prefix . 'frm_fields'; | |
| 44 | - $this->forms = $wpdb->prefix . 'frm_forms'; | |
| 45 | - $this->entries = $wpdb->prefix . 'frm_items'; | |
| 46 | - $this->entry_metas = $wpdb->prefix . 'frm_item_metas'; | |
| 47 | - } | |
| 48 | - | |
| 49 | - /** | |
| 50 | 9 | * Change array into format $wpdb->prepare can use |
| 51 | 10 | * |
| 52 | 11 | * @param array $args |
| 53 | 12 | * @param string $starts_with |
| @@ -772,12 +731,14 @@ | ||
| 772 | 731 | * |
| 773 | 732 | * @return void |
| 774 | 733 | */ |
| 775 | 734 | public static function set_cache( $cache_key, $results, $group = '', $time = 300 ) { |
| 776 | - if ( ! FrmAppHelper::prevent_caching() ) { | |
| 777 | - self::add_key_to_group_cache( $cache_key, $group ); | |
| 778 | - wp_cache_set( $cache_key, $results, $group, $time ); | |
| 735 | + if ( FrmAppHelper::prevent_caching() ) { | |
| 736 | + return; | |
| 779 | 737 | } |
| 738 | + | |
| 739 | + self::add_key_to_group_cache( $cache_key, $group ); | |
| 740 | + wp_cache_set( $cache_key, $results, $group, $time ); | |
| 780 | 741 | } |
| 781 | 742 | |
| 782 | 743 | /** |
| 783 | 744 | * Keep track of the keys cached in each group so they can be deleted |