diff options
Diffstat (limited to 'Classes/SourcesEditViewController.m')
| -rw-r--r-- | Classes/SourcesEditViewController.m | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/Classes/SourcesEditViewController.m b/Classes/SourcesEditViewController.m index 7c7bf7b..857dbb0 100644 --- a/Classes/SourcesEditViewController.m +++ b/Classes/SourcesEditViewController.m @@ -75,7 +75,7 @@  - (void) loadSourcesFromDb {  	[db open]; -	FMResultSet *result = [db executeQuery:@"SELECT * FROM subscribedSources"]; +	FMResultSet *result = [db executeQuery:@"SELECT * FROM sources"];  	while ([result next]) {  		Source *source = [Source initFromDatabaseRow:result];  		[sectionDictionary appendObject:source forKey:source.category];		 @@ -131,7 +131,7 @@  	[db open];	  	for (NSDictionary *obj in array) {  		//NSLog(@"foreign key: %d", [obj objectForKey:@"id"]); -		FMResultSet *result = [db executeQuery:@"SELECT * FROM subscribedSources WHERE foreignId = ?", [obj objectForKey:@"id"]]; +		FMResultSet *result = [db executeQuery:@"SELECT * FROM sources WHERE foreignId = ?", [obj objectForKey:@"id"]];  		if (![result next]) {	  			//NSLog(@"found source");  			Source *source = [Source initWithJsonObject:obj]; @@ -264,7 +264,7 @@  	[db open];  	[db beginTransaction]; -	[db executeUpdate:@"UPDATE subscribedSources SET subscribed = ? WHERE foreignId = ?", [NSNumber numberWithInt:(switcher.on ? 1 : 0)], foreignId]; +	[db executeUpdate:@"UPDATE sources SET subscribed = ? WHERE foreignId = ?", [NSNumber numberWithInt:(switcher.on ? 1 : 0)], foreignId];  	[db commit];  	[db close];  } | 
