-
AuthorPosts
-
coronapro Friend
coronapro
- Join date:
- April 2008
- Posts:
- 3
- Downloads:
- 0
- Uploads:
- 0
- Thanked:
- 1 times in 1 posts
November 7, 2012 at 7:56 pm #182033When purchasing a package for publishing a resume for search, the package does not initializes; This is when the start/end dates are blank.
If those dates are there, the purchase works correctly.
Is there a way to set these dates by default? As they are currently blank by default.
Should a purchase when these are blank set the dates?
Am I missing a setting?Joomla 2.5.7
JA Job Board Version 1.0.3
PHP 5.3.3
MySQL 5.1.61coronapro Friendcoronapro
- Join date:
- April 2008
- Posts:
- 3
- Downloads:
- 0
- Uploads:
- 0
- Thanked:
- 1 times in 1 posts
November 7, 2012 at 8:42 pm #472210I managed to fix the problem by modifying the php code in /components/com_jajobboard/helper/jafunctions.class.php:
Change lines 1688-1703 from
[PHP]
if(isset($vars->end_date_post_resume)) {
if($revert) {
if(jaCompareDate($vars->end_date_post_resume, $currDate) > 0) {
$vars->begin_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($vars->begin_date_post_resume . ‘ -‘.$plan_item->value.’ day’));
$vars->end_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($vars->end_date_post_resume . ‘ -‘.$plan_item->value.’ day’));
}} else {
if(jaCompareDate($vars->end_date_post_resume, $currDate) < 0) {
$vars->begin_date_post_resume = $currDate;
$vars->end_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($currDate . ‘ +’.$plan_item->value.’ day’));
} else {
$vars->end_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($vars->end_date_post_resume . ‘ +’.$plan_item->value.’ day’));
}
}
}
[/PHP]to
[PHP]
if(isset($vars->end_date_post_resume)) {
if($revert) {
if(jaCompareDate($vars->end_date_post_resume, $currDate) > 0) {
$vars->begin_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($vars->begin_date_post_resume . ‘ -‘.$plan_item->value.’ day’));
$vars->end_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($vars->end_date_post_resume . ‘ -‘.$plan_item->value.’ day’));
}} else {
if(jaCompareDate($vars->end_date_post_resume, $currDate) < 0) {
$vars->begin_date_post_resume = $currDate;
$vars->end_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($currDate . ‘ +’.$plan_item->value.’ day’));
} else {
$vars->end_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($vars->end_date_post_resume . ‘ +’.$plan_item->value.’ day’));
}
}
} else {
$vars->begin_date_post_resume = $currDate;
$vars->end_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($currDate . ‘ +’.$plan_item->value.’ day’));
}
[/PHP]This will add a condition for when end_date_post_resume is not set.
1 user says Thank You to coronapro for this useful post
Mary Ann Wellington FriendMary Ann Wellington
- Join date:
- September 2014
- Posts:
- 95
- Downloads:
- 22
- Uploads:
- 4
- Thanks:
- 9
- Thanked:
- 5 times in 1 posts
November 8, 2012 at 9:55 am #472262Great, thanks!, I’ll test and let you know. Instead of replacing the whole code lines, it would be enough to add this after line 1722:
[PHP]else {
$vars->begin_date_post_resume = $currDate;
$vars->end_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($currDate . ‘ +’.$plan_item->value.’ day’));
} [/PHP]Which adds the date if none is set.
-
AuthorPosts
This topic contains 3 replies, has 2 voices, and was last updated by Mary Ann Wellington 12 years ago.
We moved to new unified forum. Please post all new support queries in our New Forum