Merge pull request #3658 from annando/static-methods
Avoid some more warnings
This commit is contained in:
commit
94f6f12ba3
136 changed files with 813 additions and 636 deletions
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function theme_content(App $a) {
|
||||
if (!local_user()) {
|
||||
|
@ -62,7 +63,7 @@ function clean_form(App $a, &$colorset, $user) {
|
|||
/// @TODO No need for adding string here, $o is not defined
|
||||
$o .= replace_macros($t, array(
|
||||
'$submit' => t('Submit'),
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$title' => t("Theme settings"),
|
||||
'$colorset' => array('duepuntozero_colorset', t('Variations'), $color, '', $colorset),
|
||||
));
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
|
||||
require_once('view/theme/frio/php/Image.php');
|
||||
|
||||
|
@ -65,7 +66,7 @@ function frio_form($arr) {
|
|||
$t = get_markup_template('theme_settings.tpl');
|
||||
$o .= replace_macros($t, array(
|
||||
'$submit' => t('Submit'),
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$title' => t("Theme settings"),
|
||||
'$schema' => array('frio_schema', t("Select scheme"), $arr["schema"], '', $scheme_choices),
|
||||
'$nav_bg' => array_key_exists("nav_bg", $disable) ? "" : array('frio_nav_bg', t('Navigation bar background color'), $arr['nav_bg']),
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
<head>
|
||||
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
|
||||
<meta request="<?php echo htmlspecialchars($_REQUEST['pagename']) ?>">
|
||||
<script>var baseurl="<?php echo Friendica\App::get_baseurl() ?>";</script>
|
||||
<script>var baseurl="<?php echo Friendica\Core\System::baseUrl() ?>";</script>
|
||||
<script>var frio="<?php echo "view/theme/frio"; ?>";</script>
|
||||
<?php $baseurl = Friendica\App::get_baseurl(); ?>
|
||||
<?php $baseurl = Friendica\Core\System::baseUrl(); ?>
|
||||
<?php $frio = "view/theme/frio"; ?>
|
||||
<?php
|
||||
// Because we use minimal for modals the header and the included js stuff should be only loaded
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
|
||||
<meta name="viewport" content="initial-scale=1.0">
|
||||
<meta request="<?php echo htmlspecialchars($_REQUEST['pagename']) ?>">
|
||||
<script>var baseurl="<?php echo Friendica\App::get_baseurl() ?>";</script>
|
||||
<script>var baseurl="<?php echo Friendica\Core\System::baseUrl() ?>";</script>
|
||||
<script>var frio="<?php echo "view/theme/frio"; ?>";</script>
|
||||
<?php $baseurl = Friendica\App::get_baseurl(); ?>
|
||||
<?php $baseurl = Friendica\Core\System::baseUrl(); ?>
|
||||
<?php $frio = "view/theme/frio"; ?>
|
||||
<?php if(x($page,'htmlhead')) echo $page['htmlhead']; ?>
|
||||
</head>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
|
||||
$frio = "view/theme/frio";
|
||||
|
||||
|
@ -20,7 +21,7 @@ function frio_init(App $a) {
|
|||
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
$baseurl = App::get_baseurl();
|
||||
$baseurl = System::baseUrl();
|
||||
|
||||
$style = get_pconfig(local_user(), 'frio', 'style');
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="<?php echo $lang; ?>">
|
||||
<head>
|
||||
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
|
||||
<script>var baseurl="<?php echo Friendica\App::get_baseurl() ?>";</script>
|
||||
<script>var baseurl="<?php echo Friendica\Core\System::baseUrl() ?>";</script>
|
||||
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
|
||||
</head>
|
||||
<body <?php if($a->module === 'home') echo 'onLoad="setTimeout(\'homeRedirect()\', 1500)"'?>>
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function frost_mobile_init(App $a) {
|
||||
$a->sourcename = 'Friendica mobile web';
|
||||
|
@ -25,8 +26,8 @@ function frost_mobile_content_loaded(App $a) {
|
|||
// I could do this in style.php, but by having the CSS in a file the browser will cache it,
|
||||
// making pages load faster
|
||||
if ( $a->module === 'home' || $a->module === 'login' || $a->module === 'register' || $a->module === 'lostpass' ) {
|
||||
// $a->page['htmlhead'] = str_replace('$stylesheet', App::get_baseurl() . '/view/theme/frost-mobile/login-style.css', $a->page['htmlhead']);
|
||||
$a->theme['stylesheet'] = App::get_baseurl() . '/view/theme/frost-mobile/login-style.css';
|
||||
// $a->page['htmlhead'] = str_replace('$stylesheet', System::baseUrl() . '/view/theme/frost-mobile/login-style.css', $a->page['htmlhead']);
|
||||
$a->theme['stylesheet'] = System::baseUrl() . '/view/theme/frost-mobile/login-style.css';
|
||||
}
|
||||
|
||||
if ( $a->module === 'login' ) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="<?php echo $lang; ?>">
|
||||
<head>
|
||||
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
|
||||
<script>var baseurl="<?php echo Friendica\App::get_baseurl() ?>";</script>
|
||||
<script>var baseurl="<?php echo Friendica\Core\System::baseUrl() ?>";</script>
|
||||
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
|
||||
</head>
|
||||
<body <?php if($a->module === 'home') echo 'onLoad="setTimeout(\'homeRedirect()\', 1500)"'?>>
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function frost_init(App $a) {
|
||||
$a->videowidth = 400;
|
||||
|
@ -23,8 +24,8 @@ function frost_content_loaded(App $a) {
|
|||
// I could do this in style.php, but by having the CSS in a file the browser will cache it,
|
||||
// making pages load faster
|
||||
if( $a->module === 'home' || $a->module === 'login' || $a->module === 'register' || $a->module === 'lostpass' ) {
|
||||
//$a->page['htmlhead'] = str_replace('$stylesheet', App::get_baseurl() . '/view/theme/frost/login-style.css', $a->page['htmlhead']);
|
||||
$a->theme['stylesheet'] = App::get_baseurl() . '/view/theme/frost/login-style.css';
|
||||
//$a->page['htmlhead'] = str_replace('$stylesheet', System::baseUrl() . '/view/theme/frost/login-style.css', $a->page['htmlhead']);
|
||||
$a->theme['stylesheet'] = System::baseUrl() . '/view/theme/frost/login-style.css';
|
||||
}
|
||||
|
||||
if ( $a->module === 'login' ) {
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function theme_content(App $a) {
|
||||
if (!local_user()) {
|
||||
|
@ -68,7 +69,7 @@ function quattro_form(App $a, $align, $color, $tfs, $pfs) {
|
|||
$t = get_markup_template("theme_settings.tpl" );
|
||||
$o .= replace_macros($t, array(
|
||||
'$submit' => t('Submit'),
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$title' => t("Theme settings"),
|
||||
'$align' => array('quattro_align', t('Alignment'), $align, '', array('left'=>t('Left'), 'center'=>t('Center'))),
|
||||
'$color' => array('quattro_color', t('Color scheme'), $color, '', $colors),
|
||||
|
|
|
@ -8,8 +8,9 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function quattro_init(App $a) {
|
||||
$a->page['htmlhead'] .= '<script src="'.App::get_baseurl().'/view/theme/quattro/tinycon.min.js"></script>';
|
||||
$a->page['htmlhead'] .= '<script src="'.App::get_baseurl().'/view/theme/quattro/js/quattro.js"></script>';;
|
||||
$a->page['htmlhead'] .= '<script src="'.System::baseUrl().'/view/theme/quattro/tinycon.min.js"></script>';
|
||||
$a->page['htmlhead'] .= '<script src="'.System::baseUrl().'/view/theme/quattro/js/quattro.js"></script>';;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
|
||||
<script>var baseurl="<?php echo Friendica\App::get_baseurl() ?>";</script>
|
||||
<script>var baseurl="<?php echo Friendica\Core\System::baseUrl() ?>";</script>
|
||||
<script type="text/javascript">
|
||||
function ScrollToBottom(){
|
||||
window.scrollTo(0,document.body.scrollHeight);
|
||||
|
|
|
@ -11,13 +11,14 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function smoothly_init(App $a) {
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
$cssFile = null;
|
||||
$ssl_state = null;
|
||||
$baseurl = App::get_baseurl($ssl_state);
|
||||
$baseurl = System::baseUrl($ssl_state);
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
|
||||
<script>
|
||||
|
@ -107,7 +108,7 @@ if (! function_exists('_js_in_foot')) {
|
|||
*/
|
||||
$a = get_app();
|
||||
$ssl_state = null;
|
||||
$baseurl = App::get_baseurl($ssl_state);
|
||||
$baseurl = System::baseUrl($ssl_state);
|
||||
$bottom['$baseurl'] = $baseurl;
|
||||
$tpl = get_markup_template('bottom.tpl');
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function theme_content(App $a) {
|
||||
if (!local_user()) {
|
||||
|
@ -111,7 +112,7 @@ function vier_form(App $a, $style, $show_pages, $show_profiles, $show_helpers, $
|
|||
$t = get_markup_template("theme_settings.tpl");
|
||||
$o .= replace_macros($t, array(
|
||||
'$submit' => t('Submit'),
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$title' => t("Theme settings"),
|
||||
'$style' => array('vier_style',t ('Set style'),$style,'',$styles),
|
||||
'$show_pages' => array('vier_show_pages', t('Community Pages'), $show_pages, '', $show_or_not),
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
|
||||
require_once "include/plugin.php";
|
||||
require_once "include/socgraph.php";
|
||||
|
@ -129,7 +130,7 @@ function vier_community_info() {
|
|||
$show_lastusers = get_vier_config("show_lastusers", 1);
|
||||
|
||||
// get_baseurl
|
||||
$url = App::get_baseurl($ssl_state);
|
||||
$url = System::baseUrl($ssl_state);
|
||||
$aside['$url'] = $url;
|
||||
|
||||
// comunity_profiles
|
||||
|
@ -235,7 +236,7 @@ function vier_community_info() {
|
|||
'name' => $contact['name'],
|
||||
'cid' => $contact['id'],
|
||||
'selected' => $selected,
|
||||
'micro' => App::remove_baseurl(proxy_url($contact['micro'], false, PROXY_SIZE_MICRO)),
|
||||
'micro' => System::removedBaseUrl(proxy_url($contact['micro'], false, PROXY_SIZE_MICRO)),
|
||||
'id' => ++$id,
|
||||
);
|
||||
$entries[] = $entry;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue