mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
Merge pull request #3112 from Quix0r/rewrites/coding-convention
Coding convention applied - part 1
This commit is contained in:
commit
9c2c483996
181 changed files with 4338 additions and 3507 deletions
|
@ -189,10 +189,10 @@ function discover_directory($search) {
|
|||
$j = json_decode($x);
|
||||
|
||||
if (count($j->results)) {
|
||||
foreach($j->results as $jj) {
|
||||
foreach ($j->results as $jj) {
|
||||
// Check if the contact already exists
|
||||
$exists = q("SELECT `id`, `last_contact`, `last_failure`, `updated` FROM `gcontact` WHERE `nurl` = '%s'", normalise_link($jj->url));
|
||||
if ($exists) {
|
||||
if (dbm::is_result($exists)) {
|
||||
logger("Profile ".$jj->url." already exists (".$search.")", LOGGER_DEBUG);
|
||||
|
||||
if (($exists[0]["last_contact"] < $exists[0]["last_failure"]) AND
|
||||
|
@ -245,12 +245,14 @@ function gs_search_user($search) {
|
|||
if (!$result["success"]) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$contacts = json_decode($result["body"]);
|
||||
|
||||
if ($contacts->status == 'ERROR') {
|
||||
return false;
|
||||
}
|
||||
foreach($contacts->data AS $user) {
|
||||
|
||||
foreach ($contacts->data AS $user) {
|
||||
$contact = probe_url($user->site_address."/".$user->name);
|
||||
if ($contact["network"] != NETWORK_PHANTOM) {
|
||||
$contact["about"] = $user->description;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue