Vergleich admin/modules/tools/system_health.php - 1.4.4 - 1.4.15

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: index.php 3554 2007-12-16 06:06:35Z Tikitiki $

 * $Id: system_health.php 5379 2011-02-21 11:06:42Z Tomm $

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 23Zeile 23
{
$plugins->run_hooks("admin_tools_system_health_utf8_conversion");


{
$plugins->run_hooks("admin_tools_system_health_utf8_conversion");


	if($db->type == "sqlite2" || $db->type == "sqlite3")

	if($db->type == "sqlite2" || $db->type == "sqlite3" || $db->type == "pgsql")

	{
flash_message($lang->error_not_supported, 'error');
admin_redirect("index.php?module=tools/system_health");

	{
flash_message($lang->error_not_supported, 'error');
admin_redirect("index.php?module=tools/system_health");

Zeile 96Zeile 96
			'varchar' => 'varbinary',
'tinytext' => 'tinyblob'
);

			'varchar' => 'varbinary',
'tinytext' => 'tinyblob'
);

 
		
$blob_types = array( 'blob', 'tinyblob', 'mediumblog', 'longblob', 'text', 'tinytext', 'mediumtext', 'longtext' );

		
// Get next table in list
$convert_to_binary = '';

		
// Get next table in list
$convert_to_binary = '';

Zeile 115Zeile 117
				case "mysqli":
preg_match_all("#FULLTEXT KEY `?([a-zA-Z0-9_]+)`? \(([a-zA-Z0-9_`,']+)\)#i", $table_structure, $matches);
if(is_array($matches))

				case "mysqli":
preg_match_all("#FULLTEXT KEY `?([a-zA-Z0-9_]+)`? \(([a-zA-Z0-9_`,']+)\)#i", $table_structure, $matches);
if(is_array($matches))

					{

					{

						foreach($matches[0] as $key => $matched)
{
$db->write_query("ALTER TABLE {$mybb->input['table']} DROP INDEX {$matches[1][$key]}");
$fulltext_to_create[$matches[1][$key]] = $matches[2][$key];

						foreach($matches[0] as $key => $matched)
{
$db->write_query("ALTER TABLE {$mybb->input['table']} DROP INDEX {$matches[1][$key]}");
$fulltext_to_create[$matches[1][$key]] = $matches[2][$key];

						}
}

						}
}

			}
}


			}
}


Zeile 135Zeile 137
				// Build the actual strings for converting the columns
$names = "CHANGE `{$column['Field']}` `{$column['Field']}` ";


				// Build the actual strings for converting the columns
$names = "CHANGE `{$column['Field']}` `{$column['Field']}` ";


				$attributes = " DEFAULT ";
if($column['Default'] == 'NULL')

				if(($db->type == 'mysql' || $db->type == 'mysqli') && in_array($type, $blob_types))


				{

				{

					$attributes .= "NULL ";








					if($column['Null'] == 'YES')
{
$attributes = 'NULL';
}
else
{
$attributes = 'NOT NULL';
}

				}
else
{

				}
else
{

					$attributes .= "'".$db->escape_string($column['Default'])."' ";

if($column['Null'] == 'YES')
{
$attributes .= 'NULL';
}

					$attributes = " DEFAULT ";
if($column['Default'] == 'NULL')
{
$attributes .= "NULL ";
}


					else
{

					else
{

						$attributes .= 'NOT NULL';










						$attributes .= "'".$db->escape_string($column['Default'])."' ";

if($column['Null'] == 'YES')
{
$attributes .= 'NULL';
}
else
{
$attributes .= 'NOT NULL';
}

					}
}

					}
}

				



				$convert_to_binary .= $comma.$names.preg_replace('/'.$type.'/i', $types[$type], $column['Type']).$attributes;
$convert_to_utf8 .= "{$comma}{$names}{$column['Type']} CHARACTER SET utf8 COLLATE utf8_general_ci{$attributes}";


				$convert_to_binary .= $comma.$names.preg_replace('/'.$type.'/i', $types[$type], $column['Type']).$attributes;
$convert_to_utf8 .= "{$comma}{$names}{$column['Type']} CHARACTER SET utf8 COLLATE utf8_general_ci{$attributes}";