Skip to content

Commit

Permalink
Fixed subpath image folder issue, closes #1164
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Jun 20, 2016
1 parent 0cabc10 commit 1e2719b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions phpmyfaq/admin/image.browser.php
Expand Up @@ -71,11 +71,12 @@
if ($file->isDir() || !in_array($file->getExtension(), $allowedExtensions)) {
continue;
}
$path = str_replace(dirname(__DIR__).'/', '', $file->getPath());
printf(
'<div class="mce-file" data-src="%s"><img src="%s" class="mce-file-preview">%s</div>',
$faqConfig->getDefaultUrl() . 'images/' . $file->getFilename(),
$faqConfig->getDefaultUrl() . 'images/' . $file->getFilename(),
$file->getFilename()
$faqConfig->getDefaultUrl() . $path . '/' . $file->getFilename(),
$faqConfig->getDefaultUrl() . $path . '/' . $file->getFilename(),
$path . '/' . $file->getFilename()
);
}
}
Expand Down

4 comments on commit 1e2719b

@rdtcmis
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello this is not working for phpmyfaq 3.0 under centos 8 with php version 7.3

@thorsten
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rdtcmis I think it's the same issue mentioned in #1764

@rdtcmis
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thorsten yeah, this will only work if your phpmyfaq was installed on the root www folder.

@thorsten
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rdtcmis can you please tell me what's missing on your installation?

Please sign in to comment.