Changeset 3603 for trunk/wp-content/plugins/wp-db-backup.php
- Timestamp:
- 03/03/2006 05:19:05 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/wp-content/plugins/wp-db-backup.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/plugins/wp-db-backup.php
r3517 r3603 104 104 105 105 function build_backup_script() { 106 global $ table_prefix, $wpdb;106 global $wpdb; 107 107 108 108 $datum = date("Ymd_B"); 109 $backup_filename = DB_NAME . "_$table_prefix$datum.sql";109 $backup_filename = DB_NAME . '_' . $wpdb->table_prefix . $datum . '.sql'; 110 110 if ($this->gzip()) $backup_filename .= '.gz'; 111 111 … … 224 224 225 225 function backup_fragment($table, $segment, $filename) { 226 global $ table_prefix, $wpdb;226 global $wpdb; 227 227 228 228 echo "$table:$segment:$filename"; … … 556 556 //////////////////////////// 557 557 function db_backup($core_tables, $other_tables) { 558 global $ table_prefix, $wpdb;558 global $wpdb; 559 559 560 560 $datum = date("Ymd_B"); 561 $wp_backup_filename = DB_NAME . "_$table_prefix$datum.sql";561 $wp_backup_filename = DB_NAME . '_' . $wpdb->table_prefix . $datum . '.sql'; 562 562 if ($this->gzip()) { 563 563 $wp_backup_filename .= '.gz'; … … 673 673 //////////////////////////// 674 674 function backup_menu() { 675 global $ table_prefix, $wpdb;675 global $wpdb; 676 676 $feedback = ''; 677 677 $WHOOPS = FALSE; … … 721 721 $wp_table_names = explode(',','categories,comments,linkcategories,links,options,post2cat,postmeta,posts,users,usermeta'); 722 722 // Apply WP DB prefix to table names 723 $wp_table_names = array_map(create_function('$a', 'global $ table_prefix;return "{$table_prefix}{$a}";'), $wp_table_names);723 $wp_table_names = array_map(create_function('$a', 'global $wpdb;return "{$wpdb->table_prefix}{$a}";'), $wp_table_names); 724 724 725 725 $other_tables = array(); … … 865 865 } 866 866 867 global $ table_prefix, $wpdb;867 global $wpdb; 868 868 869 869 $wp_table_names = explode(',','categories,comments,linkcategories,links,options,post2cat,postmeta,posts,users,usermeta'); 870 $wp_table_names = array_map(create_function('$a', 'global $ table_prefix;return "{$table_prefix}{$a}";'), $wp_table_names);870 $wp_table_names = array_map(create_function('$a', 'global $wpdb;return "{$wpdb->table_prefix}{$a}";'), $wp_table_names); 871 871 $all_tables = $wpdb->get_results("SHOW TABLES", ARRAY_N); 872 872 $all_tables = array_map(create_function('$a', 'return $a[0];'), $all_tables);
Note: See TracChangeset
for help on using the changeset viewer.