Add an automatic redirect if we're coming from an OPDS reader.
For information the user agent of Moon+ Reader is : Stanza iPhone/Aldiko/Moon+ Reader(Android) That's really bad !
This commit is contained in:
		
							parent
							
								
									02c25705cf
								
							
						
					
					
						commit
						15e8372f04
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -15,6 +15,11 @@
 | 
			
		|||
    require_once ("customcolumn.php");
 | 
			
		||||
    require_once ("book.php");
 | 
			
		||||
    
 | 
			
		||||
    // If we detect that an OPDS reader try to connect try to redirect to feed.php
 | 
			
		||||
    if (preg_match("/(MantanoReader|FBReader|Stanza|Aldiko|Moon+ Reader)/", $_SERVER['HTTP_USER_AGENT'])) {
 | 
			
		||||
        header("location: feed.php");
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    header ("Content-Type:application/xhtml+xml");
 | 
			
		||||
    $page = getURLParam ("page", Base::PAGE_INDEX);
 | 
			
		||||
    $query = getURLParam ("query");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue