Fossil SCM
Guess that agents with "iPad" in their name do not want the narrow screen versions of the page.
Commit
b76eebea8793b3b2fd9f507485674122c3ff5a49f7d0915f367f47932af23764
Parent
e11d39171118838…
1 file changed
+1
+1
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -2077,7 +2077,8 @@ | ||
| 2077 | 2077 | ** The returned value is a guess. Use it only for setting up defaults. |
| 2078 | 2078 | */ |
| 2079 | 2079 | int cgi_from_mobile(void){ |
| 2080 | 2080 | const char *zAgent = P("HTTP_USER_AGENT"); |
| 2081 | 2081 | if( zAgent==0 ) return 0; |
| 2082 | + if( sqlite3_strglob("*iPad*", zAgent)==0 ) return 0; | |
| 2082 | 2083 | return sqlite3_strlike("%mobile%", zAgent, 0)==0; |
| 2083 | 2084 | } |
| 2084 | 2085 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -2077,7 +2077,8 @@ | |
| 2077 | ** The returned value is a guess. Use it only for setting up defaults. |
| 2078 | */ |
| 2079 | int cgi_from_mobile(void){ |
| 2080 | const char *zAgent = P("HTTP_USER_AGENT"); |
| 2081 | if( zAgent==0 ) return 0; |
| 2082 | return sqlite3_strlike("%mobile%", zAgent, 0)==0; |
| 2083 | } |
| 2084 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -2077,7 +2077,8 @@ | |
| 2077 | ** The returned value is a guess. Use it only for setting up defaults. |
| 2078 | */ |
| 2079 | int cgi_from_mobile(void){ |
| 2080 | const char *zAgent = P("HTTP_USER_AGENT"); |
| 2081 | if( zAgent==0 ) return 0; |
| 2082 | if( sqlite3_strglob("*iPad*", zAgent)==0 ) return 0; |
| 2083 | return sqlite3_strlike("%mobile%", zAgent, 0)==0; |
| 2084 | } |
| 2085 |