Mercurial > SimpleWebPresenter
comparison InputParser.inc @ 100:0a33803ee026
Setting variant correctly.
| author | Tom Fredrik "BFG" Klaussen <bfg@blenning.no> |
|---|---|
| date | Sat, 27 Sep 2014 10:54:58 +0200 |
| parents | d98e315308cd |
| children | b6381903122e |
comparison
equal
deleted
inserted
replaced
| 99:d98e315308cd | 100:0a33803ee026 |
|---|---|
| 37 | 37 |
| 38 if(array_key_exists('lang', $_GET) && $_GET['lang']) { | 38 if(array_key_exists('lang', $_GET) && $_GET['lang']) { |
| 39 $this->options->setLang($_GET['lang']); | 39 $this->options->setLang($_GET['lang']); |
| 40 } | 40 } |
| 41 else { | 41 else { |
| 42 if (count($this->options->getAcceptedLanguages()) > 1) | |
| 43 $this->addVariant('Accept-Language'); | |
| 42 $this->options->setLang($this->options->getDefaultLang()); | 44 $this->options->setLang($this->options->getDefaultLang()); |
| 43 } | 45 } |
| 44 | 46 |
| 45 if(array_key_exists('name', $_GET) && $_GET['name']) { | 47 if(array_key_exists('name', $_GET) && $_GET['name']) { |
| 46 $this->options->setName($_GET['name']); | 48 $this->options->setName($_GET['name']); |
