$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=QuickSave&application='.$apiName; $translateKey = 'LBL_EXTAPI_'.strtoupper($apiName); if ( ! empty($app_strings[$translateKey]) ) { $apiLabel = $app_strings[$translateKey]; } else { $apiLabel = $apiName; } $thisFail['label'] = str_replace('{0}',$apiLabel,translate('LBL_ERR_FAILED_QUICKCHECK','EAPM')); $failList[$apiName] = $thisFail; } } } } $json = new JSON(); echo($json->encode($failList));