$apiOpts ) { if ( $apiOpts['authMethod'] == 'oauth' ) { $api = ExternalAPIFactory::loadAPI($apiName); if ( is_object($api) ) { $loginCheck = $api->quickCheckLogin(); } else { $loginCheck['success'] = false; } if ( ! $loginCheck['success'] ) { $thisFail = array(); $thisFail['checkURL'] = 'index.php?module=EAPM&closeWhenDone=1&action=Save&record='.$api->eapmBean->id; $translateKey = 'LBL_EXTAPI_'.strtoupper($apiName); if ( ! empty($app_strings[$translateKey]) ) { $thisFail['label'] = $app_strings[$translateKey]; } else { $thisFail['label'] = $apiName; } $thisFail['label'] .= translate('LBL_ERR_FAILED_QUICKCHECK','EAPM'); $failList[$apiName] = $thisFail; } } } } $json = new JSON(); echo($json->encode($failList));