added spaces + curly braces

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2016-12-20 11:36:03 +01:00
parent c1845c97cc
commit c86f09a894
7 changed files with 23 additions and 16 deletions

View File

@ -558,7 +558,7 @@ function notifier_run(&$argv, &$argc){
if($slap && count($url_recipients) && ($public_message || $push_notify) && $normal_mode) { if($slap && count($url_recipients) && ($public_message || $push_notify) && $normal_mode) {
if(!get_config('system','dfrn_only')) { if(!get_config('system','dfrn_only')) {
foreach($url_recipients as $url) { foreach($url_recipients as $url) {
if($url) { if ($url) {
logger('notifier: urldelivery: ' . $url); logger('notifier: urldelivery: ' . $url);
$deliver_status = slapper($owner,$url,$slap); $deliver_status = slapper($owner,$url,$slap);
/// @TODO Redeliver/queue these items on failure, though there is no contact record /// @TODO Redeliver/queue these items on failure, though there is no contact record

View File

@ -93,19 +93,19 @@ function poco_load($cid,$uid = 0,$zcid = 0,$url = null) {
if(isset($entry->urls)) { if(isset($entry->urls)) {
foreach($entry->urls as $url) { foreach($entry->urls as $url) {
if($url->type == 'profile') { if ($url->type == 'profile') {
$profile_url = $url->value; $profile_url = $url->value;
continue; continue;
} }
if($url->type == 'webfinger') { if ($url->type == 'webfinger') {
$connect_url = str_replace('acct:' , '', $url->value); $connect_url = str_replace('acct:' , '', $url->value);
continue; continue;
} }
} }
} }
if(isset($entry->photos)) { if (isset($entry->photos)) {
foreach($entry->photos as $photo) { foreach($entry->photos as $photo) {
if($photo->type == 'profile') { if ($photo->type == 'profile') {
$profile_photo = $photo->value; $profile_photo = $photo->value;
continue; continue;
} }
@ -1334,7 +1334,7 @@ function poco_discover_server_users($data, $server) {
$username = ""; $username = "";
if (isset($entry->urls)) { if (isset($entry->urls)) {
foreach($entry->urls as $url) foreach($entry->urls as $url)
if($url->type == 'profile') { if ($url->type == 'profile') {
$profile_url = $url->value; $profile_url = $url->value;
$urlparts = parse_url($profile_url); $urlparts = parse_url($profile_url);
$username = end(explode("/", $urlparts["path"])); $username = end(explode("/", $urlparts["path"]));
@ -1378,11 +1378,11 @@ function poco_discover_server($data, $default_generation = 0) {
if(isset($entry->urls)) { if(isset($entry->urls)) {
foreach($entry->urls as $url) { foreach($entry->urls as $url) {
if($url->type == 'profile') { if ($url->type == 'profile') {
$profile_url = $url->value; $profile_url = $url->value;
continue; continue;
} }
if($url->type == 'webfinger') { if ($url->type == 'webfinger') {
$connect_url = str_replace('acct:' , '', $url->value); $connect_url = str_replace('acct:' , '', $url->value);
continue; continue;
} }

View File

@ -124,8 +124,9 @@ function profile_photo_post(App &$a) {
info( t('Shift-reload the page or clear browser cache if the new photo does not display immediately.') . EOL); info( t('Shift-reload the page or clear browser cache if the new photo does not display immediately.') . EOL);
// Update global directory in background // Update global directory in background
$url = App::get_baseurl() . '/profile/' . $a->user['nickname']; $url = App::get_baseurl() . '/profile/' . $a->user['nickname'];
if($url && strlen(get_config('system','directory'))) if ($url && strlen(get_config('system','directory'))) {
proc_run(PRIORITY_LOW, "include/directory.php", $url); proc_run(PRIORITY_LOW, "include/directory.php", $url);
}
require_once('include/profile_update.php'); require_once('include/profile_update.php');
profile_change(); profile_change();
@ -223,8 +224,9 @@ function profile_photo_content(App &$a) {
// Update global directory in background // Update global directory in background
$url = $_SESSION['my_url']; $url = $_SESSION['my_url'];
if($url && strlen(get_config('system','directory'))) if ($url && strlen(get_config('system','directory'))) {
proc_run(PRIORITY_LOW, "include/directory.php", $url); proc_run(PRIORITY_LOW, "include/directory.php", $url);
}
goaway(App::get_baseurl() . '/profiles'); goaway(App::get_baseurl() . '/profiles');
return; // NOTREACHED return; // NOTREACHED

View File

@ -502,8 +502,9 @@ function profiles_post(App &$a) {
// Update global directory in background // Update global directory in background
$url = $_SESSION['my_url']; $url = $_SESSION['my_url'];
if($url && strlen(get_config('system','directory'))) if ($url && strlen(get_config('system','directory'))) {
proc_run(PRIORITY_LOW, "include/directory.php", $url); proc_run(PRIORITY_LOW, "include/directory.php", $url);
}
require_once('include/profile_update.php'); require_once('include/profile_update.php');
profile_change(); profile_change();

View File

@ -63,12 +63,14 @@ function redir_init(App &$a) {
. '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&type=profile&sec=' . $sec . $dest . $quiet ); . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&type=profile&sec=' . $sec . $dest . $quiet );
} }
if(local_user()) if (local_user()) {
$handle = $a->user['nickname'] . '@' . substr($a->get_baseurl(),strpos($a->get_baseurl(),'://')+3); $handle = $a->user['nickname'] . '@' . substr($a->get_baseurl(),strpos($a->get_baseurl(),'://')+3);
if(remote_user()) }
if (remote_user()) {
$handle = $_SESSION['handle']; $handle = $_SESSION['handle'];
}
if($url) { if ($url) {
$url = str_replace('{zid}','&zid=' . $handle,$url); $url = str_replace('{zid}','&zid=' . $handle,$url);
goaway($url); goaway($url);
} }

View File

@ -38,8 +38,9 @@ function user_allow($hash) {
); );
if (dbm::is_result($r) && $r[0]['net-publish']) { if (dbm::is_result($r) && $r[0]['net-publish']) {
$url = App::get_baseurl() . '/profile/' . $user[0]['nickname']; $url = App::get_baseurl() . '/profile/' . $user[0]['nickname'];
if($url && strlen(get_config('system','directory'))) if ($url && strlen(get_config('system','directory'))) {
proc_run(PRIORITY_LOW, "include/directory.php", $url); proc_run(PRIORITY_LOW, "include/directory.php", $url);
}
} }
push_lang($register[0]['language']); push_lang($register[0]['language']);

View File

@ -629,8 +629,9 @@ function settings_post(App &$a) {
if(($old_visibility != $net_publish) || ($page_flags != $old_page_flags)) { if(($old_visibility != $net_publish) || ($page_flags != $old_page_flags)) {
// Update global directory in background // Update global directory in background
$url = $_SESSION['my_url']; $url = $_SESSION['my_url'];
if($url && strlen(get_config('system','directory'))) if ($url && strlen(get_config('system','directory'))) {
proc_run(PRIORITY_LOW, "include/directory.php", $url); proc_run(PRIORITY_LOW, "include/directory.php", $url);
}
} }
require_once('include/profile_update.php'); require_once('include/profile_update.php');