1
1
Fork 0

added spaces + some curly braces + some usage of dbm::is_result()

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2017-01-26 15:23:30 +01:00 committed by Roland Haeder
commit 0cd241bcbe
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
92 changed files with 1190 additions and 1087 deletions

View file

@ -157,27 +157,27 @@ function poco_init(App $a) {
if (x($_GET,'updatedSince') AND !$global) {
$ret['updatedSince'] = false;
}
$ret['startIndex'] = (int) $startIndex;
$ret['itemsPerPage'] = (int) $itemsPerPage;
$ret['totalResults'] = (int) $totalResults;
$ret['entry'] = array();
$fields_ret = array(
'id' => false,
'displayName' => false,
'urls' => false,
'updated' => false,
'id' => false,
'displayName' => false,
'urls' => false,
'updated' => false,
'preferredUsername' => false,
'photos' => false,
'aboutMe' => false,
'currentLocation' => false,
'network' => false,
'gender' => false,
'tags' => false,
'address' => false,
'contactType' => false,
'generation' => false
'photos' => false,
'aboutMe' => false,
'currentLocation' => false,
'network' => false,
'gender' => false,
'tags' => false,
'address' => false,
'contactType' => false,
'generation' => false
);
if ((! x($_GET,'fields')) || ($_GET['fields'] === '@all')) {
@ -207,14 +207,17 @@ function poco_init(App $a) {
if (($rr['about'] == "") AND isset($rr['pabout'])) {
$rr['about'] = $rr['pabout'];
}
if ($rr['location'] == "") {
if (isset($rr['plocation'])) {
$rr['location'] = $rr['plocation'];
}
if (isset($rr['pregion']) AND ($rr['pregion'] != "")) {
if ($rr['location'] != "") {
$rr['location'] .= ", ";
}
$rr['location'] .= $rr['pregion'];
}
@ -292,6 +295,7 @@ function poco_init(App $a) {
} else {
$entry['updated'] = $rr['updated'];
}
$entry['updated'] = date("c", strtotime($entry['updated']));
}
if ($fields_ret['photos']) {
@ -345,6 +349,7 @@ function poco_init(App $a) {
if ($fields_ret['contactType']) {
$entry['contactType'] = intval($rr['contact-type']);
}
$ret['entry'][] = $entry;
}
} else {
@ -353,6 +358,7 @@ function poco_init(App $a) {
} else {
http_status_exit(500);
}
logger("End of poco", LOGGER_DEBUG);
if ($format === 'xml') {
@ -367,4 +373,5 @@ function poco_init(App $a) {
} else {
http_status_exit(500);
}
}