Zeile 100 | Zeile 100 |
---|
}
$file = basename($mybb->input['file']);
|
}
$file = basename($mybb->input['file']);
|
| $ext = get_extension($file);
|
|
|
if(!trim($mybb->input['file']) || !file_exists(MYBB_ADMIN_DIR.'backups/'.$file))
| if(!trim($mybb->input['file']) || !file_exists(MYBB_ADMIN_DIR.'backups/'.$file) || filetype(MYBB_ADMIN_DIR.'backups/'.$file) != 'file' || ($ext != 'gz' && $ext != 'sql'))
|
{ flash_message($lang->error_backup_doesnt_exist, 'error'); admin_redirect("index.php?module=tools-backupdb");
| { flash_message($lang->error_backup_doesnt_exist, 'error'); admin_redirect("index.php?module=tools-backupdb");
|
Zeile 148 | Zeile 149 |
---|
}
@set_time_limit(0);
|
}
@set_time_limit(0);
|
| // create an array with table prefix appended for checks, as full table names are accepted $binary_fields_prefixed = array(); foreach($mybb->binary_fields as $table => $fields) { $binary_fields_prefixed[TABLE_PREFIX.$table] = $fields; }
|
if($mybb->input['method'] == 'disk') {
| if($mybb->input['method'] == 'disk') {
|
Zeile 198 | Zeile 206 |
---|
foreach($mybb->input['tables'] as $table) { if(!$db->table_exists($db->escape_string($table)))
|
foreach($mybb->input['tables'] as $table) { if(!$db->table_exists($db->escape_string($table)))
|
{
| {
|
continue;
|
continue;
|
}
| }
|
if($mybb->input['analyzeoptimize'] == 1) { $db->optimize_table($table);
| if($mybb->input['analyzeoptimize'] == 1) { $db->optimize_table($table);
|
Zeile 210 | Zeile 218 |
---|
$field_list = array(); $fields_array = $db->show_fields_from($table); foreach($fields_array as $field)
|
$field_list = array(); $fields_array = $db->show_fields_from($table); foreach($fields_array as $field)
|
{
| {
|
$field_list[] = $field['Field']; }
| $field_list[] = $field['Field']; }
|
Zeile 223 | Zeile 231 |
---|
if(isset($fp)) { clear_overflow($fp, $contents);
|
if(isset($fp)) { clear_overflow($fp, $contents);
|
}
| }
|
}
if($mybb->input['contents'] != 'structure')
| }
if($mybb->input['contents'] != 'structure')
|
Zeile 246 | Zeile 254 |
---|
if(!isset($row[$field]) || is_null($row[$field])) { $insert .= $comma."NULL";
|
if(!isset($row[$field]) || is_null($row[$field])) { $insert .= $comma."NULL";
|
} else if($db->engine == 'mysqli') { $insert .= $comma."'".mysqli_real_escape_string($db->read_link, $row[$field])."'";
| |
} else {
|
} else {
|
$insert .= $comma."'".$db->escape_string($row[$field])."'";
| if($db->engine == 'mysqli') { if(!empty($binary_fields_prefixed[$table][$field])) { $insert .= $comma."X'".mysqli_real_escape_string($db->read_link, bin2hex($row[$field]))."'"; } else { $insert .= $comma."'".mysqli_real_escape_string($db->read_link, $row[$field])."'"; } } else { if(!empty($binary_fields_prefixed[$table][$field])) { $insert .= $comma.$db->escape_binary($db->unescape_binary($row[$field])); } else { $insert .= $comma."'".$db->escape_string($row[$field])."'"; } }
|
} $comma = ','; }
| } $comma = ','; }
|