Code Duplication    Length = 5-7 lines in 2 locations

lib/elFinderConnector.class.php 1 location

@@ 274-280 (lines=7) @@
271
            }
272
273
            if ($reqMethod !== 'HEAD') {
274
                if ($toEnd) {
275
                    fpassthru($fp);
276
                } else {
277
                    $out = fopen('php://output', 'wb');
278
                    stream_copy_to_stream($fp, $out, $psize);
279
                    fclose($out);
280
                }
281
            }
282
283
            if (! empty($data['volume'])) {

lib/elFinderVolumeDropbox2.class.php 1 location

@@ 1302-1306 (lines=5) @@
1299
        try {
1300
            $info = stream_get_meta_data($fp);
1301
            if (empty($info['uri']) || preg_match('#^[a-z0-9.-]+://#', $info['uri'])) {
1302
                if ($filepath = $this->getTempFile()) {
1303
                    $_fp = fopen($filepath, 'wb');
1304
                    stream_copy_to_stream($fp, $_fp);
1305
                    fclose($_fp);
1306
                }
1307
            } else {
1308
                $filepath = $info['uri'];
1309
            }