]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
dont include png files as php.
authorPablo Martin <caedes@sindominio.net>
Mon, 5 Nov 2012 08:04:51 +0000 (08:04 +0000)
committerroot <root@ops.vz.lan>
Mon, 5 Nov 2012 08:05:02 +0000 (08:05 +0000)
views/default/dokuwiki/index.php

index e1c1120f81bef5dc793694ad7c66947f021f9d7d..424f1109bcedf74d29503bd31bcd5eb67cde866b 100644 (file)
@@ -1,6 +1,13 @@
 <?php
        global $CONFIG;
        $destfile = $CONFIG->pluginspath.'dokuwiki/vendors/dokuwiki/'.$vars['page'];
-       if (file_exists($destfile))
-              include($destfile);
+       if (file_exists($destfile)) {
+               if (strpos($destfile, ".png") === FALSE)
+               {
+                       include($destfile);
+               } else {
+                       header("Content-type: image");
+                       echo file_get_contents($destfile);
+               }
+       }
 ?>