public function backup_migrate_destination_db::lock_tables in Backup and Migrate 7.3
Same name and namespace in other branches
- 8.2 includes/destinations.db.inc \backup_migrate_destination_db::lock_tables()
- 8.3 includes/destinations.db.inc \backup_migrate_destination_db::lock_tables()
- 6.2 includes/destinations.db.inc \backup_migrate_destination_db::lock_tables()
- 7.2 includes/destinations.db.inc \backup_migrate_destination_db::lock_tables()
Lock the database in anticipation of a backup.
File
- includes/
destinations.db.inc, line 276 - Functions to handle the direct to database destination.
Class
- backup_migrate_destination_db
- A destination type for saving to a database server.
Code
public function lock_tables($settings) {
if ($settings->filters['utils_lock_tables']) {
$tables = array();
foreach ($this
->get_table_names() as $table) {
// There's no need to lock excluded or structure only tables because it doesn't matter if they change.
if (empty($settings->filters['exclude_tables']) || !in_array($table, (array) $settings->filters['exclude_tables'])) {
$tables[] = $table;
}
}
$this
->_lock_tables($tables);
}
}