Hello,

I installed the jobs mod for phpBB from zarath, and it works, but when I try to update a job, it automatically changes the job type from 'private' to 'public' (which is the default type), so I can't update my jobs without them getting public.

I'm pretty sure I installed everything correctly.

Can someone help me please? I'm not that good with php, and I really want this mod to work.

Thanks in advance!

(I'll attach the file in txt format)

    ok looks like no-one likes to download the file, so I'll just post the code where I think the bug is:

    
    ...
    
    elseif ($action == 'updatejob')
    {
    	if ( isset($HTTP_GET_VARS['jobid']) || isset($HTTP_POST_VARS['jobid']) ) { $jobid = ( isset($HTTP_POST_VARS['jobid']) ) ? intval($HTTP_POST_VARS['jobid']) : intval($HTTP_GET_VARS['jobid']); }
    	if( isset($HTTP_GET_VARS['paytime']) || isset($HTTP_POST_VARS['paytime']) ) { $paytime = ( isset($HTTP_POST_VARS['paytime']) ) ? intval($HTTP_POST_VARS['paytime']) : intval($HTTP_GET_VARS['paytime']); }
    	if( isset($HTTP_GET_VARS['positions']) || isset($HTTP_POST_VARS['positions']) ) { $positions = ( isset($HTTP_POST_VARS['positions']) ) ? intval($HTTP_POST_VARS['positions']) : intval($HTTP_GET_VARS['positions']); }
    	if( isset($HTTP_GET_VARS['pay']) || isset($HTTP_POST_VARS['pay']) ) { $pay = ( isset($HTTP_POST_VARS['pay']) ) ? intval($HTTP_POST_VARS['pay']) : intval($HTTP_GET_VARS['pay']); }
    	if( isset($HTTP_GET_VARS['requirements']) || isset($HTTP_POST_VARS['requirements']) ) { $requirements = ( isset($HTTP_POST_VARS['requirements']) ) ? $HTTP_POST_VARS['requirements'] : $HTTP_GET_VARS['requirements']; }
    	if( isset($HTTP_GET_VARS['name']) || isset($HTTP_POST_VARS['name']) ) { $name = ( isset($HTTP_POST_VARS['name']) ) ? $HTTP_POST_VARS['name'] : $HTTP_GET_VARS['name']; }
    
    if( isset($HTTP_GET_VARS['delete']) || isset($HTTP_POST_VARS['delete']) ) { $delete = ( isset($HTTP_POST_VARS['delete']) ) ? $HTTP_POST_VARS['delete'] : $HTTP_GET_VARS['delete']; }
    
    if ( (!is_numeric($paytime)) || ($paytime < 0) ) { $paytime = 500000; }
    if ( (!is_numeric($positions)) || ($positions < 0) ) { $positions = 0; }
    if ( (!is_numeric($pay)) || ($pay < 0) ) { $pay = 5; }
    if (strlen($requirements) < 3) { $requirements = "none"; }
    if (strlen($name) > 30) { message_die(GENERAL_MESSAGE, $lang['jobs_invalid_name'] . "<br /><br />" . sprintf($lang['jobs_main_link'], "<a href=\"" . append_sid("admin_jobs.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>")); }
    
    $jobtype = ( $jobtype != "private" ) ? 'public' : 'private';
    
    if (!empty($delete))
    {
    	$sql = "SELECT * 
    		FROM " . JOBS_TABLE . " 
    		WHERE id='$jobid'";
    	if ( !($result = $db->sql_query($sql)) )
    	{
    		message_die(GENERAL_ERROR, sprintf($lang['jobs_error_selecting'], 'jobs'), '', __LINE__, __FILE__, $sql);
    	}
    	if (!( $row = $db->sql_fetchrow($result) ))
    	{
    		message_die(GENERAL_ERROR, sprintf($lang['jobs_error_selecting'], 'jobs'), '', __LINE__, __FILE__, $sql);
    
    ...
    
    
      Write a Reply...