X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fjsonsearchresultslist.php;h=0f764a72be47e32905b195f99645bbc5cac90589;hb=f134a423f6a9e7bb61d069c4d6281c05417bbd45;hp=48540a4d587a56f76c8361ee7107efe147a9d74b;hpb=b0dfc70a54e5e184023ed982dfaf5439041e9708;p=quix0rs-gnu-social.git diff --git a/lib/jsonsearchresultslist.php b/lib/jsonsearchresultslist.php index 48540a4d58..0f764a72be 100644 --- a/lib/jsonsearchresultslist.php +++ b/lib/jsonsearchresultslist.php @@ -232,14 +232,7 @@ class ResultItem $this->id = $this->notice->id; $this->from_user_id = $this->profile->id; - $user = $this->profile->getUser(); - - if (empty($user)) { - // Gonna have to do till we can detect it - $this->iso_language_code = common_config('site', 'language'); - } else { - $this->iso_language_code = $user->language; - } + $this->iso_language_code = Profile_prefs::getConfigData($this->profile, 'site', 'language'); $this->source = $this->getSourceLink($this->notice->source); @@ -271,7 +264,7 @@ class ResultItem break; default: $ns = Notice_source::getKV($source); - if ($ns) { + if ($ns instanceof Notice_source) { $source_name = '' . $ns->name . ''; } break;