1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-22 14:13:03 +02:00

Fixes #1449 - Polls failing in PHP7 and Multiple options voting not functioning.

This commit is contained in:
Cameron
2016-03-23 16:43:41 -07:00
parent 1c16094dea
commit 8282802d5e
8 changed files with 399 additions and 233 deletions

View File

@@ -179,7 +179,7 @@ if($thread->message)
//{
if(e107::isInstalled('poll'))
{
$_qry = 'SELECT * FROM `#polls` WHERE `poll_datestamp` = ' . $thread->threadId;
$_qry = 'SELECT p.*, u.user_id, u.user_name FROM `#polls` AS p LEFT JOIN `#user` AS u ON p.poll_admin_id = u.user_id WHERE p.poll_datestamp = ' . $thread->threadId;
if($sql->gen($_qry))
{
if (!defined('POLLCLASS'))

View File

@@ -60,6 +60,16 @@ $FORUM_POLL_TEMPLATE['results']['end'] = "
";
/* v2.x template for polls when user HAS been denied the ability to vote (userclass) */
$FORUM_POLL_TEMPLATE['denied']['start'] = $FORUM_POLL_TEMPLATE['results']['start'];
$FORUM_POLL_TEMPLATE['denied']['item'] = $FORUM_POLL_TEMPLATE['results']['item'];
$FORUM_POLL_TEMPLATE['denied']['end'] = "<div class='alert text-warning text-center'>{DISALLOWMESSAGE}</div>
<div class='text-center'><small>{VOTE_TOTAL}</small></div>
{COMMENTS} {OLDPOLLS}
</div>
</div>
";