kopia lustrzana https://github.com/nextcloud/social
fixing some conversion
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>pull/627/head
rodzic
a7f7c0368d
commit
7fccfc2325
lib
|
@ -804,7 +804,9 @@ class LocalController extends Controller {
|
|||
$this->cacheActorService->setViewer($this->viewer);
|
||||
} catch (Exception $e) {
|
||||
if ($exception) {
|
||||
throw new AccountDoesNotExistException();
|
||||
throw new AccountDoesNotExistException(
|
||||
'unable to initViewer - ' . get_class($e) . ' - ' . $e->getMessage()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -165,6 +165,12 @@ class NavigationController extends Controller {
|
|||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$this->configService->getSocialUrl();
|
||||
} catch (SocialAppConfigException $e) {
|
||||
$this->configService->setSocialUrl('');
|
||||
}
|
||||
|
||||
if ($data['serverData']['isAdmin']) {
|
||||
$checks = $this->checkService->checkDefault();
|
||||
$data['serverData']['checks'] = $checks;
|
||||
|
|
|
@ -367,10 +367,14 @@ class ConfigService {
|
|||
|
||||
/**
|
||||
* @param string $url
|
||||
*
|
||||
* @throws SocialAppConfigException
|
||||
*/
|
||||
public function setSocialUrl(string $url = '') {
|
||||
if ($url === '') {
|
||||
$url = $this->urlGenerator->linkToRoute('social.Navigation.navigate');
|
||||
$url = $this->getCloudUrl() . $this->urlGenerator->linkToRoute(
|
||||
'social.Navigation.navigate'
|
||||
);
|
||||
}
|
||||
|
||||
$this->setAppValue(self::SOCIAL_URL, $url);
|
||||
|
|
|
@ -337,7 +337,7 @@ class CurlService {
|
|||
|
||||
$request = new Request($path, Request::TYPE_POST);
|
||||
$request->setAddress($this->configService->getCloudHost());
|
||||
$request->setProtocol($this->get('scheme', parse_url($address, PHP_URL_SCHEME), 'https'));
|
||||
$request->setProtocol(parse_url($address, PHP_URL_SCHEME));
|
||||
|
||||
try {
|
||||
$this->request($request);
|
||||
|
|
Ładowanie…
Reference in New Issue