]> source.dussan.org Git - nextcloud-server.git/commitdiff
removing dead code
authorMichiel de Jong <michiel@unhosted.org>
Thu, 17 May 2012 19:01:42 +0000 (21:01 +0200)
committerMichiel de Jong <michiel@unhosted.org>
Thu, 17 May 2012 19:01:42 +0000 (21:01 +0200)
apps/user_webfinger/host-meta.php

index 285caaa1278f4991aedd8fb9aad07cb771f84994..d0d4999c1be5cd9c83da9b380f142c0139cbd4a3 100644 (file)
@@ -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);