Remove get_server() in favor of Search::getGlobalDirectory()
This commit is contained in:
parent
5d20cd7e16
commit
48baa0be4b
10 changed files with 25 additions and 23 deletions
|
@ -272,7 +272,7 @@ class Search
|
|||
$return = GContact::searchByName($search, $mode);
|
||||
} else {
|
||||
$p = $page > 1 ? 'p=' . $page : '';
|
||||
$curlResult = Network::curl(get_server() . '/search/people?' . $p . '&q=' . urlencode($search), false, ['accept_content' => 'application/json']);
|
||||
$curlResult = Network::curl(self::getGlobalDirectory() . '/search/people?' . $p . '&q=' . urlencode($search), false, ['accept_content' => 'application/json']);
|
||||
if ($curlResult->isSuccess()) {
|
||||
$searchResult = json_decode($curlResult->getBody(), true);
|
||||
if (!empty($searchResult['profiles'])) {
|
||||
|
@ -283,4 +283,14 @@ class Search
|
|||
|
||||
return $return ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the global directory name, used in this node
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getGlobalDirectory()
|
||||
{
|
||||
return Config::get('system', 'directory', self::DEFAULT_DIRECTORY);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -290,7 +290,6 @@ class System
|
|||
function notice($s)
|
||||
function info($s)
|
||||
function is_site_admin()
|
||||
function get_server()
|
||||
function get_temppath()
|
||||
function get_cachefile($file, $writemode = true)
|
||||
function get_itemcachepath()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue