update hashtag regular expression

This commit is contained in:
root 2018-12-17 05:33:03 +00:00 committed by Hypolite Petovan
parent 8de263df8b
commit 6c2ace3cab
1 changed files with 1 additions and 1 deletions

View File

@ -1538,7 +1538,7 @@ function api_search($type)
$page = (!empty($_REQUEST['page']) ? $_REQUEST['page'] - 1 : 0); $page = (!empty($_REQUEST['page']) ? $_REQUEST['page'] - 1 : 0);
$start = $page * $count; $start = $page * $count;
$params = ['order' => ['id' => true], 'limit' => [$start, $count]]; $params = ['order' => ['id' => true], 'limit' => [$start, $count]];
if (preg_match('/^\#([^#]+)/', $searchTerm, $matches) === 1 && isset($matches[1])) { if (preg_match('/^#(\w+)$/', $searchTerm, $matches) === 1 && isset($matches[1])) {
$searchTerm = $matches[1]; $searchTerm = $matches[1];
$condition = ["`oid` > ? $condition = ["`oid` > ?
AND (`uid` = 0 OR (`uid` = ? AND NOT `global`)) AND (`uid` = 0 OR (`uid` = ? AND NOT `global`))