Version 4.0.13.1
This commit is contained in:
1 parent
f9e857d255
commit
c6a86f0d9b
7517 files changed
+597400
-668041
No files matched your search
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Upgrader: Pre-upgrade check
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 27 Feb 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
/* Clear settings store in case we've already been here */
|
||||
unset( \IPS\Data\Store::i()->settings );
|
||||
|
||||
/* Do this the easy way first... */
|
||||
if( isset( \IPS\Settings::i()->gb_char_set ) AND ! empty( \IPS\Settings::i()->gb_char_set ) AND mb_strtolower( \IPS\Settings::i()->gb_char_set ) !== 'utf-8' )
|
||||
{
|
||||
$output = \IPS\Theme::i()->getTemplate( 'global' )->convertUtf8();
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check for non-UTF8 database tables */
|
||||
$convert = FALSE;
|
||||
$prefix = \IPS\Db::i()->prefix;
|
||||
$tables = \IPS\Db::i()->query( "SHOW TABLES LIKE '{$prefix}%';" );
|
||||
while ( $table = $tables->fetch_assoc() )
|
||||
{
|
||||
$tableName = array_pop( $table );
|
||||
|
||||
if( mb_strpos( $tableName, "orig_" ) === 0 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if( mb_strpos( $tableName, "x_utf_" ) === 0 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Ticket 909929 - SHOW TABLES LIKE 'ibf_%' can match tables like ibf3_table_name */
|
||||
if ( $prefix and mb_strpos( $tableName, $prefix ) === FALSE )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$definition = \IPS\Db::i()->getTableDefinition( preg_replace( '/^' . $prefix . '/', '', $tableName ), FALSE, TRUE );
|
||||
|
||||
if( isset( $definition['collation'] ) AND mb_strtolower( mb_substr( $definition['collation'], 0, 4 ) !== 'utf8' ) )
|
||||
{
|
||||
$convert = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
$columns = \IPS\Db::i()->query( "SHOW FULL COLUMNS FROM `{$tableName}`;" );
|
||||
|
||||
while ( $column = $columns->fetch_assoc() )
|
||||
{
|
||||
if ( $column['Collation'] and mb_strtolower( mb_substr( $column['Collation'], 0, 4 ) !== 'utf8' ) )
|
||||
{
|
||||
$convert = TRUE;
|
||||
break 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $convert === TRUE )
|
||||
{
|
||||
$output = \IPS\Theme::i()->getTemplate( 'global' )->convertUtf8();
|
||||
}
|
||||
Whitespace-only changes.
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Upgrader: Custom Upgrade Options
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 5 Jun 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
$options = array();
|
||||
|
||||
/* Do any admins have ACP restrictions? */
|
||||
if( \IPS\Db::i()->select( 'COUNT(*)', 'admin_permission_rows' )->first() )
|
||||
{
|
||||
$members = array();
|
||||
|
||||
foreach( \IPS\Db::i()->select( 'member_id, email, members_display_name', 'admin_permission_rows', array( 'row_id_type=?', 'member' ) )->join( 'members', 'member_id=row_id' ) as $member )
|
||||
{
|
||||
$members[ $member['member_id'] ] = $member['members_display_name'];
|
||||
}
|
||||
|
||||
foreach( \IPS\Db::i()->select( 'row_id', 'admin_permission_rows', array( 'row_id_type=?', 'group' ) ) as $group )
|
||||
{
|
||||
$group = (int) $group;
|
||||
|
||||
foreach( \IPS\Db::i()->select( 'member_id, email, members_display_name', 'members', "member_group_id={$group} or mgroup_others like'%,{$group},%'" ) as $member )
|
||||
{
|
||||
$members[ $member['member_id'] ] = $member['members_display_name'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Get the list of admins here to display and then output */
|
||||
$options[] = new \IPS\Helpers\Form\Custom( '40000_acp_restrictions', null, FALSE, array( 'getHtml' => function( $element ) use ( $members ){
|
||||
return "ACP restrictions cannot be converted during the upgrade. Please log in and review ACP restrictions for the following users once the upgrade is complete:<br><ul class='ipsField_fieldList ipsField_fieldList_content ipsList_bullets'><li>" . implode( '</li><li>', $members ) . "</li></ul>";
|
||||
} ), function( $val ) {}, NULL, NULL, '40000_acp_restrictions' );
|
||||
}
|
||||
|
||||
$options[] = new \IPS\Helpers\Form\Radio( '40000_username_or_displayname', 'display_name', TRUE, array( 'options' => array( 'name' => '40000_name', 'display_name' => '40000_display_name' ) ) );
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user