Vergleich inc/functions_user.php - 1.8.2 - 1.8.4

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 666Zeile 666
/**
* Generates a security question for registration.
*

/**
* Generates a security question for registration.
*

 
 * @param int Optional ID of the old question.

 * @return string The question session id.
*/

 * @return string The question session id.
*/

function generate_question()

function generate_question($old_qid=0)

{
global $db;


{
global $db;


Zeile 679Zeile 680
	else
{
$order_by = 'RAND()';

	else
{
$order_by = 'RAND()';

 
	}

if($old_qid)
{
$excl_old = ' AND qid != '.(int)$old_qid;

	}


	}


	$query = $db->simple_select('questions', 'qid, shown', 'active=1', array('limit' => 1, 'order_by' => $order_by));

	$query = $db->simple_select('questions', 'qid, shown', "active=1{$excl_old}", array('limit' => 1, 'order_by' => $order_by));

	$question = $db->fetch_array($query);

if(!$db->num_rows($query))

	$question = $db->fetch_array($query);

if(!$db->num_rows($query))