From aa3a14ec36db5f9df9d0ec27c607a994451fc845 Mon Sep 17 00:00:00 2001 From: Friendika Date: Fri, 5 Aug 2011 21:30:12 -0700 Subject: [PATCH] bug #117, use realname for screen_name in API if nickname missing --- boot.php | 2 +- include/api.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/boot.php b/boot.php index e1a1c5a503..17161f715a 100644 --- a/boot.php +++ b/boot.php @@ -7,7 +7,7 @@ require_once('include/text.php'); require_once("include/pgettext.php"); -define ( 'FRIENDIKA_VERSION', '2.2.1062' ); +define ( 'FRIENDIKA_VERSION', '2.2.1063' ); define ( 'DFRN_PROTOCOL_VERSION', '2.21' ); define ( 'DB_UPDATE_VERSION', 1077 ); diff --git a/include/api.php b/include/api.php index 3c692cf741..2a02458d7a 100644 --- a/include/api.php +++ b/include/api.php @@ -303,7 +303,7 @@ 'uid' => intval($uinfo[0]['uid']), 'id' => intval($uinfo[0]['cid']), 'name' => $uinfo[0]['name'], - 'screen_name' => $uinfo[0]['nick'], + 'screen_name' => (($uinfo[0]['nick']) ? $uinfo[0]['nick'] : $uinfo[0]['name']), 'location' => ($usr) ? $usr[0]['default-location'] : '', 'profile_image_url' => $uinfo[0]['micro'], 'url' => $uinfo[0]['url'], @@ -356,7 +356,7 @@ 'uid' => 0, 'id' => 0, 'name' => $item['author-name'], - 'screen_name' => '', + 'screen_name' => $item['author_name'], 'location' => '', //$uinfo[0]['default-location'], 'profile_image_url' => $item['author-avatar'], 'url' => $item['author-link'],