Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
@@ -35,6 +35,20 @@ class _Upgrade
|
||||
$limit = intval( \IPS\Request::i()->extra );
|
||||
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
|
||||
|
||||
/* If this is the first cycle, make sure votes column can hold all the votes:
|
||||
@link https://community.invisionpower.com/4bugtrack/active-reports/348-to-40121-upgrade-error-out-of-range-value-for-column-votes-r7649/ */
|
||||
if( $limit === 0 )
|
||||
{
|
||||
\IPS\Db::i()->changeColumn( 'core_polls', 'votes', array(
|
||||
'name' => 'votes',
|
||||
'type' => 'mediumint',
|
||||
'length' => null,
|
||||
'unsigned' => false,
|
||||
'allow_null' => false,
|
||||
'default' => "0"
|
||||
) );
|
||||
}
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_polls', NULL, 'pid ASC', array( $limit, $perCycle ) ) as $poll )
|
||||
{
|
||||
if( $cutOff !== null AND time() >= $cutOff )
|
||||
|
||||
Reference in new issue
Block a user