X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Ffrio%2Ftheme.php;h=8b1713026970604ccd1aad323b92b777bd321626;hb=52bddd580c3f97add2d15f00c01c80acfc73230f;hp=a9423e09d570055f97a6e9dc4f10ef6f314cac66;hpb=2332d9f62ac651ee2991ce8df5a66e07f41ab864;p=friendica.git diff --git a/view/theme/frio/theme.php b/view/theme/frio/theme.php index a9423e09d5..8b17130269 100644 --- a/view/theme/frio/theme.php +++ b/view/theme/frio/theme.php @@ -8,7 +8,11 @@ */ use Friendica\App; +use Friendica\Core\Config; +use Friendica\Core\PConfig; use Friendica\Core\System; +use Friendica\Database\DBM; +use Friendica\Object\Image; $frio = "view/theme/frio"; @@ -19,11 +23,11 @@ function frio_init(App $a) { // disable the events module link in the profile tab $a->theme_events_in_profile = false; - set_template_engine($a, 'smarty3'); + $a->set_template_engine('smarty3'); $baseurl = System::baseUrl(); - $style = get_pconfig(local_user(), 'frio', 'style'); + $style = PConfig::get(local_user(), 'frio', 'style'); $frio = "view/theme/frio"; @@ -37,10 +41,10 @@ function frio_init(App $a) { var is_mobile = 1; EOT; - } +} if ($style == "") - $style = get_config('frio', 'style'); + $style = Config::get('frio', 'style'); } function frio_install() { @@ -76,10 +80,9 @@ function frio_uninstall() { * @param App $a Unused but required by hook definition * @param array $body_info The item and its html output */ -function frio_item_photo_links(App $a, &$body_info) { - require_once('include/Photo.php'); - - $phototypes = Photo::supportedTypes(); +function frio_item_photo_links(App $a, &$body_info) +{ + $phototypes = Image::supportedTypes(); $occurence = 1; $p = bb_find_open_close($body_info['html'], ""); @@ -223,7 +226,7 @@ function frio_remote_nav($a,&$nav) { // user info $r = q("SELECT `micro` FROM `contact` WHERE `uid` = %d AND `self`", intval($a->user['uid'])); - $r[0]['photo'] = (dbm::is_result($r) ? $a->remove_baseurl($r[0]['micro']) : "images/person-48.jpg"); + $r[0]['photo'] = (DBM::is_result($r) ? $a->remove_baseurl($r[0]['micro']) : "images/person-48.jpg"); $r[0]['name'] = $a->user['username']; } elseif (!local_user() && remote_user()) { @@ -239,9 +242,9 @@ function frio_remote_nav($a,&$nav) { $r = false; } - if (dbm::is_result($r)) { + if (DBM::is_result($r)) { $nav['userinfo'] = array( - 'icon' => (dbm::is_result($r) ? $r[0]['photo'] : "images/person-48.jpg"), + 'icon' => (DBM::is_result($r) ? $r[0]['photo'] : "images/person-48.jpg"), 'name' => $r[0]['name'], ); } @@ -304,7 +307,7 @@ function frio_acl_lookup(App $a, &$results) { $r = q("SELECT COUNT(*) AS `total` FROM `contact` WHERE `uid` = %d AND NOT `self` AND NOT `pending` $sql_extra $sql_extra2 ", intval($_SESSION['uid'])); - if (dbm::is_result($r)) { + if (DBM::is_result($r)) { $total = $r[0]["total"]; } @@ -316,7 +319,7 @@ function frio_acl_lookup(App $a, &$results) { $contacts = array(); - if (dbm::is_result($r)) { + if (DBM::is_result($r)) { foreach ($r as $rr) { $contacts[] = _contact_detail_for_template($rr); }