1
1
Fork 0

bug fixes

This commit is contained in:
Mike Macgirvin 2010-07-19 05:24:22 -07:00
commit bbe53699f2
10 changed files with 29 additions and 26 deletions

View file

@ -184,7 +184,7 @@ function contacts_content(&$a) {
return $o;
}
dbg(2);
if(($a->argc == 2) && ($a->argv[1] == 'all'))
$sql_extra = '';
else
@ -198,21 +198,21 @@ function contacts_content(&$a) {
switch($sort_type) {
case DIRECTION_BOTH :
$sql_extra = " AND `dfrn-id` != '' AND `issued-id` != '' ";
$sql_extra2 = " AND `dfrn-id` != '' AND `issued-id` != '' ";
break;
case DIRECTION_IN :
$sql_extra = " AND `dfrn-id` = '' AND `issued-id` != '' ";
$sql_extra2 = " AND `dfrn-id` = '' AND `issued-id` != '' ";
break;
case DIRECTION_OUT :
$sql_extra = " AND `dfrn-id` != '' AND `issued-id` = '' ";
$sql_extra2 = " AND `dfrn-id` != '' AND `issued-id` = '' ";
break;
case DIRECTION_ANY :
default:
$sql_extra = '';
$sql_extra2 = '';
break;
}
$r = q("SELECT * FROM `contact` WHERE `uid` = %d $sql_extra",
$r = q("SELECT * FROM `contact` WHERE `uid` = %d $sql_extra $sql_extra2 ",
intval($_SESSION['uid']));
if(count($r)) {

View file

@ -39,7 +39,6 @@ function dfrn_request_post(&$a) {
// to confirm the request. We've done so and clicked submit,
// which brings us here.
$dfrn_url = notags(trim($_POST['dfrn_url']));
$aes_allow = (((x($_POST,'aes_allow')) && ($_POST['aes_allow'] == 1)) ? 1 : 0);
$confirm_key = ((x($_POST,'confirm_key')) ? $_POST['confirm_key'] : "");
@ -48,7 +47,7 @@ function dfrn_request_post(&$a) {
if(x($dfrn_url)) {
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `dfrn-url` = '%s' LIMIT 1",
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `url` = '%s' LIMIT 1",
intval($_SESSION['uid']),
dbesc($dfrn_url)
);
@ -88,7 +87,7 @@ function dfrn_request_post(&$a) {
if($invalid) {
notice( $invalid . ' required DFRN parameter'
. (($invalid == 1) ? " was " : "s were " )
. "not found at the given URL" . EOL );
. "not found at the given URL" . EOL . print_r($parms,true)) ;
return;
}
}
@ -220,7 +219,7 @@ function dfrn_request_post(&$a) {
if($invalid) {
notice( $invalid . ' required DFRN parameter'
. (($invalid == 1) ? " was " : "s were " )
. "not found at the given URL" . EOL) ;
. "not found at the given URL" . EOL . print_r($parms,true)) ;
return;
}

View file

@ -19,7 +19,7 @@ function home_content(&$a) {
$a->page['footer'] .= "<div class=\"powered\" >Powered by <a href=\"http://dfrn.org\" name=\"DFRN.org\" >DFRN</a></div>";
$o .= '<h1>Welcome' . ((x($a->config,'sitename')) ? " to {$a->config['sitename']}" : "" ) . '</h1>';
$o .= login(($a->config['register_html'] == REGISTER_CLOSED) ? 0 : 1);
$o .= login(($a->config['register_policy'] == REGISTER_CLOSED) ? 0 : 1);
return $o;

View file

@ -5,7 +5,7 @@ function sanitise_acl(&$item) {
}
function item_post(&$a) {
dbg(3);
if((! local_user()) && (! remote_user()))
return;
@ -170,6 +170,6 @@ function item_post(&$a) {
array(),$foo));
}
goaway($a->get_baseurl() . "/" . $_POST['return'] );
// goaway($a->get_baseurl() . "/" . $_POST['return'] );
return; // NOTREACHED
}

View file

@ -1,8 +1,5 @@
<?php
function login_content(&$a) {
// return login($a->config['register_enabled']);
return login(($a->config['register_policy'] == REGISTER_CLOSED) ? false : true);
}