- Title: New member
- Status: Offline
- Registered: 2009-01-16
- Posts: 4
Topic: Completely delete deleted jobs?
First, thank you all for this great software!
I got the new version (1.6).
This is the issue:
When a job listing is deleted via admin area I can still see links pointing to deleted job in "Most applied" and "Seen recently" sections on the homepage.
These links should be gone when delete button is pressed.
- Title: rawkstar wannabe
- Status: Offline
- Registered: 2009-01-16
- Posts: 362
Re: Completely delete deleted jobs?
hi canada, make sure that the job ad is really deleted.
about it showing on most applied, u need to add a filter for "is_active = 1" so that it will only grab active ads. i noticed this too and that's all i have to add.
for seen recently, this is session based (if i am correct), maybe you can unset the session that populates the seen recently list
will host your job board for you at minimal cost! read more:
http://mim.io/acb992
- Title: New member
- Status: Offline
- Registered: 2009-01-16
- Posts: 4
Re: Completely delete deleted jobs?
Thanx!
In includes folder open file class.job.php and find function GetMostAppliedToJobs.
Under, find:
AND j.id = ja.job_id AND
replace with:
AND j.id = ja.job_id AND is_active = 1
Tested and works.
For the second part however I am not sure how to unset the session for Seen recently link. I doubt any big issues could happen from leaving it as is.
- Title: Senior Contributor
- Status: Offline
- From: Netherlands
- Registered: 2008-11-16
- Posts: 378
Re: Completely delete deleted jobs?
Small problem... In version 1.6 you can't find
Code:AND j.id = ja.job_id AND
The function looks like this instead
Code:public function GetMostAppliedToJobs($limit = false)
{
global $db;
$jobs = array();
if ($limit > 0)
{
$sql_limit = 'LIMIT ' . $limit;
}
$i = 0;
$sql = 'SELECT ja.job_id, COUNT(ja.id) as nr FROM job_applications ja, jobs jbs WHERE ja.job_id = jbs.id GROUP BY ja.job_id
ORDER BY nr DESC ' . $sql_limit;
$result = $db->query($sql);
while ($row = $result->fetch_assoc())
{
$current_job = new Job($row['job_id']);
$jobs[$i] = $current_job->GetInfo();
$jobs[$i]['apps'] = $row['nr'];
$i++;
}
return $jobs;
}
So, where do we need to put this?
- Title: Administrator
- Status: Offline
- From: Oradea, Romania
- Registered: 2008-08-20
- Posts: 966
Re: Completely delete deleted jobs?
Hi.
What you want is this:
Code:$sql = 'SELECT ja.job_id, COUNT(ja.id) as nr FROM job_applications ja, jobs jbs WHERE ja.job_id = jbs.id AND jbs.is_active = 1 GROUP BY ja.job_id ORDER BY nr DESC ' . $sql_limit;
Posts [ 5 ]
Guest posting is disabled. You must login or register to post a reply.