Add (again) server side rendering ! the list of user agent need to be completed but it should work.

This commit is contained in:
Sébastien Lucas 2013-08-22 15:20:30 +02:00
parent 9ff4bd2476
commit 9c8ec7fb8a
3 changed files with 46 additions and 0 deletions

View file

@ -10,6 +10,11 @@ define ("VERSION", "0.6.1");
define ("DB", "db");
date_default_timezone_set($config['default_timezone']);
function useServerSideRendering () {
global $config;
return preg_match("/" . $config['cops_server_side_render'] . "/", $_SERVER['HTTP_USER_AGENT']);
}
function getURLParam ($name, $default = NULL) {
if (!empty ($_GET) && isset($_GET[$name]) && $_GET[$name] != "") {
return $_GET[$name];