$answer['error'] = true; $answer['msg'] = $language['connector.illegal']; } } else { $answer['error'] = true; $answer['msg'] = $language['connector.rights']; } break; case 'datatable': default: if ($action && $tvid) { // document exists? $res = $modx->db->select('*', $modx->getFullTableName('site_content'), 'id=' . $docid); if ($modx->db->getRecordCount($res)) { // document with docId editable? $docObj = $modx->getPageInfo($docid, 0, '*'); if ($docObj) { // get the settings for the multiTV $tvSettings = $modx->getTemplateVar($tvid, '*', $docid, $docObj['published']); if ($tvSettings && ($tvSettings['elements'] = '@INCLUDE' . MTV_PATH . 'multitv.customtv.php')) { $multiTV = new multiTV($modx, array('type' => 'tv', 'tvDefinitions' => $tvSettings, 'tvUrl' => MTV_PATH)); $includeFile = $multiTV->includeFile($action, 'processor'); // processor available? if ($includeFile) { include $includeFile; } else { $answer['error'] = true; $answer['msg'] = $language['connector.noprocessor']; } } else { $answer['error'] = true;