Plugin Directory

Changeset 1536495


Ignore:
Timestamp:
11/18/2016 06:52:33 PM (9 years ago)
Author:
seorets
Message:

Added $wpdb reference to inclusion methods for main class

Location:
seo-rets/branches/3.3.72
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • seo-rets/branches/3.3.72/methods/includes/favorites/display.php

    r1536471 r1536495  
    7979</div>
    8080<?php
    81 $sql = "SELECT * FROM wp_sr_favorites WHERE user_id = " . $index;
     81$sql = "SELECT * FROM {$wpdb->prefix}sr_favorites WHERE user_id = " . $index;
    8282$res = SEO_RETS_Plugin::wpdbSelectResults($sql);
    8383$sr = $this;
  • seo-rets/branches/3.3.72/methods/includes/savesearch/display.php

    r1536471 r1536495  
    8080
    8181    <?php
    82     $sql = "SELECT * FROM wp_sr_savesearch WHERE user_id = " . $index;
     82    $sql = "SELECT * FROM {$wpdb->prefix}sr_savesearch WHERE user_id = " . $index;
    8383    $res = SEO_RETS_Plugin::wpdbSelectResults($sql);
    8484
  • seo-rets/branches/3.3.72/methods/subscribe.php

    r1536471 r1536495  
    5353        date_default_timezone_set("US/Central");
    5454
    55         $sql_getListings = "SELECT * FROM wp_sr_stat_mls WHERE mls=" . $_GET['mls'];
     55        $sql_getListings = "SELECT * FROM {$wpdb->prefix}sr_stat_mls WHERE mls=" . $_GET['mls'];
    5656        $res_getListings = $this->wpdbSelectResults($sql_getListings);
    5757        $ar = $res_getListings[0];
  • seo-rets/branches/3.3.72/seo-rets.php

    r1536471 r1536495  
    21892189    {
    21902190        global $wpdb;
    2191         $wpdb->query("DELETE FROM `wp_options` where `option_name` LIKE '_transient_timeout_sr%' OR `option_name` LIKE '_transient_sr%';");
     2191        $wpdb->query("DELETE FROM `{$wpdb->prefix}options` where `option_name` LIKE '_transient_timeout_sr%' OR `option_name` LIKE '_transient_sr%';");
    21922192        $this->make_nonce();
    21932193
     
    24282428
    24292429        $seo_rets_plugin = $this;
    2430         global $wp_query;
     2430        global $wp_query,$wpdb;
    24312431        ob_start();
    24322432        $i = include("{$this->server_plugin_dir}/{$loc}");
  • seo-rets/branches/3.3.72/templates/listing.php

    r1536471 r1536495  
    245245        $users = get_option('sr_users');
    246246
    247         $sql_getListings = "SELECT * FROM wp_sr_stat_mls WHERE mls=" . $l->mls_id;
     247        $sql_getListings = "SELECT * FROM {$wpdb->prefix}sr_stat_mls WHERE mls=" . $l->mls_id;
    248248        $res_getListings = $sr->wpdbSelectResults($sql_getListings);
    249249        if (empty($res_getListings)) {
     
    253253                'mtype' => $type
    254254            );
    255             $lastId = $sr->wpdbInsertRow('wp_sr_stat_mls', $stat);
     255            $lastId = $sr->wpdbInsertRow($wpdb->prefix . 'sr_stat_mls', $stat);
     256            $sessionId = $sr->wpdbInsertRow($wpdb->prefix . 'sr_stat_sessions', $stat);
    256257        }
    257258        $ar = $res_getListings[0];
     
    262263            'time' => date("Y-m-d H:i:s")
    263264        );
    264         $sr->wpdbInsertRow('wp_sr_stat_option', $statOptAdd);
     265        $sr->wpdbInsertRow($wpdb->prefix . 'sr_stat_option', $statOptAdd);
    265266//        if ($index !== false) {
    266267//            $users[$index]['favorites'];
Note: See TracChangeset for help on using the changeset viewer.