Permalink
Browse files

fix(file): thumbnails are visible again

The path to autoload.php was wrong in the file serving the thumbnails, if
Elgg was installed as a composer dependency. Now autoload.php is incluced
correctly regardless if Elgg is a composer dependency or not.
  • Loading branch information...
juho-jaakkola committed Sep 24, 2015
1 parent a37b198 commit 7f46db8e4002732d3616a08c6bd82718e4bf3333
Showing with 7 additions and 1 deletion.
  1. +7 −1 mod/file/thumbnail.php
View
@@ -6,7 +6,13 @@
*/
// Get engine
require_once __DIR__ . '/../../vendor/autoload.php';
$initial_root = dirname(dirname(__DIR__));
if (file_exists("$initial_root/vendor/autoload.php")) {
require_once "$initial_root/vendor/autoload.php";
} else {
$backup_root = dirname(dirname(dirname($initial_root)));
require_once "$backup_root/vendor/autoload.php";
}
\Elgg\Application::start();

0 comments on commit 7f46db8

Please sign in to comment.