X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Ffrio%2Ftheme.php;h=e0c382661a1be3b1099f626d9a9ffea4230537b8;hb=bc724f2b68004fc90729adba150360ab7456747d;hp=e1a37a9562c4e7e62db3ca974cf319cc5706c1b5;hpb=623479a346ee6524e9b32e731651a6db12da330b;p=friendica.git diff --git a/view/theme/frio/theme.php b/view/theme/frio/theme.php index e1a37a9562..e0c382661a 100644 --- a/view/theme/frio/theme.php +++ b/view/theme/frio/theme.php @@ -7,6 +7,8 @@ * */ +use Friendica\App; + $frio = "view/theme/frio"; global $frio; @@ -16,9 +18,6 @@ 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 = App::get_baseurl(); @@ -133,7 +132,7 @@ function frio_item_photo_menu(App $a, &$arr) { * Additionally the profile, status and photo page links will be changed * to don't open in a new tab if the contact is a friendica contact. * - * @param app $a The app data + * @param App $a The app data * @param array $args Contains contact data and the original photo_menu */ function frio_contact_photo_menu(App $a, &$args){ @@ -185,7 +184,7 @@ function frio_contact_photo_menu(App $a, &$args){ * Some links will point to the local pages because the user would expect * local page (these pages are: search, community, help, apps, directory). * - * @param app $a The App class + * @param App $a The App class * @param array $nav The original nav menu */ function frio_remote_nav($a,&$nav) { @@ -219,7 +218,7 @@ function frio_remote_nav($a,&$nav) { // empty the server url for local user because we won't need it $server_url = ''; // user info - $r = q("SELECT `micro` FROM `contact` WHERE `uid` = %d AND `self` = 1", intval($a->user['uid'])); + $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]['name'] = $a->user['username']; @@ -243,7 +242,7 @@ function frio_remote_nav($a,&$nav) { } if(!local_user() && !empty($server_url)) { - $nav['logout'] = Array($server_url . '/logout',t('Logout'), "", t('End this session')); + $nav['logout'] = Array($server_url . '/logout', t('Logout'), "", t('End this session')); // user menu $nav['usermenu'][] = Array($server_url . '/profile/' . $a->user['nickname'], t('Status'), "", t('Your posts and conversations')); @@ -274,7 +273,7 @@ function frio_remote_nav($a,&$nav) { * @param App $a The app data @TODO Unused * @param array $results The array with the originals from acl_lookup() */ -function frio_acl_lookup($a, &$results) { +function frio_acl_lookup(App $a, &$results) { require_once("mod/contacts.php"); $nets = ((x($_GET,"nets")) ? notags(trim($_GET["nets"])) : ""); @@ -298,7 +297,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 ", + WHERE `uid` = %d AND NOT `self` AND NOT `pending` $sql_extra $sql_extra2 ", intval($_SESSION['uid'])); if (dbm::is_result($r)) { $total = $r[0]["total"]; @@ -306,7 +305,7 @@ function frio_acl_lookup($a, &$results) { $sql_extra3 = unavailable_networks(); - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `pending` = 0 $sql_extra $sql_extra2 $sql_extra3 ORDER BY `name` ASC LIMIT 100 ", + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND NOT `self` AND NOT `pending` $sql_extra $sql_extra2 $sql_extra3 ORDER BY `name` ASC LIMIT 100 ", intval($_SESSION['uid']) );