fix bug in perserving states between ad downloads

This commit is contained in:
John Bintz 2009-07-01 08:16:03 -04:00
parent 06af670dbf
commit 8a4e7f9877
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}

View File

@ -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);
}