mirror of
https://github.com/friendica/friendica
synced 2025-04-27 04:30:11 +00:00
added spaces + some curly braces
Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
0cd241bcbe
commit
41a36606c6
60 changed files with 1018 additions and 930 deletions
|
@ -564,15 +564,15 @@ class Probe {
|
|||
*/
|
||||
public static function valid_dfrn($data) {
|
||||
$errors = 0;
|
||||
if(!isset($data['key']))
|
||||
if (!isset($data['key']))
|
||||
$errors ++;
|
||||
if(!isset($data['dfrn-request']))
|
||||
if (!isset($data['dfrn-request']))
|
||||
$errors ++;
|
||||
if(!isset($data['dfrn-confirm']))
|
||||
if (!isset($data['dfrn-confirm']))
|
||||
$errors ++;
|
||||
if(!isset($data['dfrn-notify']))
|
||||
if (!isset($data['dfrn-notify']))
|
||||
$errors ++;
|
||||
if(!isset($data['dfrn-poll']))
|
||||
if (!isset($data['dfrn-poll']))
|
||||
$errors ++;
|
||||
return $errors;
|
||||
}
|
||||
|
@ -1133,15 +1133,17 @@ class Probe {
|
|||
$password = '';
|
||||
openssl_private_decrypt(hex2bin($r[0]['pass']), $password,$x[0]['prvkey']);
|
||||
$mbox = email_connect($mailbox,$r[0]['user'], $password);
|
||||
if(!mbox)
|
||||
if (!$mbox) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$msgs = email_poll($mbox, $uri);
|
||||
logger('searching '.$uri.', '.count($msgs).' messages found.', LOGGER_DEBUG);
|
||||
|
||||
if (!count($msgs))
|
||||
if (!count($msgs)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$data = array();
|
||||
|
||||
|
@ -1157,13 +1159,14 @@ class Probe {
|
|||
$data["poll"] = 'email '.random_string();
|
||||
|
||||
$x = email_msg_meta($mbox, $msgs[0]);
|
||||
if(stristr($x[0]->from, $uri))
|
||||
if (stristr($x[0]->from, $uri)) {
|
||||
$adr = imap_rfc822_parse_adrlist($x[0]->from, '');
|
||||
elseif(stristr($x[0]->to, $uri))
|
||||
} elseif (stristr($x[0]->to, $uri)) {
|
||||
$adr = imap_rfc822_parse_adrlist($x[0]->to, '');
|
||||
if(isset($adr)) {
|
||||
}
|
||||
if (isset($adr)) {
|
||||
foreach($adr as $feadr) {
|
||||
if((strcasecmp($feadr->mailbox, $data["name"]) == 0)
|
||||
if ((strcasecmp($feadr->mailbox, $data["name"]) == 0)
|
||||
&&(strcasecmp($feadr->host, $phost) == 0)
|
||||
&& (strlen($feadr->personal))) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue