typo in function name recruiter_job_application_exisits_for_job() in profiles/recruiter/modules/recruiter_features/recruiter_job_application/recruiter_job_application.module line 491

/**
 * Returns TRUE if there are job applications for a certain job.
 *
 * @param $applicant
 *   Either the uid of an applicant user or the user object itself.
 *
 * @param $node_id
 *   The node id of a $job offering.
 *
 * @return bool
 *   TRUE if there is an application for this job and applicant, else FALSE.
 */
function recruiter_job_application_exisits_for_job($applicant, $node_id) {
  $applications_exists = &drupal_static(__FUNCTION__);

  $applicant = is_object($applicant) ? $applicant : user_load($applicant);
  if (!isset($applications_exists[$applicant->uid])) {
    $query = db_select('field_data_field_job_application_job_ref', 'jr');
    $query->addField('jr', 'field_job_application_job_ref_target_id');
    $query->innerJoin('node', 'n', 'jr.entity_id = n.nid');
    $query->condition('n.uid', $applicant->uid);
    // Store all the results in to the cache, so we don't have retrieve all
    // nodes again later.
    $applications_exists[$applicant->uid] = $query->execute()->fetchCol();
  }

  return in_array($node_id->nid, $applications_exists[$applicant->uid]) ;
}

Comments

zet created an issue. See original summary.

karuna patel’s picture

Status: Active » Needs review

function should be replaced by below line :

function recruiter_job_application_exists_for_job($applicant, $node_id) {