diff options
author | Michiel de Jong <michiel@unhosted.org> | 2012-05-17 21:01:42 +0200 |
---|---|---|
committer | Michiel de Jong <michiel@unhosted.org> | 2012-05-17 21:01:42 +0200 |
commit | f998ed331a6695b522fce74ef83bc945a9a114ea (patch) | |
tree | 8a889514794f0583a6c177091b9f1e3ec756070c /apps | |
parent | 3e454d345950a33a25312a3a47ee7705b0034385 (diff) | |
download | nextcloud-server-f998ed331a6695b522fce74ef83bc945a9a114ea.tar.gz nextcloud-server-f998ed331a6695b522fce74ef83bc945a9a114ea.zip |
removing dead code
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_webfinger/host-meta.php | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/apps/user_webfinger/host-meta.php b/apps/user_webfinger/host-meta.php index 285caaa1278..d0d4999c1be 100644 --- a/apps/user_webfinger/host-meta.php +++ b/apps/user_webfinger/host-meta.php @@ -3,22 +3,7 @@ $hostMetaHeader = array( 'Access-Control-Allow-Origin' => '*', 'Content-Type' => 'application/xrd+json' ); -$ownCloudDir = dirname(dirname(dirname(__FILE__))); -$docRoot = $_SERVER['DOCUMENT_ROOT']; -try { - $webRoot = substr(realpath($ownCloudDir), strlen(realpath($docRoot))); -} catch(Exception $e) { - // some servers fail on realpath(), let's try it the unsecure way: - $webRoot = substr($ownCloudDir, strlen($docRoot)); -} $serverName = $_SERVER['SERVER_NAME']; -$lrddTmpl = 'http'; -if(isset($_SERVER['HTTPS'])) { - $lrddTmpl .= 's'; -} -$lrddTmpl .= '://' . $serverName . $webRoot . '/public.php?service=webfinger&q={uri}'; -$hostMetaPath = $docRoot . '/.well-known/host-meta'; -$hostMetaDir = $docRoot . '/.well-known'; $hostMetaContents = "{\"links\":[{\"rel\":\"lrdd\",\"template\":\"http'.(isset($_SERVER['HTTPS'])?'s':'').'://'.$serverName.'/public.php?service=webfinger&q={uri}\"}]}"; foreach($hostMetaHeader as $header => $value) { header($header . ": " . $value); |