Ensure theme consistency when using filebrowser
- Send frio filebrowser result to current frame instead of parent one
This commit is contained in:
parent
611220cb53
commit
a88df9b259
3 changed files with 14 additions and 13 deletions
|
@ -11,6 +11,7 @@ use Friendica\Core\Renderer;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Object\Image;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
/**
|
||||
* @param App $a
|
||||
|
@ -27,6 +28,12 @@ function fbrowser_content(App $a)
|
|||
exit();
|
||||
}
|
||||
|
||||
// Needed to match the correct template in a module that uses a different theme than the user/site/default
|
||||
$theme = Strings::sanitizeFilePathItem(defaults($_GET, 'theme', null));
|
||||
if ($theme && is_file("view/theme/$theme/config.php")) {
|
||||
$a->setCurrentTheme($theme);
|
||||
}
|
||||
|
||||
$template_file = "filebrowser.tpl";
|
||||
|
||||
$o = '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue