When "local_search" is activated, then point all hashtags to the local server
This commit is contained in:
@@ -1178,13 +1178,14 @@ function item_body_set_hashtags(&$item) {
|
||||
|
||||
$URLSearchString = "^\[\]";
|
||||
|
||||
/// @TODO old-lost code?
|
||||
// All hashtags should point to the home server
|
||||
//$item["body"] = preg_replace("/#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
|
||||
// "#[url=".App::get_baseurl()."/search?tag=$2]$2[/url]", $item["body"]);
|
||||
// All hashtags should point to the home server if "local_search" is activated
|
||||
if (Config::get('system', 'local_search')) {
|
||||
$item["body"] = preg_replace("/#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
|
||||
"#[url=".App::get_baseurl()."/search?tag=$2]$2[/url]", $item["body"]);
|
||||
|
||||
//$item["tag"] = preg_replace("/#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
|
||||
// "#[url=".App::get_baseurl()."/search?tag=$2]$2[/url]", $item["tag"]);
|
||||
$item["tag"] = preg_replace("/#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
|
||||
"#[url=".App::get_baseurl()."/search?tag=$2]$2[/url]", $item["tag"]);
|
||||
}
|
||||
|
||||
// mask hashtags inside of url, bookmarks and attachments to avoid urls in urls
|
||||
$item["body"] = preg_replace_callback("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
|
||||
|
||||
Reference in New Issue
Block a user