Code Duplication    Length = 14-14 lines in 2 locations

lib/elFinderVolumeBox.class.php 1 location

@@ 1644-1657 (lines=14) @@
1641
    protected function _save($fp, $path, $name, $stat)
1642
    {
1643
        $itemId = '';
1644
        if ($name === '') {
1645
            list($parentId, $itemId, $parent) = $this->_bd_splitPath($path);
1646
        } else {
1647
            if ($stat) {
1648
                if (isset($stat['name'])) {
1649
                    $name = $stat['name'];
1650
                }
1651
                if (isset($stat['rev']) && strpos($stat['hash'], $this->id) === 0) {
1652
                    $itemId = $stat['rev'];
1653
                }
1654
            }
1655
            list(, $parentId) = $this->_bd_splitPath($path);
1656
            $parent = $path;
1657
        }
1658
1659
        try {
1660
            //Create or Update a file

lib/elFinderVolumeOneDrive.class.php 1 location

@@ 1603-1616 (lines=14) @@
1600
    protected function _save($fp, $path, $name, $stat)
1601
    {
1602
        $itemId = '';
1603
        if ($name === '') {
1604
            list($parentId, $itemId, $parent) = $this->_od_splitPath($path);
1605
        } else {
1606
            if ($stat) {
1607
                if (isset($stat['name'])) {
1608
                    $name = $stat['name'];
1609
                }
1610
                if (isset($stat['rev']) && strpos($stat['hash'], $this->id) === 0) {
1611
                    $itemId = $stat['rev'];
1612
                }
1613
            }
1614
            list(, $parentId) = $this->_od_splitPath($path);
1615
            $parent = $path;
1616
        }
1617
1618
        try {
1619
            //Create or Update a file