X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=view%2Ftheme%2Fvier%2Ftheme.php;h=2533e50a8916630b75c49f2ab2b6fc8954b0d604;hb=b9325251e89db94439a670a32cd1d00f3db848d3;hp=8aaa1ee0ac4b9a9e96b7d148c6e425ef7d8d2aeb;hpb=acb4630eed14175ef35f09e21609d6329f3f990c;p=friendica.git
diff --git a/view/theme/vier/theme.php b/view/theme/vier/theme.php
index 8aaa1ee0ac..fcbb148dc7 100644
--- a/view/theme/vier/theme.php
+++ b/view/theme/vier/theme.php
@@ -10,59 +10,39 @@
*/
use Friendica\App;
-use Friendica\Core\Config;
-use Friendica\Core\PConfig;
-use Friendica\Core\System;
-
-require_once "include/plugin.php";
-require_once "include/socgraph.php";
-require_once "mod/proxy.php";
-
-function vier_init(App $a) {
-
+use Friendica\Content\ForumManager;
+use Friendica\Core\Addon;
+use Friendica\Core\Renderer;
+use Friendica\Core\Search;
+use Friendica\Database\DBA;
+use Friendica\DI;
+use Friendica\Model\Contact;
+use Friendica\Model\GContact;
+use Friendica\Util\Proxy as ProxyUtils;
+use Friendica\Util\Strings;
+
+function vier_init(App $a)
+{
$a->theme_events_in_profile = false;
- set_template_engine($a, 'smarty3');
+ Renderer::setActiveTemplateEngine('smarty3');
- if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] || $a->argv[0] === "network" && local_user()) {
+ if (!empty($a->argv[0]) && ($a->argv[0] . ($a->argv[1] ?? '')) === ('profile' . $a->user['nickname']) || $a->argv[0] === 'network' && local_user()) {
vier_community_info();
- $a->page['htmlhead'] .= "\n";
+ DI::page()['htmlhead'] .= "\n";
}
- if ($a->is_mobile || $a->is_tablet) {
- $a->page['htmlhead'] .= ''."\n";
- $a->page['htmlhead'] .= ''."\n";
+ if (DI::mode()->isMobile() || DI::mode()->isMobile()) {
+ DI::page()['htmlhead'] .= ''."\n";
+ DI::page()['htmlhead'] .= ''."\n";
}
/// @todo deactivated since it doesn't work with desktop browsers at the moment
- //$a->page['htmlhead'] .= ''."\n";
+ //DI::page()['htmlhead'] .= ''."\n";
- $a->page['htmlhead'] .= <<< EOT
+ DI::page()['htmlhead'] .= <<< EOT
EOT;
- if ($a->is_mobile || $a->is_tablet){
- $a->page['htmlhead'] .= <<< EOT
+ if (DI::mode()->isMobile() || DI::mode()->isMobile()) {
+ DI::page()['htmlhead'] .= <<< EOT