From: Michiel@unhosted Date: Mon, 12 Sep 2011 13:17:52 +0000 (+0200) Subject: offer login popup from oauth dialog X-Git-Tag: v3.0~210 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fb96256c63e546ff17ee01dfd407d7c1a6aa268a;p=nextcloud-server.git offer login popup from oauth dialog --- diff --git a/apps/unhosted/compat.php b/apps/unhosted/compat.php index 5e0f1a09010..5034d04de31 100644 --- a/apps/unhosted/compat.php +++ b/apps/unhosted/compat.php @@ -100,9 +100,16 @@ if(count($pathParts) >= 8 && $pathParts[0] == '' && $pathParts[2] == 'unhosted' $token=OC_UnhostedWeb::createDataScope($appUrl, $userAddress, $dataScope); header('Location: '.$_GET['redirect_uri'].'#access_token='.$token.'&token_type=unhosted'); } else { + if($_SERVER['HTTPS']){ + $url = "https://"; + } else { + $url = "http://"; + } + $url .= $_SERVER['SERVER_NAME']; + $url .= substr($_SERVER['SCRIPT_NAME'], 0, -strlen('apps/unhosted/compat.php')); die('Please ' .'' .', close the pop-up, and ' .'
');