1
1
Fork 0

some more zot changes migrating back to f9a mainline

This commit is contained in:
Friendika 2011-08-01 21:02:25 -07:00
commit 2637831d90
15 changed files with 67 additions and 40 deletions

View file

@ -672,7 +672,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
// somebody arrived here by mistake or they are fishing. Send them to the homepage.
goaway($a->get_baseurl());
goaway(z_root());
// NOTREACHED
}

View file

@ -61,7 +61,7 @@ function dfrn_poll_init(&$a) {
$my_id = '0:' . $dfrn_id;
break;
default:
goaway($a->get_baseurl());
goaway(z_root());
break; // NOTREACHED
}
@ -100,7 +100,7 @@ function dfrn_poll_init(&$a) {
$profile = $r[0]['nickname'];
goaway((strlen($destination_url)) ? $destination_url : $a->get_baseurl() . '/profile/' . $profile);
}
goaway($a->get_baseurl());
goaway(z_root());
}
@ -297,7 +297,7 @@ function dfrn_poll_post(&$a) {
$my_id = '0:' . $dfrn_id;
break;
default:
goaway($a->get_baseurl());
goaway(z_root());
break; // NOTREACHED
}
@ -420,7 +420,7 @@ function dfrn_poll_content(&$a) {
$my_id = '0:' . $dfrn_id;
break;
default:
goaway($a->get_baseurl());
goaway(z_root());
break; // NOTREACHED
}

View file

@ -48,7 +48,7 @@ function dfrn_request_post(&$a) {
if($_POST['cancel']) {
goaway($a->get_baseurl());
goaway(z_root());
}
@ -190,7 +190,7 @@ function dfrn_request_post(&$a) {
// invalid/bogus request
notice( t('Unrecoverable protocol error.') . EOL );
goaway($a->get_baseurl());
goaway(z_root());
return; // NOTREACHED
}
@ -602,7 +602,7 @@ function dfrn_request_content(&$a) {
$myaddr = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
}
else {
$myaddr = $a->user['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3 );
$myaddr = $a->user['nickname'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3 );
}
}
elseif(x($_GET,'addr')) {

View file

@ -16,7 +16,7 @@ function friendika_init(&$a) {
$data = Array(
'version' => FRIENDIKA_VERSION,
'url' => $a->get_baseurl(),
'url' => z_root(),
'plugins' => $a->plugins,
'register_policy' => $register_policy[$a->config['register_policy']],
'admin' => $admin,
@ -40,7 +40,7 @@ function friendika_content(&$a) {
$o .= '<p></p><p>';
$o .= t('This is Friendika version') . ' ' . FRIENDIKA_VERSION . ' ';
$o .= t('running at web location') . ' ' . $a->get_baseurl() . '</p><p>';
$o .= t('running at web location') . ' ' . z_root() . '</p><p>';
$o .= t('Shared content within the Friendika network is provided under the <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 license</a>') . '</p><p>';

View file

@ -5,7 +5,7 @@ function lostpass_post(&$a) {
$email = notags(trim($_POST['login-name']));
if(! $email)
goaway($a->get_baseurl());
goaway(z_root());
$r = q("SELECT * FROM `user` WHERE ( `email` = '%s' OR `nickname` = '%s' ) AND `verified` = 1 AND `blocked` = 0 LIMIT 1",
dbesc($email),
@ -14,7 +14,7 @@ function lostpass_post(&$a) {
if(! count($r)) {
notice( t('No valid account found.') . EOL);
goaway($a->get_baseurl());
goaway(z_root());
}
$uid = $r[0]['uid'];
@ -46,7 +46,7 @@ function lostpass_post(&$a) {
. 'Content-transfer-encoding: 8bit' );
goaway($a->get_baseurl());
goaway(z_root());
}
@ -62,7 +62,7 @@ function lostpass_content(&$a) {
);
if(! count($r)) {
notice( t("Request could not be verified. \x28You may have previously submitted it.\x29 Password reset failed.") . EOL);
goaway($a->get_baseurl());
goaway(z_root());
return;
}
$uid = $r[0]['uid'];

View file

@ -3,7 +3,7 @@
function notifications_post(&$a) {
if(! local_user()) {
goaway($a->get_baseurl());
goaway(z_root());
}
$request_id = (($a->argc > 1) ? $a->argv[1] : 0);
@ -60,7 +60,7 @@ function notifications_content(&$a) {
if(! local_user()) {
notice( t('Permission denied.') . EOL);
goaway($a->get_baseurl());
return;
}
$o = '';

View file

@ -8,7 +8,7 @@ function openid_content(&$a) {
$noid = get_config('system','no_openid');
if($noid)
goaway($a->get_baseurl());
goaway(z_root());
if((x($_GET,'openid_mode')) && (x($_SESSION,'openid'))) {
$openid = new LightOpenID;
@ -49,7 +49,7 @@ function openid_content(&$a) {
if($a->config['register_policy'] != REGISTER_CLOSED)
goaway($a->get_baseurl() . '/register' . $args);
else
goaway($a->get_baseurl());
goaway(z_root());
// NOTREACHED
}
@ -60,7 +60,7 @@ function openid_content(&$a) {
);
if(! count($r)) {
notice( t('Login failed.') . EOL );
goaway($a->get_baseurl());
goaway(z_root());
}
unset($_SESSION['openid']);
@ -116,10 +116,10 @@ function openid_content(&$a) {
if(($a->module !== 'home') && isset($_SESSION['return_url']))
goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
else
goaway($a->get_baseurl());
goaway(z_root());
}
}
notice( t('Login failed.') . EOL);
goaway($a->get_baseurl());
goaway(z_root());
// NOTREACHED
}

View file

@ -3,7 +3,7 @@
function redir_init(&$a) {
if((! local_user()) || (! ($a->argc == 2)) || (! intval($a->argv[1])))
goaway($a->get_baseurl());
goaway(z_root());
$cid = $a->argv[1];
$url = ((x($_GET,'url')) ? $_GET['url'] : '');
@ -13,7 +13,7 @@ function redir_init(&$a) {
);
if((! count($r)) || ($r[0]['network'] !== 'dfrn'))
goaway($a->get_baseurl());
goaway(z_root());
$dfrn_id = $orig_id = (($r[0]['issued-id']) ? $r[0]['issued-id'] : $r[0]['dfrn-id']);

View file

@ -373,7 +373,7 @@ function register_post(&$a) {
if($res) {
info( t('Registration successful. Please check your email for further instructions.') . EOL ) ;
goaway($a->get_baseurl());
goaway(z_root());
}
else {
notice( t('Failed to send email message. Here is the message that failed.') . $email_tpl . EOL );
@ -382,7 +382,7 @@ function register_post(&$a) {
elseif($a->config['register_policy'] == REGISTER_APPROVE) {
if(! strlen($a->config['admin_email'])) {
notice( t('Your registration can not be processed.') . EOL);
goaway($a->get_baseurl());
goaway(z_root());
}
$hash = random_string();
@ -428,7 +428,7 @@ function register_post(&$a) {
if($res) {
info( t('Your registration is pending approval by the site owner.') . EOL ) ;
goaway($a->get_baseurl());
goaway(z_root());
}
}

View file

@ -29,7 +29,7 @@ function removeme_post(&$a) {
function removeme_content(&$a) {
if(! local_user())
goaway($a->get_baseurl());
goaway(z_root());
$hash = random_string();