X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Ffrio%2Ftheme.php;h=664881a4a8947995ca3fe18e01496d87694f5124;hb=a020086128e3d903a030cc3b3d403ab9bce02d88;hp=69f9267c2029b7b4ccd6b5fd06237e450f7de328;hpb=5324023d5284c7d2ce67bea988476290684b013e;p=friendica.git diff --git a/view/theme/frio/theme.php b/view/theme/frio/theme.php index 69f9267c20..664881a4a8 100644 --- a/view/theme/frio/theme.php +++ b/view/theme/frio/theme.php @@ -2,7 +2,7 @@ /* * Name: frio * Description: Bootstrap V3 theme. The theme is currently under construction, so it is far from finished. For further information have a look at the ReadMe. - * Version: V.0.2 Alpha + * Version: V.0.7 * Author: Rabuzarus * */ @@ -11,14 +11,17 @@ $frio = "view/theme/frio"; global $frio; -function frio_init(&$a) { +function frio_init(App &$a) { // disable the events module link in the profile tab $a->theme_events_in_profile = false; + // Disallow the richtext editor + $a->theme_richtext_editor = false; + set_template_engine($a, 'smarty3'); - $baseurl = $a->get_baseurl(); + $baseurl = App::get_baseurl(); $style = get_pconfig(local_user(), 'frio', 'style'); @@ -218,12 +221,12 @@ function frio_remote_nav($a,&$nav) { // user info $r = q("SELECT `micro` FROM `contact` WHERE `uid` = %d AND `self` = 1", intval($a->user['uid'])); - $r[0]['photo'] = (count($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()) { $r = q("SELECT `name`, `nick`, `micro` AS `photo` FROM `contact` WHERE `id` = %d", intval(remote_user())); - $nav['remote'] = t("Remote"); + $nav['remote'] = t("Guest"); } elseif(get_my_url ()) { $r = q("SELECT `name`, `nick`, `photo` FROM `gcontact` @@ -232,9 +235,9 @@ function frio_remote_nav($a,&$nav) { $nav['remote'] = t("Visitor"); } - if(count($r)){ + if (dbm::is_result($r)){ $nav['userinfo'] = array( - 'icon' => (count($r) ? $r[0]['photo'] : "images/person-48.jpg"), + 'icon' => (dbm::is_result($r) ? $r[0]['photo'] : "images/person-48.jpg"), 'name' => $r[0]['name'], ); } @@ -296,7 +299,7 @@ function frio_acl_lookup($a, &$results) { $r = q("SELECT COUNT(*) AS `total` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `pending` = 0 $sql_extra $sql_extra2 ", intval($_SESSION['uid'])); - if(count($r)) { + if (dbm::is_result($r)) { $total = $r[0]["total"]; } @@ -308,7 +311,7 @@ function frio_acl_lookup($a, &$results) { $contacts = array(); - if(count($r)) { + if (dbm::is_result($r)) { foreach($r as $rr) { $contacts[] = _contact_detail_for_template($rr); } @@ -317,4 +320,4 @@ function frio_acl_lookup($a, &$results) { $results["items"] = $contacts; $results["tot"] = $total; } -} \ No newline at end of file +}