-
Notifications
You must be signed in to change notification settings - Fork 7
/
config.php
165 lines (120 loc) · 3.69 KB
/
config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<?php
/** This file is part of KCFinder project
*
* @desc Base configuration file
* @package KCFinder
* @version 3.0a1
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010, 2011 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
* @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2
* @link http://kcfinder.sunhater.com
*/
// IMPORTANT!!! Do not remove uncommented settings in this file even if
// you are using session configuration.
// See http://kcfinder.sunhater.com/install for setting descriptions
$publicDir = $_SERVER['DOCUMENT_ROOT'];
$publicUrl = 'http://'.$_SERVER['HTTP_HOST'];
$_DEFAULTS = array(
// GENERAL SETTINGS
'disabled' => false,
'theme' => "dark",
'uploadURL' => "$publicUrl/RES/uploads",
'uploadDir' => "$publicDir/RES/uploads",
'types' => array(
// (F)CKEditor types
'files' => "",
'flash' => "swf",
'images' => "*img",
// TinyMCE types
'file' => "",
'media' => "swf flv avi mpg mpeg qt mov wmv asf rm",
'image' => "*img",
),
'multipleUsers' => array(
'enabled' => true,
'lockToHome' => false,
'rwHomes' => false,
'tokenJson' => 'users.json',
'requestMethod' => 'get'
),
// IMAGE SETTINGS
'imageDriversPriority' => "imagick gmagick gd",
'jpegQuality' => 90,
'thumbsDir' => ".thumbs",
'maxImageWidth' => 0,
'maxImageHeight' => 0,
'thumbWidth' => 100,
'thumbHeight' => 100,
'watermark' => "",
// DISABLE / ENABLE SETTINGS
'denyZipDownload' => false,
'denyUpdateCheck' => false,
'denyExtensionRename' => false,
// PERMISSION SETTINGS
'dirPerms' => 0755,
'filePerms' => 0644,
'access' => array(
'files' => array(
'upload' => true,
'delete' => true,
'copy' => true,
'move' => true,
'rename' => true
),
'dirs' => array(
'create' => true,
'delete' => true,
'rename' => true
)
),
'deniedExts' => "exe com msi bat php phps phtml php3 php4 cgi pl",
// MISC SETTINGS
'filenameChangeChars' => array(/*
' ' => "_",
':' => "."
*/),
'dirnameChangeChars' => array(/*
' ' => "_",
':' => "."
*/),
'mime_magic' => "",
'cookieDomain' => "",
'cookiePath' => "",
'cookiePrefix' => 'KCFINDER_',
// THE FOLLOWING SETTINGS CANNOT BE OVERRIDED WITH SESSION SETTINGS
'_check4htaccess' => true,
//'_tinyMCEPath' => "/tiny_mce",
'_sessionVar' => &$_SESSION['KCFINDER'],
//'_sessionLifetime' => 30,
//'_sessionDir' => "/full/directory/path",
//'_sessionDomain' => ".mysite.com",
//'_sessionPath' => "/my/path",
);
/* Include a local config, if any
*
* This is the best place to override default settings, and add any
* business logic to the configuration. It is not advisable to hack the
* main config structure, although it may provide a quick and painless
* solution :-)
**/
if (file_exists(dirname(__FILE__) . '/config.local.php')) {
require_once dirname(__FILE__) . '/config.local.php';
}
if (isset($_LOCALS)) {
$_CONFIG = array_merge($_DEFAULTS, $_LOCALS);
} else {
$_CONFIG =& $_DEFAULTS;
}
// Temporary fix for some CSRF issues
// Deny all requests not coming from the same domain
// FIXME: Refactor this, integrate in core app
//
// To apply this, copy and uncomment the following snippet to config.local.php
/*
$origin = parse_url($_SERVER['HTTP_REFERER']);
if($origin['host'] != 'theblacksea.eu') {
die('Warning, access forbidden!');
}
*/
?>