aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-08-01 21:02:25 -0700
committerFriendika <info@friendika.com>2011-08-01 21:02:25 -0700
commit2637831d9056862f7c3db718702116ef4652629a (patch)
tree2ee4076e6aeec3f79c64152abcce0ec284ef295f /include
parent8b31ff15f51c6936daedf28cc88c753214b569e0 (diff)
downloadvolse-hubzilla-2637831d9056862f7c3db718702116ef4652629a.tar.gz
volse-hubzilla-2637831d9056862f7c3db718702116ef4652629a.tar.bz2
volse-hubzilla-2637831d9056862f7c3db718702116ef4652629a.zip
some more zot changes migrating back to f9a mainline
Diffstat (limited to 'include')
-rw-r--r--include/auth.php12
-rw-r--r--include/hostxrd.php5
2 files changed, 8 insertions, 9 deletions
diff --git a/include/auth.php b/include/auth.php
index d1eb9d131..768af626f 100644
--- a/include/auth.php
+++ b/include/auth.php
@@ -25,7 +25,7 @@ if((isset($_SESSION)) && (x($_SESSION,'authenticated')) && ((! (x($_POST,'auth-p
nuke_session();
info( t('Logged out.') . EOL);
- goaway($a->get_baseurl());
+ goaway(z_root());
}
if(x($_SESSION,'visitor_id') && (! x($_SESSION,'uid'))) {
@@ -45,7 +45,7 @@ if((isset($_SESSION)) && (x($_SESSION,'authenticated')) && ((! (x($_POST,'auth-p
// extra paranoia - if the IP changed, log them out
if($check && ($_SESSION['addr'] != $_SERVER['REMOTE_ADDR'])) {
nuke_session();
- goaway($a->get_baseurl());
+ goaway(z_root());
}
$r = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
@@ -54,7 +54,7 @@ if((isset($_SESSION)) && (x($_SESSION,'authenticated')) && ((! (x($_POST,'auth-p
if(! count($r)) {
nuke_session();
- goaway($a->get_baseurl());
+ goaway(z_root());
}
// initialise user environment
@@ -118,7 +118,7 @@ else {
if(($noid) || (strpos($temp_string,'@')) || (! validate_url($temp_string))) {
$a = get_app();
notice( t('Login failed.') . EOL);
- goaway($a->get_baseurl());
+ goaway(z_root());
// NOTREACHED
}
@@ -143,7 +143,7 @@ else {
if($a->config['register_policy'] == REGISTER_CLOSED) {
$a = get_app();
notice( t('Login failed.') . EOL);
- goaway($a->get_baseurl());
+ goaway(z_root());
// NOTREACHED
}
// new account
@@ -196,7 +196,7 @@ else {
if((! $record) || (! count($record))) {
logger('authenticate: failed login attempt: ' . trim($_POST['openid_url']));
notice( t('Login failed.') . EOL );
- goaway($a->get_baseurl());
+ goaway(z_root());
}
$_SESSION['uid'] = $record['uid'];
diff --git a/include/hostxrd.php b/include/hostxrd.php
index 7040f927d..18c3e4b1e 100644
--- a/include/hostxrd.php
+++ b/include/hostxrd.php
@@ -1,11 +1,10 @@
<?php
-function hostxrd($baseurl) {
-
+function hostxrd() {
header('Access-Control-Allow-Origin: *');
header("Content-type: text/xml");
$tpl = file_get_contents('view/xrd_host.tpl');
- echo str_replace('$domain',$baseurl,$tpl);
+ echo str_replace(array('$zroot','$domain'),array(z_root(),z_path()),$tpl);
session_write_close();
exit();