In job.module, there's a function named job_resume_list that queries the database for all resumes of a given user. Although it does work if your resume type is named "resume", it doesn't work if you have it set to something else, like "personalinfo". Since you can select the resume type at admin/settings/resume, I think that it should tailor to whatever you picked as your resume type. The line is at:

  $result = db_query("SELECT n.nid, n.title, n.changed FROM {node} n WHERE n.type = 'resume' AND n.uid = %d", $uid);

... in the job_resume_list function. Instead of querying for 'resume', it should search for: variable_get(RESUME_NODE_TYPE . $type, 'resume') .

This would turn the line into:

  $result = db_query("SELECT n.nid, n.title, n.changed FROM {node} n WHERE n.type = '" . variable_get(RESUME_NODE_TYPE . $type, 'resume') . "' AND n.uid = %d", $uid);

... I believe. Thanks a lot, and keep up the great work on this module!

Comments

kbahey’s picture

Status: Active » Postponed (maintainer needs more info)

Can you please submit this as a proper patch?

See http://drupal.org/patch

liliplanet’s picture

I've got the same problem as I use nodeprofile and usernode. And as my content type 'profile' is connected to both, have 2 listings that are incorrect.

function job_resume_list($uid) {
  $resume_types = array();
  foreach(node_get_types() as $type => $name) {
    if (variable_get(RESUME_NODE_TYPE . $type, 0)) {
      $resumes_types[] = "'". $type ."'";
    }
  }
if (!count($resumes_types)) {
    return array();
  }

I would just like 1 type please, the content type is called 'profile'.

Look forward to your reply.

Lilian

robloach’s picture

Hi Khalid... Sorry I didn't submit a patch when I could've. Not too sure where the code is now...

kbahey’s picture

Status: Postponed (maintainer needs more info) » Needs work
xamount’s picture

Issue summary: View changes
Status: Needs work » Fixed

This has been fixed already in the D7 branch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.