/** */ public function download_if_necessary() { $filename = $this->getLocalPath(); if (file_exists($filename)) { return; } if (substr($this->url, 0, 7) == "http://") { RISTools::download_file($this->url, $filename); } elseif ($this->typ == Dokument::$TYP_RATHAUSUMSCHAU) { RISTools::download_file("http://www.muenchen.de" . $this->url, $filename); } else { RISTools::download_file("http://www.ris-muenchen.de" . $this->url, $filename); } }