1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-02-10 13:41:33 +00:00

automatically redirect to mobile/ using Mobile_Detect class

This commit is contained in:
Andrew Dolgov
2012-06-28 23:14:08 +04:00
parent eab6e8fb61
commit 955d4f82ea
2 changed files with 228 additions and 0 deletions

View File

@@ -14,6 +14,14 @@
require_once "version.php";
require_once "config.php";
require_once "db-prefs.php";
require_once "lib/Mobile_Detect.php";
$mobile = new Mobile_Detect();
if ($mobile->isMobile() && !$mobile->isTablet() && !$_REQUEST['mobile']) {
header('Location: mobile/index.php');
exit;
}
$link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);