Merge pull request #7044 from MrPetovan/task/router
Move mod/admin to src/Module/Admin
This commit is contained in:
commit
774d04cd2f
97 changed files with 3031 additions and 3894 deletions
2667
mod/admin.php
2667
mod/admin.php
File diff suppressed because it is too large
Load diff
|
@ -90,7 +90,6 @@ function cal_content(App $a)
|
|||
|
||||
$htpl = Renderer::getMarkupTemplate('event_head.tpl');
|
||||
$a->page['htmlhead'] .= Renderer::replaceMacros($htpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$module_url' => '/cal/' . $a->data['user']['nickname'],
|
||||
'$modparams' => 2,
|
||||
'$i18n' => $i18n,
|
||||
|
@ -268,7 +267,6 @@ function cal_content(App $a)
|
|||
}
|
||||
|
||||
$o = Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$tabs' => $tabs,
|
||||
'$title' => L10n::t('Events'),
|
||||
'$view' => L10n::t('View'),
|
||||
|
|
|
@ -8,7 +8,6 @@ use Friendica\Content\Feature;
|
|||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Model\FileTag;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Database\DBA;
|
||||
|
@ -48,7 +47,6 @@ function editpost_content(App $a)
|
|||
|
||||
$tpl = Renderer::getMarkupTemplate('jot-header.tpl');
|
||||
$a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$ispublic' => ' ', // L10n::t('Visible to <strong>everybody</strong>'),
|
||||
'$geotag' => $geotag,
|
||||
'$nickname' => $a->user['nickname']
|
||||
|
@ -91,7 +89,6 @@ function editpost_content(App $a)
|
|||
'$posttype' => $item['post-type'],
|
||||
'$content' => undo_post_tagging($item['body']),
|
||||
'$post_id' => $post_id,
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$defloc' => $a->user['default-location'],
|
||||
'$visitor' => 'none',
|
||||
'$pvisit' => 'none',
|
||||
|
|
|
@ -237,7 +237,6 @@ function events_content(App $a)
|
|||
|
||||
$htpl = Renderer::getMarkupTemplate('event_head.tpl');
|
||||
$a->page['htmlhead'] .= Renderer::replaceMacros($htpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$module_url' => '/events',
|
||||
'$modparams' => 1,
|
||||
'$i18n' => $i18n,
|
||||
|
@ -379,7 +378,6 @@ function events_content(App $a)
|
|||
}
|
||||
|
||||
$o = Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$tabs' => $tabs,
|
||||
'$title' => L10n::t('Events'),
|
||||
'$view' => L10n::t('View'),
|
||||
|
|
|
@ -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 = '';
|
||||
|
@ -97,7 +104,6 @@ function fbrowser_content(App $a)
|
|||
|
||||
$o = Renderer::replaceMacros($tpl, [
|
||||
'$type' => 'image',
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$path' => $path,
|
||||
'$folders' => $albums,
|
||||
'$files' => $files,
|
||||
|
@ -127,7 +133,6 @@ function fbrowser_content(App $a)
|
|||
$tpl = Renderer::getMarkupTemplate($template_file);
|
||||
$o = Renderer::replaceMacros($tpl, [
|
||||
'$type' => 'file',
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$path' => [ [ "", L10n::t("Files")] ],
|
||||
'$folders' => false,
|
||||
'$files' => $files,
|
||||
|
|
|
@ -139,7 +139,6 @@ function lostpass_generate_password($user)
|
|||
'$lbl5' => '<a href="' . System::baseUrl() . '">' . L10n::t('click here to login') . '</a>.',
|
||||
'$lbl6' => L10n::t('Your password may be changed from the <em>Settings</em> page after successful login.'),
|
||||
'$newpass' => $new_password,
|
||||
'$baseurl' => System::baseUrl()
|
||||
]);
|
||||
|
||||
info("Your password has been reset." . EOL);
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function opensearch_content(App $a) {
|
||||
|
||||
|
@ -11,7 +10,6 @@ function opensearch_content(App $a) {
|
|||
header("Content-type: application/opensearchdescription+xml");
|
||||
|
||||
$o = Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$nodename' => $a->getHostName(),
|
||||
]);
|
||||
|
||||
|
|
|
@ -113,7 +113,6 @@ function photos_init(App $a) {
|
|||
'$title' => L10n::t('Photo Albums'),
|
||||
'$recent' => L10n::t('Recent Photos'),
|
||||
'$albums' => $ret['albums'],
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$upload' => [L10n::t('Upload New Photos'), 'photos/' . $a->data['user']['nickname'] . '/upload'],
|
||||
'$can_post' => $can_post
|
||||
]);
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* @file mod/phpinfo.php
|
||||
*/
|
||||
|
||||
function phpinfo_content()
|
||||
{
|
||||
if (!is_site_admin()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
phpinfo();
|
||||
exit();
|
||||
}
|
|
@ -154,15 +154,11 @@ function poke_content(App $a)
|
|||
$name = $contact['name'];
|
||||
$id = $contact['id'];
|
||||
|
||||
$base = System::baseUrl();
|
||||
|
||||
$head_tpl = Renderer::getMarkupTemplate('poke_head.tpl');
|
||||
$a->page['htmlhead'] .= Renderer::replaceMacros($head_tpl,[
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$base' => $base
|
||||
]);
|
||||
|
||||
|
||||
$parent = (!empty($_GET['parent']) ? intval($_GET['parent']) : '0');
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function toggle_mobile_init(App $a) {
|
||||
|
||||
|
|
|
@ -49,7 +49,6 @@ function uexport_content(App $a) {
|
|||
|
||||
$tpl = Renderer::getMarkupTemplate("uexport.tpl");
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$title' => L10n::t('Export personal data'),
|
||||
'$options' => $options
|
||||
]);
|
||||
|
|
|
@ -67,9 +67,7 @@ function videos_init(App $a)
|
|||
$a->page['aside'] .= $vcard_widget;
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate("videos_head.tpl");
|
||||
$a->page['htmlhead'] .= Renderer::replaceMacros($tpl,[
|
||||
'$baseurl' => System::baseUrl(),
|
||||
]);
|
||||
$a->page['htmlhead'] .= Renderer::replaceMacros($tpl);
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue