Code Duplication    Length = 17-19 lines in 2 locations

lib/net/nehmer/blog/handler/link.php 1 location

@@ 87-105 (lines=19) @@
84
     * @param array $args The argument list.
85
     * @param array &$data The local request data.
86
     */
87
    public function _handler_create($handler_id, array $args, array &$data)
88
    {
89
        $this->_content_topic->require_do('midgard:create');
90
91
        if (!$this->_config->get('enable_article_links'))
92
        {
93
            throw new midcom_error_notfound('Article linking disabled');
94
        }
95
96
        $workflow = $this->get_workflow('datamanager2', array
97
        (
98
            'controller' => $this->get_controller('create'),
99
            'save_callback' => array($this, 'save_callback')
100
        ));
101
102
        midcom::get()->head->set_pagetitle(sprintf($this->_l10n_midcom->get('create %s'), $this->_l10n->get('article link')));
103
104
        return $workflow->run();
105
    }
106
107
    public function save_callback(midcom_helper_datamanager2_controller $controller)
108
    {

lib/net/nehmer/static/handler/link.php 1 location

@@ 90-106 (lines=17) @@
87
     * @param array $args The argument list.
88
     * @param array &$data The local request data.
89
     */
90
    public function _handler_create($handler_id, array $args, array &$data)
91
    {
92
        $this->_content_topic->require_do('midgard:create');
93
94
        if (!$this->_config->get('enable_article_links'))
95
        {
96
            throw new midcom_error_notfound('Article linking disabled');
97
        }
98
        midcom::get()->head->set_pagetitle(sprintf($this->_l10n_midcom->get('create %s'), $this->_l10n->get('article link')));
99
100
        $workflow = $this->get_workflow('datamanager2', array
101
        (
102
            'controller' => $this->get_controller('create'),
103
            'save_callback' => array($this, 'save_callback')
104
        ));
105
        return $workflow->run();
106
    }
107
108
    public function save_callback(midcom_helper_datamanager2_controller $controller)
109
    {