Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions fp-plugins/bbcode/plugin.bbcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ function bbcode_remap_url(&$d) {
}

// NWM: "attachs/" is interpreted as a keyword, and it is translated to the actual path of ATTACHS_DIR
// CHANGE! we use the getfile.php script to mask the actual path of the attachs dir!
// FKM: We now use a get.php script to hide the attachs directory
// Attachment downloads can be routed through get.php to hide ATTACHS_DIR.
// Image paths remain direct filesystem/public paths; get.php is download-only.
// DMKE: I got an idea about an integer-id based download/media manager... work-in-progress
if (strpos($d, ':') === false) {
// if is relative url
Expand All @@ -275,13 +275,8 @@ function bbcode_remap_url(&$d) {
$d = BBCODE_USE_FILEWRAPPER ? 'get.php?f=' . urlencode(basename($d)) : substr_replace($d, ATTACHS_DIR, 0, 8);
return true;
}
if (substr($d, 0, 8) == 'attachs/') {
$d = BBCODE_USE_WRAPPER ? 'getfile.php?f=' . basename($d) . '&dl=true' : substr_replace($d, ATTACHS_DIR, 0, 8);
return true;
}
if (substr($d, 0, 7) == 'images/') {
$d = substr_replace($d, IMAGES_DIR, 0, 7);
$d = BBCODE_USE_WRAPPER ? 'getfile.php?f=' . basename($d) : $d;
}
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions fp-plugins/thumb/plugin.thumb.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function plugin_thumb_create($fpath, $infos, $new_width, $new_height) {
* Added by Piero VDFN
* Kudos to http://www.php.net/manual/en/function.imagecopyresampled.php#104028
*/
if ($infos[2] == 1 || $infos[2] == 3 || $infos[2] == 18) {
if ($infos [2] == 1 || $infos [2] == 3 || $infos [2] == 18) {
imagecolortransparent($scaled, imagecolorallocatealpha($scaled, 0, 0, 0, 127));
imagealphablending($scaled, false);
imagesavealpha($scaled, true);
Expand Down Expand Up @@ -158,7 +158,7 @@ function plugin_thumb_create($fpath, $infos, $new_width, $new_height) {
function plugin_thumb_bbcodehook($actualpath, $props, $newsize) {
list ($width, $height) = $newsize;
if ($thumb = plugin_thumb_create($actualpath, $props, $width, $height)) {
$thumb = BBCODE_USE_WRAPPER ? ("getfile.php?f=" . basename($actualpath) . '&thumb=true') : $thumb [0];
$thumb = $thumb [0];
}
return $thumb;
}
Expand Down