Overview
Comment: | Fix don't try to fetch plugin directories |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
addaea15a943585299abded6f0a2d5b8 |
User & Date: | bohwaz on 2017-01-16 21:38:16 |
Other Links: | manifest | tags |
References
2020-12-08
| ||
23:25 | • Wiki page "Changelog/0.9" artifact: b9c916b4d1 user: bohwaz | |
Context
2017-01-16
| ||
21:38 | Fix plugin name match in router check-in: 5004acdf3a user: bohwaz tags: trunk | |
21:38 | Fix don't try to fetch plugin directories check-in: addaea15a9 user: bohwaz tags: trunk | |
2016-12-07
| ||
22:08 | New release check-in: e683f5cefe user: bohwaz tags: trunk, stable, 0.7.6 | |
Changes
Modified src/include/lib/Garradin/Plugin.php from [a9ad3fd1ec] to [933423603a].
︙ | ︙ | |||
173 174 175 176 177 178 179 | } if (!file_exists($this->path() . '/www/' . $file)) { throw new UserException('Le fichier ' . $file . ' n\'existe pas dans le plugin ' . $this->id); } | | < > > > > > > > > | | | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | } if (!file_exists($this->path() . '/www/' . $file)) { throw new UserException('Le fichier ' . $file . ' n\'existe pas dans le plugin ' . $this->id); } if (is_dir($this->path() . '/www/' . $file)) { throw new UserException(sprintf('Sécurité : impossible de lister le répertoire "%s" du plugin "%s".', $file, $this->id)); } if (substr($file, -4) === '.php') { // Créer l'environnement d'exécution du plugin $plugin = $this; global $tpl, $config, $user, $membres; include $this->path() . '/www/' . $file; } else { // Récupération du type MIME à partir de l'extension $pos = strrpos($file, '.'); $ext = substr($file, $pos+1); if (isset($this->mimes[$ext])) { $mime = $this->mimes[$ext]; } else { $mime = 'text/plain'; } header('Content-Type: ' .$mime); header('Content-Length: ' . filesize($this->path() . '/www/' . $file)); readfile($this->path() . '/www/' . $file); } } /** |
︙ | ︙ |