Skip to content

Instantly share code, notes, and snippets.

@Mark-H
Mark-H / connector.php
Created April 12, 2016 11:10
Connector for MODX Revolution with whitelist of permitted actions accessible from the web
<?php
// set context
$_REQUEST['ctx'] = 'web';
require_once dirname(dirname(dirname(dirname(__FILE__)))).'/config.core.php';
require_once MODX_CORE_PATH.'config/'.MODX_CONFIG_KEY.'.inc.php';
require_once MODX_CONNECTORS_PATH . 'index.php';
// define allowed actions
$webActions = array(
'one/allowed/action',