mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-02 11:26:04 +01:00
Fix for port in Backup download URL
This commit is contained in:
@@ -1388,7 +1388,7 @@ class AdminController extends AdminBaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$download = urlencode(base64_encode($backup));
|
$download = urlencode(base64_encode($backup));
|
||||||
$url = rtrim($this->grav['uri']->rootUrl(true), '/') . '/' . trim($this->admin->base,
|
$url = rtrim($this->grav['uri']->rootUrl(false), '/') . '/' . trim($this->admin->base,
|
||||||
'/') . '/task' . $param_sep . 'backup/download' . $param_sep . $download . '/admin-nonce' . $param_sep . Utils::getNonce('admin-form');
|
'/') . '/task' . $param_sep . 'backup/download' . $param_sep . $download . '/admin-nonce' . $param_sep . Utils::getNonce('admin-form');
|
||||||
|
|
||||||
$log->content([
|
$log->content([
|
||||||
@@ -1446,30 +1446,7 @@ class AdminController extends AdminBaseController
|
|||||||
'message' => $this->admin->translate('PLUGIN_ADMIN.BACKUP_NOT_FOUND'),
|
'message' => $this->admin->translate('PLUGIN_ADMIN.BACKUP_NOT_FOUND'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$download = urlencode(base64_encode($backup));
|
|
||||||
$url = rtrim($this->grav['uri']->rootUrl(true), '/') . '/' . trim($this->admin->base,
|
|
||||||
'/') . '/task' . $param_sep . 'backup/download' . $param_sep . $download . '/admin-nonce' . $param_sep . Utils::getNonce('admin-form');
|
|
||||||
|
|
||||||
$log->content([
|
|
||||||
'time' => time(),
|
|
||||||
'location' => $backup
|
|
||||||
]);
|
|
||||||
$log->save();
|
|
||||||
|
|
||||||
$this->admin->json_response = [
|
|
||||||
'status' => 'success',
|
|
||||||
'message' => $this->admin->translate('PLUGIN_ADMIN.YOUR_BACKUP_IS_READY_FOR_DOWNLOAD') . '. <a href="' . $url . '" class="button">' . $this->admin->translate('PLUGIN_ADMIN.DOWNLOAD_BACKUP') . '</a>',
|
|
||||||
'toastr' => [
|
|
||||||
'timeOut' => 0,
|
|
||||||
'extendedTimeOut' => 0,
|
|
||||||
'closeButton' => true
|
|
||||||
]
|
|
||||||
];
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user