Code Duplication    Length = 9-9 lines in 2 locations

lib/elFinderVolumeDriver.class.php 2 locations

@@ 5220-5228 (lines=9) @@
5217
5218
				if ($img && false != ($tmp = imagecreatetruecolor($size_w, $size_h))) {
5219
				    $bgNum = false;
5220
				    if ($s[2] === IMAGETYPE_GIF && (! $destformat || $destformat === 'gif')) {
5221
				        $bgIdx = imagecolortransparent($img);
5222
				        if ($bgIdx !== -1) {
5223
				            $c = imagecolorsforindex($img, $bgIdx);
5224
				            $bgNum = imagecolorallocate($tmp, $c['red'], $c['green'], $c['blue']);
5225
				            imagefill($tmp, 0, 0, $bgNum);
5226
				            imagecolortransparent($tmp, $bgNum);
5227
				        }
5228
				    }
5229
				    if ($bgNum === false) {
5230
				        $this->gdImageBackground($tmp, 'transparent');
5231
				    }
@@ 5330-5338 (lines=9) @@
5327
5328
				if ($img && false != ($tmp = imagecreatetruecolor($width, $height))) {
5329
				    $bgNum = false;
5330
				    if ($s[2] === IMAGETYPE_GIF && (! $destformat || $destformat === 'gif')) {
5331
				        $bgIdx = imagecolortransparent($img);
5332
				        if ($bgIdx !== -1) {
5333
				            $c = imagecolorsforindex($img, $bgIdx);
5334
				            $bgNum = imagecolorallocate($tmp, $c['red'], $c['green'], $c['blue']);
5335
				            imagefill($tmp, 0, 0, $bgNum);
5336
				            imagecolortransparent($tmp, $bgNum);
5337
				        }
5338
				    }
5339
				    if ($bgNum === false) {
5340
				        $this->gdImageBackground($tmp, 'transparent');
5341
				    }