You are here

public function backup_migrate_destination_dropbox::get_display_location in Backup and Migrate Dropbox 7.2

Same name and namespace in other branches
  1. 7.3 destinations.dropbox.inc \backup_migrate_destination_dropbox::get_display_location()

We override to insert /home/Apps/{App name} between host and path.

File

./destinations.dropbox.inc, line 299
destinations.dropbox.inc

Class

backup_migrate_destination_dropbox
A destination for sending database backups to a Dropbox account.

Code

public function get_display_location() {
  $result = parent::get_display_location();
  $host = $this->dest_url['host'];
  if (($pos = strpos($result, $host)) !== FALSE) {
    $pos += strlen($host);
    $app_name = $this
      ->settings('app_name') ? $this
      ->settings('app_name') : '{App name}';
    $result = substr($result, 0, $pos) . '/home/Apps/' . $app_name . substr($result, $pos);
  }
  return $result;
}