Permalink
Browse files

Minor fix for $imagepath.

  • Loading branch information...
1 parent 08df81a commit ce668c6531c0ea6dbcf1ceb591dedf20cad1af33 julmis committed Feb 22, 2004
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/editor/popups/preview.php
@@ -18,6 +18,7 @@
$imageurl = rawurldecode($imageurl); /// Full URL starts with $CFG->wwwroot/file.php
$imagepath = str_replace("$CFG->wwwroot/file.php", '', $imageurl);
+ $imagepath = str_replace("?file=", '', $imagepath); // if we're using second option of file path.
if ($imagepath != $imageurl) { /// This is an internal image
$size = getimagesize($CFG->dataroot.$imagepath);

0 comments on commit ce668c6

Please sign in to comment.