Vergleich admin/modules/tools/backupdb.php - 1.6.9 - 1.6.17

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 187Zeile 187
		$header = "-- MyBB Database Backup\n-- Generated: {$time}\n-- -------------------------------------\n\n";
$contents = $header;
foreach($mybb->input['tables'] as $table)

		$header = "-- MyBB Database Backup\n-- Generated: {$time}\n-- -------------------------------------\n\n";
$contents = $header;
foreach($mybb->input['tables'] as $table)

		{			





		{
if(!$db->table_exists($db->escape_string($table)))
{
continue;
}

			if($mybb->input['analyzeoptimize'] == 1)
{
$db->optimize_table($table);

			if($mybb->input['analyzeoptimize'] == 1)
{
$db->optimize_table($table);

Zeile 294Zeile 298
		var select_box = document.getElementById('table_select');

for(var i = 0; i < select_box.length; i++)

		var select_box = document.getElementById('table_select');

for(var i = 0; i < select_box.length; i++)

		{

		{

			if(action == 'select')
{
select_box[i].selected = true;
}
else if(action == 'deselect')

			if(action == 'select')
{
select_box[i].selected = true;
}
else if(action == 'deselect')

			{

			{

				select_box[i].selected = false;
}
else if(action == 'forum' && prefix != 0)

				select_box[i].selected = false;
}
else if(action == 'forum' && prefix != 0)

Zeile 319Zeile 323
	
$page->add_breadcrumb_item($lang->new_database_backup);
$page->output_header($lang->new_database_backup);

	
$page->add_breadcrumb_item($lang->new_database_backup);
$page->output_header($lang->new_database_backup);

	
$sub_tabs['database_backup'] = array(
'title' => $lang->database_backups,

	
$sub_tabs['database_backup'] = array(
'title' => $lang->database_backups,

		'link' => "index.php?module=tools-backupdb"
);


		'link' => "index.php?module=tools-backupdb"
);


Zeile 332Zeile 336
	);

$page->output_nav_tabs($sub_tabs, 'new_backup');

	);

$page->output_nav_tabs($sub_tabs, 'new_backup');

	

	

	// Check if file is writable, before allowing submission
if(!is_writable(MYBB_ADMIN_DIR."/backups"))
{

	// Check if file is writable, before allowing submission
if(!is_writable(MYBB_ADMIN_DIR."/backups"))
{

Zeile 348Zeile 352
	$table_selects = array();
$table_list = $db->list_tables($config['database']['database']);
foreach($table_list as $id => $table_name)

	$table_selects = array();
$table_list = $db->list_tables($config['database']['database']);
foreach($table_list as $id => $table_name)

	{

	{

		$table_selects[$table_name] = $table_name;
}


		$table_selects[$table_name] = $table_name;
}


Zeile 399Zeile 403
	$backups = array();
$dir = MYBB_ADMIN_DIR.'backups/';
$handle = opendir($dir);

	$backups = array();
$dir = MYBB_ADMIN_DIR.'backups/';
$handle = opendir($dir);

	while(($file = readdir($handle)) !== false)


	
if($handle !== false)

	{

	{

		if(filetype(MYBB_ADMIN_DIR.'backups/'.$file) == 'file')

		while(($file = readdir($handle)) !== false)

		{

		{

			$ext = get_extension($file);
if($ext == 'gz' || $ext == 'sql')

			if(filetype(MYBB_ADMIN_DIR.'backups/'.$file) == 'file')


			{

			{

				$backups[@filemtime(MYBB_ADMIN_DIR.'backups/'.$file)] = array(
"file" => $file,
"time" => @filemtime(MYBB_ADMIN_DIR.'backups/'.$file),
"type" => $ext
);





				$ext = get_extension($file);
if($ext == 'gz' || $ext == 'sql')
{
$backups[@filemtime(MYBB_ADMIN_DIR.'backups/'.$file)] = array(
"file" => $file,
"time" => @filemtime(MYBB_ADMIN_DIR.'backups/'.$file),
"type" => $ext
);
}

			}
}

			}
}

 
		closedir($handle);

	}

$count = count($backups);

	}

$count = count($backups);