diff options
author | Michiel de Jong <michiel@unhosted.org> | 2012-05-17 23:01:42 +0400 |
---|---|---|
committer | Michiel de Jong <michiel@unhosted.org> | 2012-05-17 23:01:42 +0400 |
commit | e7fb7775978575a386899cf130d0e6ac428fad87 (patch) | |
tree | c02bbed7b582d9380426e42050775357840daa7e /user_webfinger | |
parent | dc7ec62ff94eba24cfa1348273c2c9440cddec46 (diff) |
removing dead code
Diffstat (limited to 'user_webfinger')
-rw-r--r-- | user_webfinger/host-meta.php | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/user_webfinger/host-meta.php b/user_webfinger/host-meta.php index 285caaa12..d0d4999c1 100644 --- a/user_webfinger/host-meta.php +++ b/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); |