Issue-#3873
Replace deprecated functions with new syntax.
This commit is contained in:
parent
9eb1f4b9c3
commit
0dfa57948f
124 changed files with 819 additions and 679 deletions
|
@ -5,6 +5,8 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function theme_content(App $a) {
|
||||
|
@ -12,7 +14,7 @@ function theme_content(App $a) {
|
|||
return;
|
||||
}
|
||||
|
||||
$colorset = get_pconfig( local_user(), 'duepuntozero', 'colorset');
|
||||
$colorset = PConfig::get( local_user(), 'duepuntozero', 'colorset');
|
||||
$user = true;
|
||||
|
||||
return clean_form($a, $colorset, $user);
|
||||
|
@ -24,12 +26,12 @@ function theme_post(App $a) {
|
|||
}
|
||||
|
||||
if (isset($_POST['duepuntozero-settings-submit'])){
|
||||
set_pconfig(local_user(), 'duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
|
||||
PConfig::set(local_user(), 'duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
|
||||
}
|
||||
}
|
||||
|
||||
function theme_admin(App $a) {
|
||||
$colorset = get_config( 'duepuntozero', 'colorset');
|
||||
$colorset = Config::get( 'duepuntozero', 'colorset');
|
||||
$user = false;
|
||||
|
||||
return clean_form($a, $colorset, $user);
|
||||
|
@ -37,7 +39,7 @@ function theme_admin(App $a) {
|
|||
|
||||
function theme_admin_post(App $a) {
|
||||
if (isset($_POST['duepuntozero-settings-submit'])){
|
||||
set_config('duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
|
||||
Config::set('duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,9 +56,9 @@ function clean_form(App $a, &$colorset, $user) {
|
|||
);
|
||||
|
||||
if ($user) {
|
||||
$color = get_pconfig(local_user(), 'duepuntozero', 'colorset');
|
||||
$color = PConfig::get(local_user(), 'duepuntozero', 'colorset');
|
||||
} else {
|
||||
$color = get_config( 'duepuntozero', 'colorset');
|
||||
$color = Config::get( 'duepuntozero', 'colorset');
|
||||
}
|
||||
|
||||
$t = get_markup_template("theme_settings.tpl" );
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
<?php
|
||||
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
if (file_exists("$THEMEPATH/style.css")){
|
||||
echo file_get_contents("$THEMEPATH/style.css");
|
||||
}
|
||||
$uid = get_theme_uid();
|
||||
|
||||
$s_colorset = get_config('duepuntozero','colorset');
|
||||
$colorset = get_pconfig( $uid, 'duepuntozero', 'colorset');
|
||||
$s_colorset = Config::get('duepuntozero','colorset');
|
||||
$colorset = PConfig::get( $uid, 'duepuntozero', 'colorset');
|
||||
if (!x($colorset))
|
||||
$colorset = $s_colorset;
|
||||
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
<?php
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
function duepuntozero_init(App $a) {
|
||||
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
$colorset = get_pconfig( local_user(), 'duepuntozero','colorset');
|
||||
$colorset = PConfig::get( local_user(), 'duepuntozero','colorset');
|
||||
if (!$colorset)
|
||||
$colorset = get_config('duepuntozero', 'colorset'); // user setting have priority, then node settings
|
||||
$colorset = Config::get('duepuntozero', 'colorset'); // user setting have priority, then node settings
|
||||
if ($colorset) {
|
||||
if ($colorset == 'greenzero')
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/greenzero.css" type="text/css" media="screen" />'."\n";
|
||||
|
|
|
@ -37,14 +37,14 @@
|
|||
if (is_null($uid)) {
|
||||
$uid = get_theme_uid();
|
||||
}
|
||||
$schema = get_pconfig($uid, 'frio', 'schema');
|
||||
$schema = Friendica\Core\PConfig::get($uid, 'frio', 'schema');
|
||||
if (($schema) && ($schema != '---')) {
|
||||
if (file_exists('view/theme/frio/schema/'.$schema.'.php')) {
|
||||
$schemefile = 'view/theme/frio/schema/'.$schema.'.php';
|
||||
require_once($schemefile);
|
||||
}
|
||||
} else {
|
||||
$nav_bg = get_pconfig($uid, 'frio', 'nav_bg');
|
||||
$nav_bg = Friendica\Core\PConfig::get($uid, 'frio', 'nav_bg');
|
||||
}
|
||||
if (!$nav_bg) {
|
||||
$nav_bg = "#708fa0";
|
||||
|
@ -66,8 +66,8 @@ else
|
|||
<a href="#content" class="sr-only sr-only-focusable">Skip to main content</a>
|
||||
<?php
|
||||
if(x($page,'nav') && (!$minimal)){
|
||||
echo str_replace("~config.sitename~",get_config('config','sitename'),
|
||||
str_replace("~system.banner~",get_config('system','banner'),
|
||||
echo str_replace("~config.sitename~",Friendica\Core\Config::get('config','sitename'),
|
||||
str_replace("~system.banner~",Friendica\Core\Config::get('system','banner'),
|
||||
$page['nav']
|
||||
));};
|
||||
|
||||
|
|
|
@ -18,11 +18,14 @@
|
|||
* 'version' => Schema version
|
||||
* 'overwrites' => Variables which overwriting custom settings
|
||||
*/
|
||||
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
function get_schema_info($schema){
|
||||
|
||||
$theme = current_theme();
|
||||
$themepath = "view/theme/" . $theme . "/";
|
||||
$schema = get_pconfig(local_user(),'frio', 'schema');
|
||||
$schema = PConfig::get(local_user(),'frio', 'schema');
|
||||
|
||||
$info=Array(
|
||||
'name' => $schema,
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
<a href="#content" class="sr-only sr-only-focusable">Skip to main content</a>
|
||||
<?php
|
||||
if(x($page,'nav')) {
|
||||
echo str_replace("~config.sitename~",get_config('config','sitename'),
|
||||
str_replace("~system.banner~",get_config('system','banner'),
|
||||
echo str_replace("~config.sitename~",Friendica\Core\Config::get('config','sitename'),
|
||||
str_replace("~system.banner~",Friendica\Core\Config::get('system','banner'),
|
||||
$page['nav']
|
||||
));};
|
||||
?>
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
|
||||
$frio = "view/theme/frio";
|
||||
|
@ -23,7 +25,7 @@ function frio_init(App $a) {
|
|||
|
||||
$baseurl = System::baseUrl();
|
||||
|
||||
$style = get_pconfig(local_user(), 'frio', 'style');
|
||||
$style = PConfig::get(local_user(), 'frio', 'style');
|
||||
|
||||
$frio = "view/theme/frio";
|
||||
|
||||
|
@ -40,7 +42,7 @@ EOT;
|
|||
}
|
||||
|
||||
if ($style == "")
|
||||
$style = get_config('frio', 'style');
|
||||
$style = Config::get('frio', 'style');
|
||||
}
|
||||
|
||||
function frio_install() {
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function theme_content(App $a) {
|
||||
|
@ -12,10 +14,10 @@ function theme_content(App $a) {
|
|||
return;
|
||||
}
|
||||
|
||||
$align = get_pconfig(local_user(), 'quattro', 'align' );
|
||||
$color = get_pconfig(local_user(), 'quattro', 'color' );
|
||||
$tfs = get_pconfig(local_user(),"quattro","tfs");
|
||||
$pfs = get_pconfig(local_user(),"quattro","pfs");
|
||||
$align = PConfig::get(local_user(), 'quattro', 'align' );
|
||||
$color = PConfig::get(local_user(), 'quattro', 'color' );
|
||||
$tfs = PConfig::get(local_user(),"quattro","tfs");
|
||||
$pfs = PConfig::get(local_user(),"quattro","pfs");
|
||||
|
||||
return quattro_form($a,$align, $color, $tfs, $pfs);
|
||||
}
|
||||
|
@ -26,28 +28,28 @@ function theme_post(App $a) {
|
|||
}
|
||||
|
||||
if (isset($_POST['quattro-settings-submit'])){
|
||||
set_pconfig(local_user(), 'quattro', 'align', $_POST['quattro_align']);
|
||||
set_pconfig(local_user(), 'quattro', 'color', $_POST['quattro_color']);
|
||||
set_pconfig(local_user(), 'quattro', 'tfs', $_POST['quattro_tfs']);
|
||||
set_pconfig(local_user(), 'quattro', 'pfs', $_POST['quattro_pfs']);
|
||||
PConfig::set(local_user(), 'quattro', 'align', $_POST['quattro_align']);
|
||||
PConfig::set(local_user(), 'quattro', 'color', $_POST['quattro_color']);
|
||||
PConfig::set(local_user(), 'quattro', 'tfs', $_POST['quattro_tfs']);
|
||||
PConfig::set(local_user(), 'quattro', 'pfs', $_POST['quattro_pfs']);
|
||||
}
|
||||
}
|
||||
|
||||
function theme_admin(App $a) {
|
||||
$align = get_config('quattro', 'align' );
|
||||
$color = get_config('quattro', 'color' );
|
||||
$tfs = get_config("quattro","tfs");
|
||||
$pfs = get_config("quattro","pfs");
|
||||
$align = Config::get('quattro', 'align' );
|
||||
$color = Config::get('quattro', 'color' );
|
||||
$tfs = Config::get("quattro","tfs");
|
||||
$pfs = Config::get("quattro","pfs");
|
||||
|
||||
return quattro_form($a,$align, $color, $tfs, $pfs);
|
||||
}
|
||||
|
||||
function theme_admin_post(App $a) {
|
||||
if (isset($_POST['quattro-settings-submit'])){
|
||||
set_config('quattro', 'align', $_POST['quattro_align']);
|
||||
set_config('quattro', 'color', $_POST['quattro_color']);
|
||||
set_config('quattro', 'tfs', $_POST['quattro_tfs']);
|
||||
set_config('quattro', 'pfs', $_POST['quattro_pfs']);
|
||||
Config::set('quattro', 'align', $_POST['quattro_align']);
|
||||
Config::set('quattro', 'color', $_POST['quattro_color']);
|
||||
Config::set('quattro', 'tfs', $_POST['quattro_tfs']);
|
||||
Config::set('quattro', 'pfs', $_POST['quattro_pfs']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
<?php
|
||||
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
$uid = get_theme_uid();
|
||||
|
||||
$color=false;
|
||||
$quattro_align=false;
|
||||
$site_color = get_config("quattro","color");
|
||||
$site_quattro_align = get_config("quattro", "align" );
|
||||
$site_color = Config::get("quattro","color");
|
||||
$site_quattro_align = Config::get("quattro", "align" );
|
||||
|
||||
if ($uid) {
|
||||
$color = get_pconfig( $uid, "quattro","color");
|
||||
$quattro_align = get_pconfig( $uid, 'quattro', 'align' );
|
||||
$color = PConfig::get( $uid, "quattro","color");
|
||||
$quattro_align = PConfig::get( $uid, 'quattro', 'align' );
|
||||
}
|
||||
|
||||
if ($color===false) $color=$site_color;
|
||||
|
@ -36,14 +40,14 @@
|
|||
$textarea_font_size = false;
|
||||
$post_font_size = false;
|
||||
|
||||
$site_textarea_font_size = get_config("quattro","tfs");
|
||||
$site_post_font_size = get_config("quattro","pfs");
|
||||
$site_textarea_font_size = Config::get("quattro","tfs");
|
||||
$site_post_font_size = Config::get("quattro","pfs");
|
||||
if ($site_textarea_font_size===false) $site_textarea_font_size="20";
|
||||
if ($site_post_font_size===false) $site_post_font_size="12";
|
||||
|
||||
if ($uid) {
|
||||
$textarea_font_size = get_pconfig( $uid, "quattro","tfs");
|
||||
$post_font_size = get_pconfig( $uid, "quattro","pfs");
|
||||
$textarea_font_size = PConfig::get( $uid, "quattro","tfs");
|
||||
$post_font_size = PConfig::get( $uid, "quattro","pfs");
|
||||
}
|
||||
|
||||
if ($textarea_font_size===false) $textarea_font_size = $site_textarea_font_size;
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function theme_content(App $a) {
|
||||
|
@ -16,10 +18,10 @@ function theme_content(App $a) {
|
|||
return;
|
||||
}
|
||||
|
||||
$style = get_pconfig(local_user(), 'vier', 'style');
|
||||
$style = PConfig::get(local_user(), 'vier', 'style');
|
||||
|
||||
if ($style == "") {
|
||||
$style = get_config('vier', 'style');
|
||||
$style = Config::get('vier', 'style');
|
||||
}
|
||||
|
||||
if ($style == "") {
|
||||
|
@ -43,13 +45,13 @@ function theme_post(App $a) {
|
|||
}
|
||||
|
||||
if (isset($_POST['vier-settings-submit'])){
|
||||
set_pconfig(local_user(), 'vier', 'style', $_POST['vier_style']);
|
||||
set_pconfig(local_user(), 'vier', 'show_pages', $_POST['vier_show_pages']);
|
||||
set_pconfig(local_user(), 'vier', 'show_profiles', $_POST['vier_show_profiles']);
|
||||
set_pconfig(local_user(), 'vier', 'show_helpers', $_POST['vier_show_helpers']);
|
||||
set_pconfig(local_user(), 'vier', 'show_services', $_POST['vier_show_services']);
|
||||
set_pconfig(local_user(), 'vier', 'show_friends', $_POST['vier_show_friends']);
|
||||
set_pconfig(local_user(), 'vier', 'show_lastusers', $_POST['vier_show_lastusers']);
|
||||
PConfig::set(local_user(), 'vier', 'style', $_POST['vier_style']);
|
||||
PConfig::set(local_user(), 'vier', 'show_pages', $_POST['vier_show_pages']);
|
||||
PConfig::set(local_user(), 'vier', 'show_profiles', $_POST['vier_show_profiles']);
|
||||
PConfig::set(local_user(), 'vier', 'show_helpers', $_POST['vier_show_helpers']);
|
||||
PConfig::set(local_user(), 'vier', 'show_services', $_POST['vier_show_services']);
|
||||
PConfig::set(local_user(), 'vier', 'show_friends', $_POST['vier_show_friends']);
|
||||
PConfig::set(local_user(), 'vier', 'show_lastusers', $_POST['vier_show_lastusers']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,9 +61,9 @@ function theme_admin(App $a) {
|
|||
if (!function_exists('get_vier_config'))
|
||||
return;
|
||||
|
||||
$style = get_config('vier', 'style');
|
||||
$style = Config::get('vier', 'style');
|
||||
|
||||
$helperlist = get_config('vier', 'helperlist');
|
||||
$helperlist = Config::get('vier', 'helperlist');
|
||||
|
||||
if ($helperlist == "")
|
||||
$helperlist = "https://forum.friendi.ca/profile/helpers";
|
||||
|
@ -85,14 +87,14 @@ function theme_admin(App $a) {
|
|||
|
||||
function theme_admin_post(App $a) {
|
||||
if (isset($_POST['vier-settings-submit'])){
|
||||
set_config('vier', 'style', $_POST['vier_style']);
|
||||
set_config('vier', 'show_pages', $_POST['vier_show_pages']);
|
||||
set_config('vier', 'show_profiles', $_POST['vier_show_profiles']);
|
||||
set_config('vier', 'show_helpers', $_POST['vier_show_helpers']);
|
||||
set_config('vier', 'show_services', $_POST['vier_show_services']);
|
||||
set_config('vier', 'show_friends', $_POST['vier_show_friends']);
|
||||
set_config('vier', 'show_lastusers', $_POST['vier_show_lastusers']);
|
||||
set_config('vier', 'helperlist', $_POST['vier_helperlist']);
|
||||
Config::set('vier', 'style', $_POST['vier_style']);
|
||||
Config::set('vier', 'show_pages', $_POST['vier_show_pages']);
|
||||
Config::set('vier', 'show_profiles', $_POST['vier_show_profiles']);
|
||||
Config::set('vier', 'show_helpers', $_POST['vier_show_helpers']);
|
||||
Config::set('vier', 'show_services', $_POST['vier_show_services']);
|
||||
Config::set('vier', 'show_friends', $_POST['vier_show_friends']);
|
||||
Config::set('vier', 'show_lastusers', $_POST['vier_show_lastusers']);
|
||||
Config::set('vier', 'helperlist', $_POST['vier_helperlist']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
<?php
|
||||
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
$uid = get_theme_uid();
|
||||
|
||||
$style = get_pconfig($uid, 'vier', 'style');
|
||||
$style = PConfig::get($uid, 'vier', 'style');
|
||||
|
||||
if ($style == "")
|
||||
$style = get_config('vier', 'style');
|
||||
$style = Config::get('vier', 'style');
|
||||
|
||||
if ($style == "")
|
||||
$style = "plus";
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
|
||||
require_once "include/plugin.php";
|
||||
|
@ -105,13 +107,13 @@ EOT;
|
|||
|
||||
function get_vier_config($key, $default = false, $admin = false) {
|
||||
if (local_user() && !$admin) {
|
||||
$result = get_pconfig(local_user(), "vier", $key);
|
||||
$result = PConfig::get(local_user(), "vier", $key);
|
||||
if ($result !== false) {
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
$result = get_config("vier", $key);
|
||||
$result = Config::get("vier", $key);
|
||||
if ($result !== false) {
|
||||
return $result;
|
||||
}
|
||||
|
@ -159,7 +161,7 @@ function vier_community_info() {
|
|||
|
||||
// last 9 users
|
||||
if ($show_lastusers) {
|
||||
$publish = (get_config('system', 'publish_all') ? '' : " AND `publish` = 1 ");
|
||||
$publish = (Config::get('system', 'publish_all') ? '' : " AND `publish` = 1 ");
|
||||
$order = " ORDER BY `register_date` DESC ";
|
||||
|
||||
$tpl = get_markup_template('ch_directory_item.tpl');
|
||||
|
@ -263,7 +265,7 @@ function vier_community_info() {
|
|||
if ($show_helpers) {
|
||||
$r = array();
|
||||
|
||||
$helperlist = get_config("vier", "helperlist");
|
||||
$helperlist = Config::get("vier", "helperlist");
|
||||
|
||||
$helpers = explode(",",$helperlist);
|
||||
|
||||
|
@ -373,7 +375,7 @@ function vier_community_info() {
|
|||
$r[] = array("photo" => "images/wordpress.png", "name" => "Wordpress");
|
||||
}
|
||||
|
||||
if (function_exists("imap_open") && !get_config("system","imap_disabled") && !get_config("system","dfrn_only")) {
|
||||
if (function_exists("imap_open") && !Config::get("system","imap_disabled") && !Config::get("system","dfrn_only")) {
|
||||
$r[] = array("photo" => "images/mail.png", "name" => "E-Mail");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue