1 <?php
namespace kcfinder\cms
;
3 /** This file is part of KCFinder project
5 * @desc CMS integration code: BolmerCMS
8 * @author Borisov Evgeniy <modx@agel-nash.ru>
9 * @copyright 2010-2014 KCFinder Project
10 * @license http://opensource.org/licenses/GPL-3.0 GPLv3
11 * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3
12 * @link http://kcfinder.sunhater.com
15 protected static $authenticated = false;
16 static function checkAuth() {
17 $current_cwd = getcwd();
18 if ( ! self
::$authenticated) {
19 define('BOLMER_API_MODE', true);
20 define('IN_MANAGER_MODE', true);
21 $init = realpath(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__
))))))."/index.php");
23 $type = getService('user', true)->getLoginUserType();
25 self
::$authenticated = true;
26 if (!isset($_SESSION['KCFINDER'])) {
27 $_SESSION['KCFINDER'] = array();
29 if(!isset($_SESSION['KCFINDER']['disabled'])) {
30 $_SESSION['KCFINDER']['disabled'] = false;
32 $_SESSION['KCFINDER']['_check4htaccess'] = false;
33 $_SESSION['KCFINDER']['uploadURL'] = '/assets/';
34 $_SESSION['KCFINDER']['uploadDir'] = BOLMER_BASE_PATH
.'assets/';
35 $_SESSION['KCFINDER']['theme'] = 'default';
40 return self
::$authenticated;
43 \kcfinder\cms\BolmerCMS
::checkAuth();