Code Duplication    Length = 10-18 lines in 2 locations

htdocs/lib2/logic/picture.class.php 2 locations

@@ 414-423 (lines=10) @@
411
    /**
412
     * @return string
413
     */
414
    public function getCacheId()
415
    {
416
        if ($this->getObjectType() == OBJECT_CACHELOG) {
417
            return sql_value("SELECT `cache_id` FROM `cache_logs` WHERE `id`='&1'", false, $this->getObjectId());
418
        } elseif ($this->getObjectType() == OBJECT_CACHE) {
419
            return $this->getObjectId();
420
        }
421
422
        return false;
423
    }
424
425
    /**
426
     * @return mixed
@@ 462-479 (lines=18) @@
459
    /**
460
     * @return bool|mixed
461
     */
462
    public function getUserId()
463
    {
464
        if ($this->getObjectType() == OBJECT_CACHE) {
465
            return sql_value(
466
                "SELECT `caches`.`user_id` FROM `caches` WHERE `caches`.`cache_id`='&1'",
467
                false,
468
                $this->getObjectId()
469
            );
470
        } elseif ($this->getObjectType() == OBJECT_CACHELOG) {
471
            return sql_value(
472
                "SELECT `cache_logs`.`user_id` FROM `cache_logs` WHERE `cache_logs`.`id`='&1'",
473
                false,
474
                $this->getObjectId()
475
            );
476
        }
477
478
        return false;
479
    }
480
481
    /**
482
     * @return mixed