Differences From Artifact [2a2ce5bc9f]:
- File src/cgi.c — part of check-in [c720327afe] at 2018-09-26 14:04:10 on branch trunk — Enable the chronological forum display for all users able to read the forum. Make chronological the default display mode for mobile devices, as determined by the user-agent string. (user: drh size: 62704)
To Artifact [b1b3215c66]:
- File src/cgi.c — part of check-in [b76eebea87] at 2018-09-27 02:17:25 on branch trunk — Guess that agents with "iPad" in their name do not want the narrow screen versions of the page. (user: drh size: 62759) [more...]
| ︙ | |||
2075 2076 2077 2078 2079 2080 2081 2082 2083 | 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 | + |
** mobile device.
**
** The returned value is a guess. Use it only for setting up defaults.
*/
int cgi_from_mobile(void){
const char *zAgent = P("HTTP_USER_AGENT");
if( zAgent==0 ) return 0;
if( sqlite3_strglob("*iPad*", zAgent)==0 ) return 0;
return sqlite3_strlike("%mobile%", zAgent, 0)==0;
}
|