Code Duplication    Length = 18-21 lines in 2 locations

lib/elFinderVolumeBox.class.php 1 location

@@ 92-109 (lines=18) @@
89
     * @author Dmitry (dio) Levashov
90
     * @author Cem (DiscoFever)
91
     **/
92
    public function __construct()
93
    {
94
        $opts = [
95
            'client_id' => '',
96
            'client_secret' => '',
97
            'accessToken' => '',
98
            'root' => 'Box.com',
99
            'path' => '/',
100
            'separator' => '/',
101
            'tmbPath' => '',
102
            'tmbURL' => '',
103
            'tmpPath' => '',
104
            'acceptedName' => '#^[^/\\?*:|"<>]*[^./\\?*:|"<>]$#',
105
            'rootCssClass' => 'elfinder-navbar-root-box',
106
        ];
107
        $this->options = array_merge($this->options, $opts);
108
        $this->options['mimeDetect'] = 'internal';
109
    }
110
111
    /*********************************************************************/
112
    /*                        OVERRIDE FUNCTIONS                         */

lib/elFinderVolumeDropbox2.class.php 1 location

@@ 63-83 (lines=21) @@
60
     *
61
     * @author Naoki Sawada
62
     **/
63
    public function __construct()
64
    {
65
        $opts = [
66
            'app_key' => '',
67
            'app_secret' => '',
68
            'access_token' => '',
69
            'aliasFormat' => '%s@Dropbox',
70
            'path' => '/',
71
            'separator' => '/',
72
            'acceptedName' => '#^[^/\\?*:|"<>]*[^./\\?*:|"<>]$#',
73
            'rootCssClass' => 'elfinder-navbar-root-dropbox',
74
            'publishPermission' => [
75
                'requested_visibility' => 'public',
76
                //'link_password' => '',
77
                //'expires' => '',
78
            ],
79
            'getThumbSize' => 'medium', // Available sizes: 'thumb', 'small', 'medium', 'large', 'huge'
80
        ];
81
        $this->options = array_merge($this->options, $opts);
82
        $this->options['mimeDetect'] = 'internal';
83
    }
84
85
    /**
86
     * Get OAuth2 access token form OAuth1 tokens.