Code Duplication    Length = 9-9 lines in 2 locations

lib/midgard/admin/asgard/toolbar.php 1 location

@@ 54-62 (lines=9) @@
51
            && substr($object->__mgdschema_class_name__, 0, 14) != 'net_nemein_tag')
52
        {
53
            $link = midcom::get()->permalinks->resolve_permalink($object->guid);
54
            if ($link)
55
            {
56
                $buttons[] = array
57
                (
58
                    MIDCOM_TOOLBAR_URL => $link,
59
                    MIDCOM_TOOLBAR_LABEL => midcom::get()->i18n->get_string('view on site', 'midgard.admin.asgard'),
60
                    MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/stock_internet.png',
61
                );
62
            }
63
        }
64
65
        if ($object->can_do('midgard:update'))

lib/net/nemein/rss/handler/list.php 1 location

@@ 102-110 (lines=9) @@
99
    {
100
        $toolbar = new midcom_helper_toolbar();
101
        $buttons = array();
102
        if ($feed->can_do('midgard:update'))
103
        {
104
            $buttons[] = array
105
            (
106
                MIDCOM_TOOLBAR_URL => "__feeds/rss/edit/{$feed->guid}/",
107
                MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('edit'),
108
                MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/edit.png',
109
            );
110
        }
111
112
        if ($this->_topic->can_do('midgard:create'))
113
        {