comparison index.php @ 41:2a3ff56697db

Don't set values if they are empty in URL.
author Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
date Fri, 05 Oct 2012 00:48:33 +0200
parents fbbb82ced6de
children 79f708a48a7c
comparison
equal deleted inserted replaced
40:fbbb82ced6de 41:2a3ff56697db
39 $options->setCache($cache); 39 $options->setCache($cache);
40 $options->setBasePath(basePath()); 40 $options->setBasePath(basePath());
41 41
42 $options->setUrlParams(array('name', 'lang')); 42 $options->setUrlParams(array('name', 'lang'));
43 43
44 if(array_key_exists('lang', $_GET)) { 44 if(array_key_exists('lang', $_GET) && $_GET['lang']) {
45 $options->setLang($_GET['lang']); 45 $options->setLang($_GET['lang']);
46 } 46 }
47 else { 47 else {
48 $options->setLang($options->getDefaultLang()); 48 $options->setLang($options->getDefaultLang());
49 } 49 }
50 50
51 if( array_key_exists('name', $_GET)) { 51 if(array_key_exists('name', $_GET) && $_GET['name']) {
52 $options->setName($_GET['name']); 52 $options->setName($_GET['name']);
53 } 53 }
54 54
55 $params = $master->getElementsByTagName("param"); 55 $params = $master->getElementsByTagName("param");
56 56