Also checking rating permissions
This commit is contained in:
		
							parent
							
								
									5aa2f823d8
								
							
						
					
					
						commit
						fe84c8d9dd
					
				| @ -106,7 +106,7 @@ class Ratings extends Extension { | |||||||
| 		} | 		} | ||||||
| 		if(preg_match("/^rating=(?:([sqeu]+)|(safe|questionable|explicit|unknown))$/D", strtolower($event->term), $matches)) { | 		if(preg_match("/^rating=(?:([sqeu]+)|(safe|questionable|explicit|unknown))$/D", strtolower($event->term), $matches)) { | ||||||
| 			$ratings = $matches[1] ? $matches[1] : array($matches[2][0]); | 			$ratings = $matches[1] ? $matches[1] : array($matches[2][0]); | ||||||
| 			$ratings = array_intersect($ratings, str_split(Ratings::get_user_privs($user))); | 			$ratings = array_intersect(str_split($ratings), str_split(Ratings::get_user_privs($user))); | ||||||
| 			$set = "'" . join("', '", $ratings) . "'"; | 			$set = "'" . join("', '", $ratings) . "'"; | ||||||
| 			$event->add_querylet(new Querylet("rating IN ($set)")); | 			$event->add_querylet(new Querylet("rating IN ($set)")); | ||||||
| 		} | 		} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user