Code Duplication    Length = 7-7 lines in 3 locations

lib/midcom/helper/datamanager2/widget/downloads.php 1 location

@@ 398-404 (lines=7) @@
395
    public function add_elements_to_form($attributes)
396
    {
397
        $frozen = false;
398
        if (   $this->_type->storage->object
399
            && (   !$this->_type->storage->object->can_do('midgard:attachments')
400
                || !$this->_type->storage->object->can_do('midgard:update')
401
                || !$this->_type->storage->object->can_do('midgard:parameters')))
402
        {
403
            $frozen = true;
404
        }
405
        $this->_compute_elements($frozen);
406
        $this->_group = $this->_form->addGroup($this->_elements, $this->name, $this->_translate($this->_field['title']), "\n");
407
    }

lib/midcom/helper/datamanager2/widget/image.php 1 location

@@ 74-80 (lines=7) @@
71
72
        $this->_form->addGroup($elements, $this->name, $this->_translate($this->_field['title']), ' ', false);
73
74
        if (   $this->_type->storage->object
75
            && (   !$this->_type->storage->object->can_do('midgard:attachments')
76
                || !$this->_type->storage->object->can_do('midgard:update')
77
                || !$this->_type->storage->object->can_do('midgard:parameters')))
78
        {
79
            $this->freeze();
80
        }
81
        if (!$this->_type->imagemagick_available(true))
82
        {
83
            $this->freeze();

lib/midcom/helper/datamanager2/widget/images.php 1 location

@@ 488-494 (lines=7) @@
485
    public function add_elements_to_form($attributes)
486
    {
487
        $frozen = false;
488
        if (   $this->_type->storage->object
489
            && (   !$this->_type->storage->object->can_do('midgard:attachments')
490
                || !$this->_type->storage->object->can_do('midgard:update')
491
                || !$this->_type->storage->object->can_do('midgard:parameters')))
492
        {
493
            $frozen = true;
494
        }
495
        if (!$this->_type->imagemagick_available(true))
496
        {
497
            $frozen = true;