Vergleich polls.php - 1.6.11 - 1.6.12

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 246Zeile 246
				$optionslist .= '||~|~||';
$voteslist .= '||~|~||';
}

				$optionslist .= '||~|~||';
$voteslist .= '||~|~||';
}

			$optionslist .= trim(utf8_handle_4byte_string($options[$i]));

			$optionslist .= trim($options[$i]);

			$voteslist .= '0';
}
}

			$voteslist .= '0';
}
}

Zeile 259Zeile 259
	{
$timeout = 0;
}

	{
$timeout = 0;
}


$mybb->input['question'] = utf8_handle_4byte_string($mybb->input['question']);

 

$newpoll = array(
"tid" => $thread['tid'],


$newpoll = array(
"tid" => $thread['tid'],

Zeile 275Zeile 273
		"multiple" => $postoptions['multiple'],
"public" => $postoptions['public']
);

		"multiple" => $postoptions['multiple'],
"public" => $postoptions['public']
);





	$plugins->run_hooks("polls_do_newpoll_process");

$pid = $db->insert_query("polls", $newpoll);

	$plugins->run_hooks("polls_do_newpoll_process");

$pid = $db->insert_query("polls", $newpoll);

Zeile 285Zeile 283
	$plugins->run_hooks("polls_do_newpoll_end");

if($thread['visible'] == 1)

	$plugins->run_hooks("polls_do_newpoll_end");

if($thread['visible'] == 1)

	{

	{

		redirect(get_thread_link($thread['tid']), $lang->redirect_pollposted);
}
else

		redirect(get_thread_link($thread['tid']), $lang->redirect_pollposted);
}
else

Zeile 301Zeile 299
	$plugins->run_hooks("polls_editpoll_start");

$query = $db->simple_select("polls", "*", "pid='$pid'");

	$plugins->run_hooks("polls_editpoll_start");

$query = $db->simple_select("polls", "*", "pid='$pid'");

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

if(!$poll['pid'])
{

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

if(!$poll['pid'])
{

		error($lang->error_invalidpoll);
}


		error($lang->error_invalidpoll);
}


Zeile 382Zeile 380
			$option = $optionsarray[$i];
$option = htmlspecialchars_uni($option);
$optionvotes = intval($votesarray[$i]);

			$option = $optionsarray[$i];
$option = htmlspecialchars_uni($option);
$optionvotes = intval($votesarray[$i]);


if(!$optionvotes)
{
$optionvotes = 0;
}

eval("\$optionbits .= \"".$templates->get("polls_editpoll_option")."\";");


if(!$optionvotes)
{
$optionvotes = 0;
}

eval("\$optionbits .= \"".$templates->get("polls_editpoll_option")."\";");

			$option = "";
$optionvotes = "";
}

if(!$poll['timeout'])

			$option = "";
$optionvotes = "";
}

if(!$poll['timeout'])

		{

		{

			$timeout = 0;
}
else

			$timeout = 0;
}
else

Zeile 409Zeile 407
			$numoptions = $mybb->settings['maxpolloptions'];
}
elseif($mybb->input['numoptions'] < 2)

			$numoptions = $mybb->settings['maxpolloptions'];
}
elseif($mybb->input['numoptions'] < 2)

		{

		{

			$numoptions = "2";

			$numoptions = "2";

		}

		}

		else
{
$numoptions = $mybb->input['numoptions'];

		else
{
$numoptions = $mybb->input['numoptions'];

		}

		}

		$question = htmlspecialchars_uni($mybb->input['question']);

$postoptions = $mybb->input['postoptions'];
if($postoptions['multiple'] == 1)

		$question = htmlspecialchars_uni($mybb->input['question']);

$postoptions = $mybb->input['postoptions'];
if($postoptions['multiple'] == 1)

		{

		{

			$postoptionschecked['multiple'] = 'checked="checked"';
}


			$postoptionschecked['multiple'] = 'checked="checked"';
}


Zeile 430Zeile 428
		}

if($postoptions['closed'] == 1)

		}

if($postoptions['closed'] == 1)

		{

		{

			$postoptionschecked['closed'] = 'checked="checked"';
}


			$postoptionschecked['closed'] = 'checked="checked"';
}


Zeile 451Zeile 449

eval("\$optionbits .= \"".$templates->get("polls_editpoll_option")."\";");
$option = "";


eval("\$optionbits .= \"".$templates->get("polls_editpoll_option")."\";");
$option = "";

		}

		}


if($mybb->input['timeout'] > 0)
{
$timeout = $mybb->input['timeout'];


if($mybb->input['timeout'] > 0)
{
$timeout = $mybb->input['timeout'];

		}

		}

		else
{
$timeout = 0;
}
}

		else
{
$timeout = 0;
}
}





	$plugins->run_hooks("polls_editpoll_end");

eval("\$editpoll = \"".$templates->get("polls_editpoll")."\";");

	$plugins->run_hooks("polls_editpoll_end");

eval("\$editpoll = \"".$templates->get("polls_editpoll")."\";");

Zeile 473Zeile 471
{
// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

{
// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);





	$plugins->run_hooks("polls_do_editpoll_start");

	$plugins->run_hooks("polls_do_editpoll_start");





	$query = $db->simple_select("polls", "*", "pid='".intval($mybb->input['pid'])."'");
$poll = $db->fetch_array($query);

	$query = $db->simple_select("polls", "*", "pid='".intval($mybb->input['pid'])."'");
$poll = $db->fetch_array($query);





	if(!$poll['pid'])
{
error($lang->error_invalidpoll);

	if(!$poll['pid'])
{
error($lang->error_invalidpoll);

	}


	}


	$query = $db->simple_select("threads", "*", "poll='".intval($mybb->input['pid'])."'");
$thread = $db->fetch_array($query);
if(!$thread['tid'])

	$query = $db->simple_select("threads", "*", "poll='".intval($mybb->input['pid'])."'");
$thread = $db->fetch_array($query);
if(!$thread['tid'])

Zeile 515Zeile 513
	}

if($mybb->settings['maxpolloptions'] && $mybb->input['numoptions'] > $mybb->settings['maxpolloptions'])

	}

if($mybb->settings['maxpolloptions'] && $mybb->input['numoptions'] > $mybb->settings['maxpolloptions'])

	{

	{

		$numoptions = $mybb->settings['maxpolloptions'];
}
elseif(!$mybb->input['numoptions'])

		$numoptions = $mybb->settings['maxpolloptions'];
}
elseif(!$mybb->input['numoptions'])

Zeile 525Zeile 523
	else
{
$numoptions = $mybb->input['numoptions'];

	else
{
$numoptions = $mybb->input['numoptions'];

	}

	}


$postoptions = $mybb->input['postoptions'];
if($postoptions['multiple'] != '1')


$postoptions = $mybb->input['postoptions'];
if($postoptions['multiple'] != '1')

Zeile 550Zeile 548
		if(trim($options[$i]) != '')
{
$optioncount++;

		if(trim($options[$i]) != '')
{
$optioncount++;

		}

		}


if(my_strlen($options[$i]) > $mybb->settings['polloptionlimit'] && $mybb->settings['polloptionlimit'] != 0)
{
$lengtherror = 1;
break;


if(my_strlen($options[$i]) > $mybb->settings['polloptionlimit'] && $mybb->settings['polloptionlimit'] != 0)
{
$lengtherror = 1;
break;

		}
}


		}
}


	if($lengtherror)
{
error($lang->error_polloptiontoolong);

	if($lengtherror)
{
error($lang->error_polloptiontoolong);

	}


	}


	if(trim($mybb->input['question']) == '' || $optioncount < 2)
{
error($lang->error_noquestionoptions);

	if(trim($mybb->input['question']) == '' || $optioncount < 2)
{
error($lang->error_noquestionoptions);

	}


	}


	$optionslist = '';
$voteslist = '';
$numvotes = '';

	$optionslist = '';
$voteslist = '';
$numvotes = '';

Zeile 578Zeile 576
		if(trim($options[$i]) != '')
{
if($optionslist != '')

		if(trim($options[$i]) != '')
{
if($optionslist != '')

			{

			{

				$optionslist .= "||~|~||";
$voteslist .= "||~|~||";
}


				$optionslist .= "||~|~||";
$voteslist .= "||~|~||";
}


			$optionslist .= trim(utf8_handle_4byte_string($options[$i]));

			$optionslist .= trim($options[$i]);

			if(intval($votes[$i]) <= 0)
{
$votes[$i] = "0";

			if(intval($votes[$i]) <= 0)
{
$votes[$i] = "0";

Zeile 601Zeile 599
	{
$timeout = 0;
}

	{
$timeout = 0;
}


$mybb->input['question'] = utf8_handle_4byte_string($mybb->input['question']);

 

$updatedpoll = array(
"question" => $db->escape_string($mybb->input['question']),


$updatedpoll = array(
"question" => $db->escape_string($mybb->input['question']),