Needs review
Project:
Recruiter
Version:
7.x-1.12
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Nov 2017 at 23:11 UTC
Updated:
30 Jul 2018 at 08:09 UTC
Jump to comment: Most recent
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
Comment #2
karuna patel commentedfunction should be replaced by below line :