Code Duplication    Length = 11-11 lines in 2 locations

htdocs/kernel/block.php 1 location

@@ 63-73 (lines=11) @@
60
        $this->initVar('last_modified', XOBJ_DTYPE_INT, 0, false);
61
62
        // for backward compatibility
63
        if (isset($id)) {
64
            if (is_array($id)) {
65
                $this->assignVars($id);
66
            } else {
67
                $blkhandler = xoops_getHandler('block');
68
                $obj        = $blkhandler->get($id);
69
                foreach (array_keys($obj->getVars()) as $i) {
70
                    $this->assignVar($i, $obj->getVar($i, 'n'));
71
                }
72
            }
73
        }
74
    }
75
76
    /**

htdocs/kernel/user.php 1 location

@@ 90-100 (lines=11) @@
87
        $this->initVar('user_intrest', XOBJ_DTYPE_TXTBOX, null, false, 150);
88
        $this->initVar('user_mailok', XOBJ_DTYPE_INT, 1, false);
89
        // for backward compatibility
90
        if (isset($id)) {
91
            if (is_array($id)) {
92
                $this->assignVars($id);
93
            } else {
94
                $member_handler = xoops_getHandler('member');
95
                $user           = $member_handler->getUser($id);
96
                foreach ($user->vars as $k => $v) {
97
                    $this->assignVar($k, $v['value']);
98
                }
99
            }
100
        }
101
    }
102
103
    /**