Seite 1 von 1

Keine Anzeige von Dateien unter CSS, JS und HTML Tab

Verfasst: Mi 6. Aug 2014, 09:26
von IngoL
Hallo Board,

leider konnte ich das ganze nicht in die Bugs reinschreiben.

Nach der installation der Version 4.9.4 wurden bei mir keine Dateien mehr unter den Tabs CSS, JS und HMTL angezeigt. Problem war der aufruf $file->getExtension() der erst ab PHP 5.3.6 verfügbar ist.

Wer das gleiche Problem hat tauscht in der Datei /contenido/classes/gui/class.fileoverfiew.php die Zeilen (ca. Zeile 80)

Code: Alles auswählen

 public function render() {
        global $area, $cfg, $perm;

        // create an array of all files in the directory
        $files = array();
        foreach (new DirectoryIterator($this->directory) as $file) {
            if ($file->isDir()) {
                continue;
            }
            if (!empty($this->fileExtension) && !in_array($file->getExtension(), $this->fileExtension)) {
            	continue;
            }
            $files[] = $file->getBasename();
        }
gegen

Code: Alles auswählen

 public function render() {
        global $area, $cfg, $perm;

        // create an array of all files in the directory
        $files = array();
        foreach (new DirectoryIterator($this->directory) as $file) {
            if ($file->isDir()) {
                continue;
            }
            if (!empty($this->fileExtension) && !preg_match('/^.*('.implode('|',$this->fileExtension).')$/',$file->getFilename())) {
            	continue;
            }
            $files[] = $file->getBasename();
        }
und das Problem ist gelöst.

Ingo