use Friendica\Core\Renderer;
use Friendica\Core\Session;
use Friendica\Database\DBA;
+use Friendica\DI;
use Friendica\Model;
use Friendica\Module;
use Friendica\Util\Strings;
// if the device is a mobile device set js is_mobile
// variable so the js scripts can use this information
- if ($a->is_mobile || $a->is_tablet) {
+ if (DI::mode()->isMobile() || DI::mode()->isMobile()) {
$a->page['htmlhead'] .= <<< EOT
<script type="text/javascript">
var is_mobile = 1;
</script>
EOT;
}
+
+ $enable_compose = \Friendica\Core\PConfig::get(local_user(), 'frio', 'enable_compose');
+ $compose = $enable_compose === '1' || $enable_compose === null && Config::get('frio', 'enable_compose') ? 1 : 0;
+ $a->page['htmlhead'] .= <<< HTML
+ <script type="text/javascript">
+ var compose = $compose;
+ </script>
+HTML;
}
function frio_install()
// user info
$r = q("SELECT `micro` FROM `contact` WHERE `uid` = %d AND `self`", intval($a->user['uid']));
- $r[0]['photo'] = (DBA::isResult($r) ? $a->removeBaseURL($r[0]['micro']) : 'images/person-48.jpg');
+ $r[0]['photo'] = (DBA::isResult($r) ? DI::baseUrl()->remove($r[0]['micro']) : 'images/person-48.jpg');
$r[0]['name'] = $a->user['username'];
} elseif (!local_user() && remote_user()) {
$r = q("SELECT `name`, `nick`, `micro` AS `photo` FROM `contact` WHERE `id` = %d", intval(remote_user()));