return закоментил, без результатно. поиском прове
return закоментил, без результатно. поиском проверил, во всех файлах require_once. мой action.php if (empty($_REQUEST['action'])) { die('Access denied'); } else { $action = $_REQUEST['action']; }
define('MODX_API_MODE', true);
require_once dirname(dirname(dirname(dirname(dirname(FILE))))) . '/index.php';
$modx->getService('error', 'error.modError'); $modx->getRequest(); $modx->setLogLevel(modX::LOG_LEVEL_ERROR); $modx->setLogTarget('FILE'); $modx->error->message = null;
// Get properties $properties = array(); /* @var Startup $Startup */ define('MODX_ACTION_MODE', true); $Startup = $modx->getService('startup', 'Startup', $modx->getOption('startup_core_path', null, $modx->getOption('core_path') . 'components/startup/') . 'model/startup/', $properties); if ($modx->error->hasError() || !($Startup instanceof Startup)) { die('Error'); } switch ($action) {
case 'projekt/save': $response= $Startup->saveProjekt($_POST);
break;
default:
$message = $_REQUEST['action'] != $action ? 'startup_err_register_globals' : 'startup_err_unknown';
$response = $modx->toJSON(array('success' => false, 'message' => $modx->lexicon($message)));
}
if (is_array($response)) { $response = $modx->toJSON($response); }
//@session_write_close(); exit($response); что-то я упустил, вот что. Всё никак не поборю эти процессоры…