fixes
This commit is contained in:
		
							parent
							
								
									057ccd65c3
								
							
						
					
					
						commit
						fb2fe58b57
					
				| @ -47,7 +47,7 @@ class ActorColumn extends Column | |||||||
|         $driver = $this->table->db->getAttribute(\PDO::ATTR_DRIVER_NAME); |         $driver = $this->table->db->getAttribute(\PDO::ATTR_DRIVER_NAME); | ||||||
|         switch ($driver) { |         switch ($driver) { | ||||||
|             case "pgsql": |             case "pgsql": | ||||||
|                 return "((username = :{$this->name}_0) OR (address && inet :{$this->name}_1))"; |                 return "((username = :{$this->name}_0) OR (address && cast(:{$this->name}_1 as inet)))"; | ||||||
|             default: |             default: | ||||||
|                 return "((username = :{$this->name}_0) OR (address = :{$this->name}_1))"; |                 return "((username = :{$this->name}_0) OR (address = :{$this->name}_1))"; | ||||||
|         } |         } | ||||||
| @ -79,11 +79,7 @@ class ActorColumn extends Column | |||||||
|             $un = null; |             $un = null; | ||||||
|         } |         } | ||||||
|         if (empty($ip)) { |         if (empty($ip)) { | ||||||
|             $driver = $this->table->db->getAttribute(\PDO::ATTR_DRIVER_NAME); |             $ip = null; | ||||||
|             switch ($driver) { |  | ||||||
|                 case "pgsql": $ip = "0.0.0.0/0"; break; |  | ||||||
|                 default: $ip = null; break; |  | ||||||
|             } |  | ||||||
|         } |         } | ||||||
|         return [$un, $ip]; |         return [$un, $ip]; | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -116,9 +116,8 @@ class NotATag extends Extension | |||||||
|                     $input = validate_input(["d_tag"=>"string"]); |                     $input = validate_input(["d_tag"=>"string"]); | ||||||
|                     $database->execute( |                     $database->execute( | ||||||
|                         $database->scoreql_to_sql( |                         $database->scoreql_to_sql( | ||||||
| 							"DELETE FROM untags WHERE LOWER(tag) = LOWER(:tag)" |                             "DELETE FROM untags WHERE LOWER(tag) = LOWER(:tag)" | ||||||
| 						), |                         ), | ||||||
| 
 |  | ||||||
|                         ["tag"=>$input['d_tag']] |                         ["tag"=>$input['d_tag']] | ||||||
|                     ); |                     ); | ||||||
|                     $page->flash("Image ban removed"); |                     $page->flash("Image ban removed"); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user