Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

+14 -14
View File
@@ -12,7 +12,7 @@
namespace IPS\blog\setup\upg_100002;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -53,7 +53,7 @@ class _Upgrade
*/
public function step2()
{
$limit = isset( \IPS\Request::i()->extra ) ? intval( \IPS\Request::i()->extra ) : 0;
$limit = isset( \IPS\Request::i()->extra ) ? \intval( \IPS\Request::i()->extra ) : 0;
$select = \IPS\Db::i()->select( '*', 'blog_polls', NULL, 'poll_id ASC', array( $limit, 1000 ) );
@@ -67,7 +67,7 @@ class _Upgrade
/* Sometimes data from 3.4.x isn't always as well formed as we'd like, especially when non-latin chars are involved */
$data = unserialize( $poll['choices'] );
if( !is_array( $data ) )
if( !\is_array( $data ) )
{
$poll['choices'] = str_replace( '\\"', '"', $poll['choices'] );
$data = unserialize( $poll['choices'] );
@@ -75,23 +75,23 @@ class _Upgrade
$_decoded = FALSE;
if( !is_array( $data ) )
if( !\is_array( $data ) )
{
$data = unserialize( utf8_decode( $poll['choices'] ) );
if( is_array( $data ) )
if( \is_array( $data ) )
{
$_decoded = TRUE;
}
}
if( is_array( $data ) AND $_decoded )
if( \is_array( $data ) AND $_decoded )
{
foreach( $data as $_key => $_data )
{
$data[ $_key ]['question'] = utf8_encode( $_data[ $_key ]['question'] );
if( is_array( $_data['choice'] ) )
if( \is_array( $_data['choice'] ) )
{
foreach( $_data['choice'] as $_idx => $_choice )
{
@@ -108,24 +108,24 @@ class _Upgrade
{
$data = unserialize( $poll['choices'] );
if( !is_array( $data ) )
if( !\is_array( $data ) )
{
$poll['choices'] = str_replace( '\\"', '"', $poll['choices'] );
$data = unserialize( $poll['choices'] );
}
if( !is_array( $data ) )
if( !\is_array( $data ) )
{
$data = unserialize( utf8_decode( $poll['choices'] ) );
}
if( is_array( $data ) )
if( \is_array( $data ) )
{
foreach( $data as $_key => $_data )
{
$data[ $_key ]['question'] = utf8_encode( $_data['question'] );
if( is_array( $_data['choice'] ) )
if( \is_array( $_data['choice'] ) )
{
foreach( $_data['choice'] as $_idx => $_choice )
{
@@ -166,7 +166,7 @@ class _Upgrade
*/
public function step2CustomTitle()
{
return "Upgrading polls...";
return "Upgrading polls";
}
/**
@@ -176,7 +176,7 @@ class _Upgrade
*/
public function step3()
{
$limit = isset( \IPS\Request::i()->extra ) ? intval( \IPS\Request::i()->extra ) : 0;
$limit = isset( \IPS\Request::i()->extra ) ? \intval( \IPS\Request::i()->extra ) : 0;
$select = \IPS\Db::i()->select( '*', 'blog_voters', NULL, 'vote_id ASC', array( $limit, 1000 ) );
@@ -211,6 +211,6 @@ class _Upgrade
*/
public function step3CustomTitle()
{
return "Upgrading polls...";
return "Upgrading poll voters";
}
}