- * @brief return data from profiles
- *
- * @param array $profile_row array containing data from db table 'profile'
- * @return array
- * @throws InternalServerErrorException
- */
-function api_format_items_profiles($profile_row)
-{
- $profile = [
- 'profile_id' => $profile_row['id'],
- 'profile_name' => $profile_row['profile-name'],
- 'is_default' => $profile_row['is-default'] ? true : false,
- 'hide_friends' => $profile_row['hide-friends'] ? true : false,
- 'profile_photo' => $profile_row['photo'],
- 'profile_thumb' => $profile_row['thumb'],
- 'publish' => $profile_row['publish'] ? true : false,
- 'net_publish' => $profile_row['net-publish'] ? true : false,
- 'description' => $profile_row['pdesc'],
- 'date_of_birth' => $profile_row['dob'],
- 'address' => $profile_row['address'],
- 'city' => $profile_row['locality'],
- 'region' => $profile_row['region'],
- 'postal_code' => $profile_row['postal-code'],
- 'country' => $profile_row['country-name'],
- 'hometown' => $profile_row['hometown'],
- 'gender' => $profile_row['gender'],
- 'marital' => $profile_row['marital'],
- 'marital_with' => $profile_row['with'],
- 'marital_since' => $profile_row['howlong'],
- 'sexual' => $profile_row['sexual'],
- 'politic' => $profile_row['politic'],
- 'religion' => $profile_row['religion'],
- 'public_keywords' => $profile_row['pub_keywords'],
- 'private_keywords' => $profile_row['prv_keywords'],
- 'likes' => BBCode::convert(api_clean_plain_items($profile_row['likes']) , false, 2),
- 'dislikes' => BBCode::convert(api_clean_plain_items($profile_row['dislikes']) , false, 2),
- 'about' => BBCode::convert(api_clean_plain_items($profile_row['about']) , false, 2),
- 'music' => BBCode::convert(api_clean_plain_items($profile_row['music']) , false, 2),
- 'book' => BBCode::convert(api_clean_plain_items($profile_row['book']) , false, 2),
- 'tv' => BBCode::convert(api_clean_plain_items($profile_row['tv']) , false, 2),
- 'film' => BBCode::convert(api_clean_plain_items($profile_row['film']) , false, 2),
- 'interest' => BBCode::convert(api_clean_plain_items($profile_row['interest']) , false, 2),
- 'romance' => BBCode::convert(api_clean_plain_items($profile_row['romance']) , false, 2),
- 'work' => BBCode::convert(api_clean_plain_items($profile_row['work']) , false, 2),
- 'education' => BBCode::convert(api_clean_plain_items($profile_row['education']), false, 2),
- 'social_networks' => BBCode::convert(api_clean_plain_items($profile_row['contact']) , false, 2),
- 'homepage' => $profile_row['homepage'],
- 'users' => null
- ];
- return $profile;
-}
-
-/**
- * @brief format items to be returned by api