xoops forums

aerograf

Not too shy to talk
Posted on: 5/8 16:31
aerograf
aerograf (Show more)
Not too shy to talk
Posts: 149
Since: 1/7 19:01
#1

Xoopspoll

The question concerns the voting of the guests.
He issued permits, but the guests can not vote.
Module: https://github.com/XoopsModules25x/xoopspoll
XOOPS 2.5.8.1
Where should I look?

aerograf

Not too shy to talk
Posted on: 5/9 11:21
aerograf
aerograf (Show more)
Not too shy to talk
Posts: 149
Since: 1/7 19:01
#2

Re: Xoopspoll

File: class/poll.php
Approximately on line 124:
|| (XoopspollConstants :: ANONYMOUS_VOTING_ALLOWED === $ this-> getVar ('anonymous'))

Lead to the form:
|| (XoopspollConstants :: ANONYMOUS_VOTING_ALLOWED === (int) $ this-> getVar ('anonymous'))

Now there is a question about the voting with multiple choice.

aerograf

Not too shy to talk
Posted on: 5/9 11:35
aerograf
aerograf (Show more)
Not too shy to talk
Posts: 149
Since: 1/7 19:01
#3

Re: Xoopspoll

And in the continuation ...
Questions on the module so far removed.
In the same file, about 156 lines:
&& ((XoopspollConstants :: MULTIPLE_SELECT_LIMITLESS === $ this-> getVar ('multilimit'))

replaced by:
&& ((XoopspollConstants :: MULTIPLE_SELECT_LIMITLESS === (int) $ this-> getVar ('multilimit'))

aerograf

Not too shy to talk
Posted on: 5/9 12:12
aerograf
aerograf (Show more)
Not too shy to talk
Posts: 149
Since: 1/7 19:01
#4

Re: Xoopspoll

For blocks in the files block / multipoll.php and block / singlepoll.php the line:
If (XoopspollConstants :: MULTIPLE_SELECT_POLL === $ pollVars ['multiple']) {

Fix it for:
If (XoopspollConstants :: MULTIPLE_SELECT_POLL === (int) $ pollVars ['multiple']) {

zyspec

Module Developer
Posted on: 5/9 22:25
zyspec
zyspec (Show more)
Module Developer
Posts: 1015
Since: 2004/9/21
#5

Re: Xoopspoll

You'll find the same issue in ./blocks/singlepoll.php around line 120
if (XoopspollConstants::MULTIPLE_SELECT_POLL === $pollVars['multiple']) {

should be:
if (XoopspollConstants::MULTIPLE_SELECT_POLL === (int) $pollVars['multiple']) {


These regressions were introduced in commit 8bf75c0 by introduction of exact (type) checking.

aerograf

Not too shy to talk
Posted on: 5/10 4:26
aerograf
aerograf (Show more)
Not too shy to talk
Posts: 149
Since: 1/7 19:01
#6

Re: Xoopspoll

Above is written the same.
Most likely, these errors pop up due to different versions of PHP. There is simply no other explanation ...

zyspec

Module Developer
Posted on: 5/10 14:45
zyspec
zyspec (Show more)
Module Developer
Posts: 1015
Since: 2004/9/21
#7

Re: Xoopspoll

Sorry, I missed that you had included that one above...

just wanted to make sure you found them all.