Mercurial > SimpleWebPresenter
comparison Sitemap.inc @ 95:8a9bfbe220ca
Branch merge.
| author | Tom Fredrik "BFG" Klaussen <bfg@blenning.no> |
|---|---|
| date | Thu, 18 Oct 2012 17:40:21 +0200 |
| parents | 8aadd7a23b68 |
| children | c7de7a4641d7 |
comparison
equal
deleted
inserted
replaced
| 94:2370f4450983 | 95:8a9bfbe220ca |
|---|---|
| 54 $base = substr($base, 0, strrpos($base, '/')); | 54 $base = substr($base, 0, strrpos($base, '/')); |
| 55 | 55 |
| 56 $acceptedLanguages = $this->options->getAcceptedLanguages(); | 56 $acceptedLanguages = $this->options->getAcceptedLanguages(); |
| 57 | 57 |
| 58 foreach($this->options->getAcceptedLanguages() as $lang) { | 58 foreach($this->options->getAcceptedLanguages() as $lang) { |
| 59 if ($handle = opendir("${lang}")) { | 59 if ($handle = opendir(basePath() . "/${lang}")) { |
| 60 while (false !== ($entry = readdir($handle))) { | 60 while (false !== ($entry = readdir($handle))) { |
| 61 if (endsWith($entry, '.xml')) { | 61 if (endsWith($entry, '.xml')) { |
| 62 $fentry = "${lang}/${entry}"; | 62 $fentry = basepath() . "/${lang}/${entry}"; |
| 63 $doc = new DOMDocument(); | 63 $doc = new DOMDocument(); |
| 64 | 64 |
| 65 if (file_exists($fentry)) { | 65 if (file_exists($fentry)) { |
| 66 $doc->load($fentry); | 66 $doc->load($fentry); |
| 67 | 67 |
