aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-04-08 17:30:46 -0700
committerzotlabs <mike@macgirvin.com>2018-04-08 17:30:46 -0700
commitc3cd613f427b6aef483fce0c5bd1cebcefba8891 (patch)
tree504be8607f6b5021bb8c05bf865c4a572c9a27a3
parentf2078b25adc71e8c9b1b197864bbb3f4aab6fb8b (diff)
downloadvolse-hubzilla-c3cd613f427b6aef483fce0c5bd1cebcefba8891.tar.gz
volse-hubzilla-c3cd613f427b6aef483fce0c5bd1cebcefba8891.tar.bz2
volse-hubzilla-c3cd613f427b6aef483fce0c5bd1cebcefba8891.zip
extend AC
-rw-r--r--Zotlabs/Module/Acl.php2
-rw-r--r--Zotlabs/Module/Search.php4
-rw-r--r--view/js/autocomplete.js13
3 files changed, 17 insertions, 2 deletions
diff --git a/Zotlabs/Module/Acl.php b/Zotlabs/Module/Acl.php
index ef901aef1..4c5883e88 100644
--- a/Zotlabs/Module/Acl.php
+++ b/Zotlabs/Module/Acl.php
@@ -24,7 +24,7 @@ class Acl extends \Zotlabs\Web\Controller {
function init() {
- logger('mod_acl: ' . print_r($_REQUEST,true));
+ logger('mod_acl: ' . print_r($_REQUEST,true),LOGGER_DATA);
$start = (x($_REQUEST,'start') ? $_REQUEST['start'] : 0);
$count = (x($_REQUEST,'count') ? $_REQUEST['count'] : 500);
diff --git a/Zotlabs/Module/Search.php b/Zotlabs/Module/Search.php
index 55e0e746f..43464ad8b 100644
--- a/Zotlabs/Module/Search.php
+++ b/Zotlabs/Module/Search.php
@@ -66,6 +66,10 @@ class Search extends \Zotlabs\Web\Controller {
$search = substr($search,1);
goaway(z_root() . '/directory' . '?f=1&navsearch=1&search=' . $search);
}
+ if(strpos($search,'!') === 0) {
+ $search = substr($search,1);
+ goaway(z_root() . '/directory' . '?f=1&navsearch=1&search=' . $search);
+ }
if(strpos($search,'?') === 0) {
$search = substr($search,1);
goaway(z_root() . '/help' . '?f=1&navsearch=1&search=' . $search);
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index 07b9bc449..69ccd1fe5 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -243,8 +243,19 @@ function string2bb(element) {
replace: basic_replace,
template: contact_format,
};
+
+ // Autocomplete forums
+ forums = {
+ match: /(^\!)([^\n]{3,})$/,
+ index: 2,
+ search: function(term, callback) { contact_search(term, callback, backend_url, 'f', [], spinelement='#nav-search-spinner'); },
+ replace: basic_replace,
+ template: contact_format
+ };
+
+
this.attr('autocomplete', 'off');
- var a = this.textcomplete([contacts], {className:'acpopup', maxCount:100, zIndex: 1020, appendTo:'nav'});
+ var a = this.textcomplete([contacts,forums], {className:'acpopup', maxCount:100, zIndex: 1020, appendTo:'nav'});
a.on('textComplete:select', function(e, value, strategy) { submit_form(this); });
};
})( jQuery );