comparison index.php @ 142:0e8b8fac920d

Check request instead of $_GET.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 31 Aug 2014 01:10:09 +0300
parents 36fb1ce941d5
children d70c899b0571
comparison
equal deleted inserted replaced
141:36fb1ce941d5 142:0e8b8fac920d
392 // Check given parameters: 392 // Check given parameters:
393 // Language must be the first setting to be validated, 393 // Language must be the first setting to be validated,
394 // so that the translation support works properly. 394 // so that the translation support works properly.
395 // 395 //
396 396
397 if (isset($_GET["lang"])) 397 if (($tmp = stGetRequestItem("lang", FALSE, TRUE)) !== FALSE)
398 { 398 {
399 $tmp = strtolower($_GET["lang"]); 399 $tmp = strtolower($tmp);
400 if (in_array($tmp, $pageLanguages)) 400 if (in_array($tmp, $pageLanguages))
401 { 401 {
402 $pageLang = $tmp; 402 $pageLang = $tmp;
403 setcookie("luklang", $tmp, time() + 365*24*60*60); // expire in a year 403 setcookie("luklang", $tmp, time() + 365*24*60*60); // expire in a year
404 } 404 }
452 $classID = $classDefaultID; 452 $classID = $classDefaultID;
453 } 453 }
454 454
455 455
456 // Check next period flag 456 // Check next period flag
457 if (isset($_GET["next"])) 457 if (isset($_REQUEST["next"]))
458 { 458 {
459 $nextPeriod = TRUE; 459 $nextPeriod = TRUE;
460 $cachePath = "cache-next/"; 460 $cachePath = "cache-next/";
461 } 461 }
462 else 462 else