# HG changeset patch # User Matti Hamalainen # Date 1409161246 -10800 # Node ID 657b0b7bf409c536df71e17914484862d416cf74 # Parent 48c3012c89d7f4ca94a91375f7979a0d59f20ebf More merging with mobile version. diff -r 48c3012c89d7 -r 657b0b7bf409 index.php --- a/index.php Wed Aug 27 20:34:35 2014 +0300 +++ b/index.php Wed Aug 27 20:40:46 2014 +0300 @@ -6,14 +6,14 @@ // // Include framework require "mcommon.inc.php"; -$pageVersion = "2.3"; // Default settings +$pageVersion = "2.3"; +$mobileMode = FALSE; $baseURI = "http://example.com/"; $pageLanguages = array("fi", "en"); $pageCSSData = array("cookie" => "lukcss", "prefix" => "luk"); -$pageCSSAlts = array("blue" => "1", "old" => "2", "purple" => "3", "dark" => "4"); $classDefaultID = "DEFAULT"; $classIDFile = "classes.txt"; @@ -153,7 +153,7 @@ function lukMatchCourse($id) { - global $cache, $cacheDirty, $pageCharset, $pageLang; + global $cache, $cacheDirty, $pageCharset, $pageLang, $mobileMode; $uri = "http://www.oamk.fi/opiskelijalle/rakenne/opinto-opas/koulutusohjelmat/?sivu=oj&kieli=".strtoupper($pageLang)."&koodi1=".$id; @@ -180,8 +180,16 @@ if (isset($cache[$id]) && isset($cache[$id][$pageLang])) { - return "".chentities($cache[$id][$pageLang]["desc"]).""; + if ($mobileMode) + { + return "".chentities($cache[$id][$pageLang]["desc"]).""; + } + else + { + return + "".chentities($cache[$id][$pageLang]["desc"]).""; + } } else return chentities($id); @@ -393,7 +401,6 @@ // Check if we are using mobile mode -$mobileMode = FALSE; /* if (isset($_GET["m"])) {