-
Notifications
You must be signed in to change notification settings - Fork 349
/
Copy pathdefault.config.php
49 lines (41 loc) · 1.37 KB
/
default.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
<?php
/**
* Filemanager PHP connector
* This file should at least declare auth() function
* and instantiate the Filemanager as '$fm'
*
* IMPORTANT : by default Read and Write access is granted to everyone
* Copy/paste this file to 'user.config.php' file to implement your own auth() function
* to grant access to wanted users only
*
* filemanager.php
* use for ckeditor filemanager
*
* @license MIT License
* @author Simon Georget <simon (at) linea21 (dot) com>
* @copyright Authors
*/
/**
* Check if user is authorized
*
*
* @return boolean true if access granted, false if no access
*/
function auth() {
// You can insert your own code over here to check if the user is authorized.
// If you use a session variable, you've got to start the session first (session_start())
return true;
}
// @todo Work on plugins registration
// if (isset($config['plugin']) && !empty($config['plugin'])) {
// $pluginPath = 'plugins' . DIRECTORY_SEPARATOR . $config['plugin'] . DIRECTORY_SEPARATOR;
// require_once($pluginPath . 'filemanager.' . $config['plugin'] . '.config.php');
// require_once($pluginPath . 'filemanager.' . $config['plugin'] . '.class.php');
// $className = 'Filemanager'.strtoupper($config['plugin']);
// $fm = new $className($config);
// } else {
// $fm = new Filemanager($config);
// }
// we instantiate the Filemanager
$fm = new Filemanager();
?>