Skip to content

Commit

Permalink
Minor fix for $imagepath.
Browse files Browse the repository at this point in the history
  • Loading branch information
julmis committed Feb 22, 2004
1 parent 08df81a commit ce668c6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/editor/popups/preview.php
Expand Up @@ -18,6 +18,7 @@


$imageurl = rawurldecode($imageurl); /// Full URL starts with $CFG->wwwroot/file.php $imageurl = rawurldecode($imageurl); /// Full URL starts with $CFG->wwwroot/file.php
$imagepath = str_replace("$CFG->wwwroot/file.php", '', $imageurl); $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 if ($imagepath != $imageurl) { /// This is an internal image
$size = getimagesize($CFG->dataroot.$imagepath); $size = getimagesize($CFG->dataroot.$imagepath);
Expand Down

0 comments on commit ce668c6

Please sign in to comment.