some small improvements
This commit is contained in:
parent
34a1e923dd
commit
2520286b1f
|
@ -12,6 +12,9 @@ use Friendica\Util\Proxy as ProxyUtils;
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
use Friendica\Model;
|
use Friendica\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Multi search module, which is needed for further search operations
|
||||||
|
*/
|
||||||
class DirectorySearch extends BaseModule
|
class DirectorySearch extends BaseModule
|
||||||
{
|
{
|
||||||
public static function content()
|
public static function content()
|
||||||
|
@ -21,7 +24,7 @@ class DirectorySearch extends BaseModule
|
||||||
return Login::form();
|
return Login::form();
|
||||||
}
|
}
|
||||||
|
|
||||||
$a = self::getApp();
|
$a = self::getApp();
|
||||||
|
|
||||||
if (empty($a->page['aside'])) {
|
if (empty($a->page['aside'])) {
|
||||||
$a->page['aside'] = '';
|
$a->page['aside'] = '';
|
||||||
|
@ -86,12 +89,12 @@ class DirectorySearch extends BaseModule
|
||||||
$location = '';
|
$location = '';
|
||||||
$about = '';
|
$about = '';
|
||||||
$accountType = '';
|
$accountType = '';
|
||||||
$photo_menu = [];
|
$photo_menu = [];
|
||||||
|
|
||||||
// If We already know this contact then don't show the "connect" button
|
// If We already know this contact then don't show the "connect" button
|
||||||
if ($result->getCid() > 0 || $result->getPcid() > 0) {
|
if ($result->getCid() > 0 || $result->getPcid() > 0) {
|
||||||
$connlnk = "";
|
$connLink = "";
|
||||||
$conntxt = "";
|
$connTxt = "";
|
||||||
$contact = Model\Contact::getById(
|
$contact = Model\Contact::getById(
|
||||||
($result->getCid() > 0) ? $result->getCid() : $result->getPcid()
|
($result->getCid() > 0) ? $result->getCid() : $result->getPcid()
|
||||||
);
|
);
|
||||||
|
@ -107,11 +110,11 @@ class DirectorySearch extends BaseModule
|
||||||
$photo_menu = [];
|
$photo_menu = [];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$connlnk = $a->getBaseURL() . '/follow/?url=' . $result->getUrl();
|
$connLink = $a->getBaseURL() . '/follow/?url=' . $result->getUrl();
|
||||||
$conntxt = L10n::t('Connect');
|
$connTxt = L10n::t('Connect');
|
||||||
|
|
||||||
$photo_menu['profile'] = [L10n::t("View Profile"), Model\Contact::magicLink($result->getUrl())];
|
$photo_menu['profile'] = [L10n::t("View Profile"), Model\Contact::magicLink($result->getUrl())];
|
||||||
$photo_menu['follow'] = [L10n::t("Connect/Follow"), $connlnk];
|
$photo_menu['follow'] = [L10n::t("Connect/Follow"), $connLink];
|
||||||
}
|
}
|
||||||
|
|
||||||
$photo = str_replace("http:///photo/", get_server() . "/photo/", $result->getPhoto());
|
$photo = str_replace("http:///photo/", get_server() . "/photo/", $result->getPhoto());
|
||||||
|
@ -123,8 +126,8 @@ class DirectorySearch extends BaseModule
|
||||||
'name' => $result->getName(),
|
'name' => $result->getName(),
|
||||||
'thumb' => ProxyUtils::proxifyUrl($photo, false, ProxyUtils::SIZE_THUMB),
|
'thumb' => ProxyUtils::proxifyUrl($photo, false, ProxyUtils::SIZE_THUMB),
|
||||||
'img_hover' => $result->getTags(),
|
'img_hover' => $result->getTags(),
|
||||||
'conntxt' => $conntxt,
|
'conntxt' => $connTxt,
|
||||||
'connlnk' => $connlnk,
|
'connlnk' => $connLink,
|
||||||
'photo_menu' => $photo_menu,
|
'photo_menu' => $photo_menu,
|
||||||
'details' => $location,
|
'details' => $location,
|
||||||
'tags' => $result->getTags(),
|
'tags' => $result->getTags(),
|
||||||
|
|
Loading…
Reference in a new issue