update items seen in DB when using API
This commit is contained in:
		
					parent
					
						
							
								bfec28f1fe
							
						
					
				
			
			
				commit
				
					
						7d8aee05ef
					
				
			
		
					 1 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -755,6 +755,15 @@
 | 
			
		|||
 | 
			
		||||
		$ret = api_format_items($r,$user_info);
 | 
			
		||||
 | 
			
		||||
		// We aren't going to try to figure out at the item, group, and page
 | 
			
		||||
		// level which items you've seen and which you haven't. If you're looking
 | 
			
		||||
		// at the network timeline just mark everything seen. 
 | 
			
		||||
	
 | 
			
		||||
		$r = q("UPDATE `item` SET `unseen` = 0 
 | 
			
		||||
			WHERE `unseen` = 1 AND `uid` = %d",
 | 
			
		||||
			intval($user_info['uid'])
 | 
			
		||||
		);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		$data = array('$statuses' => $ret);
 | 
			
		||||
		switch($type){
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue