]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/theme.php
"parent = id" is replaced with gravity check
[friendica.git] / view / theme / frio / theme.php
index bca18e78def9220cd3b78af06600e5a3195cf4b7..0202fda0efb2ed6fd56c9632e1927c1dd32989b4 100644 (file)
@@ -117,7 +117,7 @@ function frio_item_photo_links(App $a, &$body_info)
 function frio_item_photo_menu(App $a, &$arr)
 {
        foreach ($arr['menu'] as $k => $v) {
-               if (strpos($v, 'poke?c=') === 0 || strpos($v, 'message/new/') === 0) {
+               if (strpos($v, '/poke') === 0 || strpos($v, 'message/new/') === 0) {
                        $v = 'javascript:addToModal(\'' . $v . '\'); return false;';
                        $arr['menu'][$k] = $v;
                }
@@ -171,7 +171,7 @@ function frio_contact_photo_menu(App $a, &$args)
        // Add to pm and poke links a new key with the value 'modal'.
        // Later we can make conditions in the corresponing templates (e.g.
        // contact_template.tpl)
-       if (strpos($pokelink, 'poke?c=' . $cid) !== false) {
+       if (strpos($pokelink, $cid . '/poke') !== false) {
                $args['menu']['poke'][3] = 'modal';
        }
 
@@ -346,13 +346,13 @@ function frio_display_item(App $a, &$arr)
        if (
                local_user()
                && local_user() == $arr['item']['uid']
-               && $arr['item']['parent'] == $arr['item']['id']
+               && $arr['item']['gravity'] == GRAVITY_PARENT
                && !$arr['item']['self'])
        {
                $subthread = [
                        'menu'   => 'follow_thread',
                        'title'  => DI::l10n()->t('Follow Thread'),
-                       'action' => 'dosubthread(' . $arr['item']['id'] . '); return false;',
+                       'action' => 'dosubthread(' . $arr['item']['id'] . ');',
                        'href'   => '#'
                ];
        }