9
@irmtfan,
Quote:
because i have 2 xoopspoll in my website and now one can select them in newbb > preferences.
Q: is this good to make it selectable? or just make it selectable for one time?
I'm not sure this is the best way. This could cause serious problems with operation if an Administrator changes this later. Here's a scenario to consider:
Install newbb and xoopspollSet xoopspoll as the poll module in newbb PreferencesCreate 3 or 4 polls in xoopspoll through newbb topicsInstall umfrage moduleCreate 2 polls in umfrage.Set umfrage as poll module in newbb PreferencesThe first few newbb topics with polls will now have the umfrage poll associated with the topic instead of the xoopspoll poll that was originally created for that topic. The last few newbb topics will not have a poll even though the newbb tables think that it does since a poll with that poll_id will not exist in umfrage.
Unfortunately there's several other combinations of failure modes in newbb between umfrage and xoopspoll if they're both installed but I think making the Preferences setting of poll module increases the likelyhood that something will go wrong.
Ideally we should probably create a 'poll_mid' column associated with the poll in the 'bb_topics' table so we can make sure the modules only modify polls associated with that particular module. This would simplify managing polls between modules. If we had this table column then having a Preferences setting to select a poll module would be fine.
Quote:
Thru my tests I found this issue in xoopspoll/class/poll.php around line 285 function renderForm. to solve it I add a $extra:
Thanks for not only testing but helping find a solution. I've added an 'extra' fix to the class poll. I modified it slightly from the example above to provide a little more sanitation on the $addHidden var and to also make sure that 'op' and 'poll_id' aren't overwritten. I will check this into SVN soon and will be in the next release.