define("IN_MANAGER_MODE", "true"); $self = 'assets/plugins/tinymce/js/tinymce.linklist.php'; $base_path = str_replace($self, '', str_replace('\\', '/', __FILE__)); $mtime = microtime(); $manage_path = '../../../../' . MGR_DIR . '/'; include $manage_path . 'includes/config.inc.php'; include MODX_MANAGER_PATH . 'includes/document.parser.class.inc.php'; $modx = new DocumentParser(); $mtime = explode(" ", $mtime); $modx->tstart = $mtime[1] + $mtime[0]; $modx->mstart = memory_get_usage(); startCMSSession(); $modx->db->connect(); $modx->getSettings(); /* only display if manager user is logged in */ if ($modx->getLoginUserType() !== 'manager') { // Make output a real JavaScript file! header('Content-type: application/x-javascript'); // browser will now recognize the file as a valid JS file // prevent browser from caching header('pragma: no-cache'); header('expires: 0'); // i.e. contents have already expired echo 'var tinyMCELinkList = new Array();'; exit; } $cache_path = $base_path . 'assets/cache/mce_linklist.pageCache.php'; if (file_exists($cache_path)) { $output = file_get_contents($cache_path); } else { $linklist = new LINKLIST();