Code Duplication    Length = 16-17 lines in 2 locations

lib/net/nehmer/blog/viewer.php 1 location

@@ 121-136 (lines=16) @@
118
    {
119
        $buttons = array();
120
        $workflow = $this->get_workflow('datamanager2');
121
        if ($this->_content_topic->can_do('midgard:create'))
122
        {
123
            foreach (array_keys($this->_request_data['schemadb']) as $name)
124
            {
125
                $buttons[] = $workflow->get_button("create/{$name}/", array
126
                (
127
                    MIDCOM_TOOLBAR_LABEL => sprintf
128
                    (
129
                        $this->_l10n_midcom->get('create %s'),
130
                        $this->_l10n->get($this->_request_data['schemadb'][$name]->description)
131
                    ),
132
                    MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/new-text.png',
133
                    MIDCOM_TOOLBAR_ACCESSKEY => 'n',
134
                ));
135
            }
136
        }
137
138
        if ($this->_config->get('rss_subscription_enable'))
139
        {

lib/net/nehmer/static/viewer.php 1 location

@@ 110-126 (lines=17) @@
107
    {
108
        $buttons = array();
109
        $workflow = $this->get_workflow('datamanager2');
110
        if ($this->_content_topic->can_do('midgard:create'))
111
        {
112
            foreach (array_keys($this->_request_data['schemadb']) as $name)
113
            {
114
                $buttons[] = $workflow->get_button("create/{$name}/", array
115
                (
116
                    MIDCOM_TOOLBAR_LABEL => sprintf
117
                    (
118
                        $this->_l10n_midcom->get('create %s'),
119
                        $this->_l10n->get($this->_request_data['schemadb'][$name]->description)
120
                    ),
121
                    MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/attach.png',
122
                    MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/new-text.png',
123
                    MIDCOM_TOOLBAR_ACCESSKEY => 'n',
124
                ));
125
            }
126
        }
127
128
        if (   $this->_config->get('enable_article_links')
129
            && $this->_content_topic->can_do('midgard:create'))