Code Duplication    Length = 24-24 lines in 2 locations

htdocs/lib2/logic/cachedesc.class.php 1 location

@@ 15-38 (lines=24) @@
12
    public $nCacheDescId = 0;
13
    public $reCacheDesc;
14
15
    public function __construct($nNewCacheDescId = ID_NEW)
16
    {
17
        $this->reUser = new rowEditor('cache_desc');
18
        $this->reUser->addPKInt('id', null, false, RE_INSERT_AUTOINCREMENT);
19
        $this->reUser->addString('uuid', '', false, RE_INSERT_AUTOUUID);
20
        $this->reUser->addInt('node', 0, false);
21
        $this->reUser->addDate('date_created', time(), true, RE_INSERT_IGNORE);
22
        $this->reUser->addDate('last_modified', time(), true, RE_INSERT_IGNORE);
23
        $this->reUser->addInt('cache_id', 0, false);
24
        $this->reUser->addString('language', '', false);
25
        $this->reUser->addString('desc', '', false);
26
        $this->reUser->addInt('desc_html', 1, false);
27
        $this->reUser->addInt('desc_htmledit', 1, false);
28
        $this->reUser->addString('hint', '', false);
29
        $this->reUser->addString('short_desc', '', false);
30
31
        $this->nCacheDescId = $nNewCacheDescId + 0;
32
33
        if ($nNewCacheDescId == ID_NEW) {
34
            $this->reCacheDesc->addNew(null);
35
        } else {
36
            $this->reCacheDesc->load($this->nCacheDescId);
37
        }
38
    }
39
40
    public function exist()
41
    {

htdocs/lib2/logic/cachelist.class.php 1 location

@@ 21-44 (lines=24) @@
18
    public $nCachelistId = 0;
19
    public $reCachelist;
20
21
    public function __construct($nNewCacheListId = ID_NEW, $nUserId = 0)
22
    {
23
        $this->reCachelist = new rowEditor('cache_lists');
24
        $this->reCachelist->addPKInt('id', null, false, RE_INSERT_AUTOINCREMENT);
25
        $this->reCachelist->addString('uuid', '', false, RE_INSERT_AUTOUUID);
26
        $this->reCachelist->addInt('node', 0, false);
27
        $this->reCachelist->addInt('user_id', $nUserId, false);
28
        $this->reCachelist->addDate('date_created', time(), true, RE_INSERT_IGNORE);
29
        $this->reCachelist->addDate('last_modified', time(), true, RE_INSERT_IGNORE);
30
        $this->reCachelist->addDate('last_added', null, true);
31
        $this->reCachelist->addString('name', '', false);
32
        $this->reCachelist->addInt('is_public', 0, false);
33
        $this->reCachelist->addString('description', '', false);
34
        $this->reCachelist->addInt('desc_htmledit', 1, false);
35
        $this->reCachelist->addString('password', '', false);
36
37
        $this->nCachelistId = $nNewCacheListId + 0;
38
39
        if ($nNewCacheListId == ID_NEW) {
40
            $this->reCachelist->addNew(null);
41
        } else {
42
            $this->reCachelist->load($this->nCachelistId);
43
        }
44
    }
45
46
    public function exist()
47
    {