Code Duplication    Length = 11-11 lines in 2 locations

class/smartmlobject.php 2 locations

@@ 52-62 (lines=11) @@
49
     * This will be usefull when creating the ML object for the first time. Then we will be able
50
     * to create translations.
51
     */
52
    public function stripMultilanguageFields()
53
    {
54
        $objectVars    =& $this->getVars();
55
        $newObjectVars = array();
56
        foreach ($objectVars as $key => $var) {
57
            if (!$var['multilingual']) {
58
                $newObjectVars[$key] = $var;
59
            }
60
        }
61
        $this->vars = $newObjectVars;
62
    }
63
64
    public function stripNonMultilanguageFields()
65
    {
@@ 64-74 (lines=11) @@
61
        $this->vars = $newObjectVars;
62
    }
63
64
    public function stripNonMultilanguageFields()
65
    {
66
        $objectVars    =& $this->getVars();
67
        $newObjectVars = array();
68
        foreach ($objectVars as $key => $var) {
69
            if ($var['multilingual'] || $key == $this->handler->keyName) {
70
                $newObjectVars[$key] = $var;
71
            }
72
        }
73
        $this->vars = $newObjectVars;
74
    }
75
76
    /**
77
     * Make non multilanguage fields read only