diff --git a/classes/PWAdboxesClient.php b/classes/PWAdboxesClient.php index d2dab11..cdb4fa8 100644 --- a/classes/PWAdboxesClient.php +++ b/classes/PWAdboxesClient.php @@ -85,7 +85,7 @@ class PWAdboxesClient { if ($ads->is_valid) { $mappings = array(); - if (is_array($results = $wpdb->get_results("SELECT adboxid, template_tag_id, in_rss_feed, center_widget FROM {$this->table_name}"))) { + if (is_array($results = $wpdb->get_results("SELECT adboxid, template_tag_id, in_rss_feed FROM {$this->table_name}"))) { foreach ($results as $result) { $mappings[$result->adboxid] = $result; } @@ -139,7 +139,7 @@ class PWAdboxesClient { $ads->memberid = $member_id; $ads->adboxes = $results; $ads->is_valid = true; - + return $ads; } diff --git a/test/PWAdboxesClientTest.php b/test/PWAdboxesClientTest.php index 1e1686b..b545ed0 100644 --- a/test/PWAdboxesClientTest.php +++ b/test/PWAdboxesClientTest.php @@ -52,7 +52,7 @@ class PWAdboxesClientTest extends PHPUnit_Framework_TestCase { $wpdb->expects($this->exactly(13))->method('escape'); $wpdb->expects($this->exactly(2))->method('query')->will($this->returnCallback(array($this, 'postAdsCallback'))); - $wpdb->expects($this->exactly(1))->method('get_results')->will($this->returnValue(array()))->with("SELECT adboxid, template_tag_id, in_rss_feed, center_widget FROM {$this->database_client->table_name}"); + $wpdb->expects($this->exactly(1))->method('get_results')->will($this->returnValue(array()))->with("SELECT adboxid, template_tag_id, in_rss_feed FROM {$this->database_client->table_name}"); $this->database_client->post_ads($ads, PW_ADBOXES_PROJECT_WONDERFUL); }