1
0
Fork 0

Update function calls

update function calls to use profile class
This commit is contained in:
Adam Magness 2018-01-14 21:22:39 -05:00
commit 4fb2547df8
45 changed files with 360 additions and 294 deletions

View file

@ -10,6 +10,7 @@
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Model\Profile;
require_once 'view/theme/frio/php/frio_boot.php';
@ -38,7 +39,7 @@ if (!isset($minimal)) {
// It makes mobile Chrome UI match Frio's top bar color.
$uid = $a->profile_uid;
if (is_null($uid)) {
$uid = get_theme_uid();
$uid = Profile::getThemeUid();
}
$schema = PConfig::get($uid, 'frio', 'schema');
if (($schema) && ($schema != '---')) {

View file

@ -1,16 +1,20 @@
<?php
require_once 'view/theme/frio/php/PHPColors/Color.php';
/**
* @file view/theme/frio/style.php
*/
use Friendica\Core\Config;
use Friendica\Core\PConfig;
require_once 'view/theme/frio/php/PHPColors/Color.php';
$schemecss = "";
$schemecssfile = false;
$scheme_modified = 0;
if ($a->module !== 'install') {
// Get the UID of the profile owner.
$uid = get_theme_uid();
$uid = Profile::getThemeUid();
if ($uid) {
PConfig::load($uid, 'frio');
@ -80,11 +84,11 @@ if (($schema) && ($schema != '---')) {
// should leave it for admins to define for themselves.
// default.php and default.css MUST be symlinks to existing schema files.
if (! $schema) {
if(file_exists('view/theme/frio/schema/default.php')) {
if (file_exists('view/theme/frio/schema/default.php')) {
$schemefile = 'view/theme/frio/schema/default.php';
require_once $schemefile;
}
if(file_exists('view/theme/frio/schema/default.css')) {
if (file_exists('view/theme/frio/schema/default.css')) {
$schemecssfile = 'view/theme/frio/schema/default.css';
}
}
@ -135,7 +139,6 @@ if (!isset($link_hover_color)) {
} else {
$link_hover_color = '#' . $lhc->lighten(5);
}
}
// Convert $bg_image_options into css.

View file

@ -13,6 +13,7 @@ use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Profile;
use Friendica\Object\Image;
$frio = "view/theme/frio";
@ -197,7 +198,7 @@ function frio_contact_photo_menu(App $a, &$args)
function frio_remote_nav($a, &$nav)
{
// get the homelink from $_XSESSION
$homelink = get_my_url();
$homelink = Profile::getMyURL();
if (!$homelink) {
$homelink = defaults($_SESSION, 'visitor_home', '');
}
@ -234,7 +235,7 @@ function frio_remote_nav($a, &$nav)
} elseif (!local_user() && remote_user()) {
$r = q("SELECT `name`, `nick`, `micro` AS `photo` FROM `contact` WHERE `id` = %d", intval(remote_user()));
$nav['remote'] = t("Guest");
} elseif (get_my_url()) {
} elseif (Profile::getMyURL()) {
$r = q("SELECT `name`, `nick`, `photo` FROM `gcontact`
WHERE `addr` = '%s' AND `network` = 'dfrn'",
dbesc($webbie));