mirror of
https://github.com/friendica/friendica
synced 2025-04-26 17:10:10 +00:00
Normalize base URL usage in admin templates
This commit is contained in:
parent
0c4f1eadb8
commit
d15ebb6fd3
11 changed files with 20 additions and 18 deletions
|
@ -76,7 +76,7 @@ class Details extends BaseAdmin
|
|||
require_once "view/theme/$theme/config.php";
|
||||
|
||||
if (function_exists('theme_admin')) {
|
||||
$admin_form = '<iframe onload="resizeIframe(this);" src="/admin/themes/' . $theme . '/embed?mode=minimal" width="100%" height="600px" frameborder="no"></iframe>';
|
||||
$admin_form = '<iframe onload="resizeIframe(this);" src="' . DI::baseUrl()->get(true) . '/admin/themes/' . $theme . '/embed?mode=minimal" width="100%" height="600px" frameborder="no"></iframe>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ namespace Friendica\Module\Admin\Themes;
|
|||
use Friendica\App;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\BaseAdmin;
|
||||
use Friendica\Module\Response;
|
||||
use Friendica\Util\Profiler;
|
||||
|
@ -94,7 +95,7 @@ class Embed extends BaseAdmin
|
|||
|
||||
$t = Renderer::getMarkupTemplate('admin/addons/embed.tpl');
|
||||
return Renderer::replaceMacros($t, [
|
||||
'$action' => '/admin/themes/' . $theme . '/embed?mode=minimal',
|
||||
'$action' => DI::baseUrl()->get(true) . '/admin/themes/' . $theme . '/embed?mode=minimal',
|
||||
'$form' => $admin_form,
|
||||
'$form_security_token' => self::getFormSecurityToken("admin_theme_settings"),
|
||||
]);
|
||||
|
|
|
@ -37,7 +37,7 @@ class Index extends BaseAdmin
|
|||
|
||||
// reload active themes
|
||||
if (!empty($_GET['action'])) {
|
||||
self::checkFormSecurityTokenRedirectOnError(DI::baseUrl()->get() . '/admin/themes', 'admin_themes', 't');
|
||||
self::checkFormSecurityTokenRedirectOnError('/admin/themes', 'admin_themes', 't');
|
||||
|
||||
switch ($_GET['action']) {
|
||||
case 'reload':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue