mirror of
https://github.com/Terranom674/Piwigo_Bratonien_Tools.git
synced 2026-09-19 19:54:31 +00:00
0.9.7.1: scan remote Nextcloud through resolved IP transport
This commit is contained in:
@@ -28,7 +28,7 @@ function bratonien_tools_nc_wizard_scan_webdav_first()
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$response = bratonien_tools_nc_wizard_http($candidate_url.'/status.php');
|
$response = bratonien_tools_nc_transport_http($candidate_url.'/status.php');
|
||||||
if ($response['status'] < 200 || $response['status'] >= 300) continue;
|
if ($response['status'] < 200 || $response['status'] >= 300) continue;
|
||||||
$candidate_status = json_decode($response['body'], true);
|
$candidate_status = json_decode($response['body'], true);
|
||||||
if (!is_array($candidate_status) || empty($candidate_status['installed'])) continue;
|
if (!is_array($candidate_status) || empty($candidate_status['installed'])) continue;
|
||||||
@@ -44,7 +44,7 @@ function bratonien_tools_nc_wizard_scan_webdav_first()
|
|||||||
throw new RuntimeException('Unter dieser Adresse konnte keine Nextcloud erreicht werden. HTTP und HTTPS wurden automatisch geprüft.');
|
throw new RuntimeException('Unter dieser Adresse konnte keine Nextcloud erreicht werden. HTTP und HTTPS wurden automatisch geprüft.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$user_response = bratonien_tools_nc_wizard_http(
|
$user_response = bratonien_tools_nc_transport_http(
|
||||||
$base_url.'/ocs/v2.php/cloud/user?format=json',
|
$base_url.'/ocs/v2.php/cloud/user?format=json',
|
||||||
$username,
|
$username,
|
||||||
$password,
|
$password,
|
||||||
@@ -104,7 +104,7 @@ function bratonien_tools_nc_wizard_scan_webdav_first()
|
|||||||
'api_error'=>'',
|
'api_error'=>'',
|
||||||
));
|
));
|
||||||
|
|
||||||
bratonien_tools_nc_wizard_refresh_directory_state($state, '');
|
bratonien_tools_nc_transport_refresh_directory_state($state, '');
|
||||||
bratonien_tools_nc_wizard_store($state);
|
bratonien_tools_nc_wizard_store($state);
|
||||||
|
|
||||||
return array('message'=>'Nextcloud und WebDAV wurden bestätigt. Jetzt können die Verzeichnisse des angemeldeten Benutzers ausgewählt werden.');
|
return array('message'=>'Nextcloud und WebDAV wurden bestätigt. Jetzt können die Verzeichnisse des angemeldeten Benutzers ausgewählt werden.');
|
||||||
|
|||||||
Reference in New Issue
Block a user