diff options
author | Mario <mario@mariovavti.com> | 2021-06-21 17:42:57 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-06-21 17:42:57 +0000 |
commit | afb4ae21090cd54538d37bf1f78b1606627d5e3c (patch) | |
tree | d187586960ed35b8ef69610591e4faf67e2c3a88 /Zotlabs/Module | |
parent | 3632fb359f4dcf92c8a47cd36e6574490d4f1081 (diff) | |
parent | e024375b15441a7291f80e1d49726bbe40a404f6 (diff) | |
download | volse-hubzilla-afb4ae21090cd54538d37bf1f78b1606627d5e3c.tar.gz volse-hubzilla-afb4ae21090cd54538d37bf1f78b1606627d5e3c.tar.bz2 volse-hubzilla-afb4ae21090cd54538d37bf1f78b1606627d5e3c.zip |
Merge branch 'dev' into 'dev'
Clean up Search.php & Enotify.php code
See merge request hubzilla/core!1972
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Search.php | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/Zotlabs/Module/Search.php b/Zotlabs/Module/Search.php index 2ad79e3f6..e3f2e1533 100644 --- a/Zotlabs/Module/Search.php +++ b/Zotlabs/Module/Search.php @@ -25,10 +25,11 @@ class Search extends Controller { nav_set_selected('Search'); - require_once("include/bbcode.php"); - require_once('include/security.php'); + require_once('include/bbcode.php'); require_once('include/conversation.php'); require_once('include/items.php'); + require_once('include/security.php'); + $format = (($_REQUEST['format']) ? $_REQUEST['format'] : ''); if ($format !== '') { @@ -37,11 +38,9 @@ class Search extends Controller { $observer = App::get_observer(); $observer_hash = (($observer) ? $observer['xchan_hash'] : ''); - - $o = '<div id="live-search"></div>' . "\r\n"; - - $o .= '<div class="generic-content-wrapper-styled">' . "\r\n"; - + + $o = '<div class="generic-content-wrapper-styled">' . "\r\n"; + $o .= '<h3>' . t('Search') . '</h3>'; if (x(App::$data, 'search')) @@ -87,21 +86,21 @@ class Search extends Controller { $tag = true; $search = substr($search, 1); } - if (strpos($search, '@') === 0) { + elseif(strpos($search, '@') === 0) { $search = substr($search, 1); goaway(z_root() . '/directory' . '?f=1&navsearch=1&search=' . $search); } - if (strpos($search, '!') === 0) { + elseif(strpos($search, '!') === 0) { $search = substr($search, 1); goaway(z_root() . '/directory' . '?f=1&navsearch=1&search=' . $search); } - if (strpos($search, '?') === 0) { + elseif(strpos($search, '?') === 0) { $search = substr($search, 1); goaway(z_root() . '/help' . '?f=1&navsearch=1&search=' . $search); } // look for a naked webbie - if (strpos($search,'@') !== false && strpos($search,'http') !== 0) { + if (strpos($search, '@') !== false && strpos($search, 'http') !== 0) { goaway(z_root() . '/directory' . '?f=1&navsearch=1&search=' . $search); } @@ -234,7 +233,7 @@ class Search extends Controller { $items = []; } - if ($format == 'json') { + if ($format === 'json') { $result = []; require_once('include/conversation.php'); foreach ($items as $item) { |