Jump to content

getReportsByAcceptStatus fix


wisechild1

Recommended Posts

Hi, there is some error in getReportsByAcceptStatus function in PIREPData.class.php.

It is in around line 438.

Change

/**
 * Get all of a pilot's reports by status
 *
 * @param int $pilotid The Pilot ID to find
 * @param integer $accept PIREP_PENDING, PIREP_ACCEPTED, PIREP_REJECTED, PIREP_INPROGRESS
 * @return
 */
public static function getReportsByAcceptStatus($pilotid, $accept = 0) {
	return self::findPIREPS(array(
		'pilotid' => intval($pilotid),
		'accepted' => intval($accept)
		)
	);
}

to

/**
 * Get all of a pilot's reports by status
 *
 * @param int $pilotid The Pilot ID to find
 * @param integer $accept PIREP_PENDING, PIREP_ACCEPTED, PIREP_REJECTED, PIREP_INPROGRESS
 * @return
 */
public static function getReportsByAcceptStatus($pilotid, $accept = 0) {
	return self::findPIREPS(array(
		'p.pilotid' => intval($pilotid),
		'p.accepted' => intval($accept)
		)
	);
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...