aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Settings/Permcats.php5
-rw-r--r--include/nav.php4
-rw-r--r--include/network.php3
-rw-r--r--view/js/autocomplete.js11
4 files changed, 19 insertions, 4 deletions
diff --git a/Zotlabs/Module/Settings/Permcats.php b/Zotlabs/Module/Settings/Permcats.php
index 535399083..40641c3f2 100644
--- a/Zotlabs/Module/Settings/Permcats.php
+++ b/Zotlabs/Module/Settings/Permcats.php
@@ -19,6 +19,11 @@ class Permcats {
$all_perms = \Zotlabs\Access\Permissions::Perms();
$name = escape_tags(trim($_POST['name']));
+ if(! $name) {
+ notice( t('Permission Name is required.') . EOL);
+ return;
+ }
+
$pcarr = [];
diff --git a/include/nav.php b/include/nav.php
index df58ee96f..a443c58ff 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -176,7 +176,7 @@ EOT;
$nav['help'] = [$help_url, t('Help'), "", t('Help and documentation'), 'help_nav_btn', $context_help, $enable_context_help];
}
- $nav['search'] = ['search', t('Search'), "", t('Search site @name, #tag, ?docs, content')];
+ $nav['search'] = ['search', t('Search'), "", t('Search site @name, !forum, #tag, ?docs, content')];
/**
@@ -287,7 +287,7 @@ EOT;
'$is_owner' => $is_owner,
'$sel' => App::$nav_sel,
'$powered_by' => $powered_by,
- '$help' => t('@name, #tag, ?doc, content'),
+ '$help' => t('@name, !forum, #tag, ?doc, content'),
'$pleasewait' => t('Please wait...'),
'$nav_apps' => $nav_apps,
'$navbar_apps' => $navbar_apps,
diff --git a/include/network.php b/include/network.php
index db9a7d00a..747b46877 100644
--- a/include/network.php
+++ b/include/network.php
@@ -1845,7 +1845,8 @@ function z_mail($params) {
$messageHeader =
$params['additionalMailHeader'] .
"From: $fromName <{$params['fromEmail']}>\n" .
- "Reply-To: $fromName <{$params['replyTo']}>";
+ "Reply-To: $fromName <{$params['replyTo']}>\n" .
+ "Content-Type: text/plain; charset=UTF-8";
// send the message
$res = mail(
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index 69ccd1fe5..e92de17c4 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -253,9 +253,18 @@ function string2bb(element) {
template: contact_format
};
+ // Autocomplete hashtags
+ tags = {
+ match: /(^\#)([^ \n]{3,})$/,
+ index: 2,
+ search: function(term, callback) { $.getJSON('/hashtags/' + '$f=&t=' + term).done(function(data) { callback($.map(data, function(entry) { return entry.text.toLowerCase().indexOf(term.toLowerCase()) === 0 ? entry : null; })); }); },
+ replace: function(item) { return "$1" + item.text + ' '; },
+ context: function(text) { return text.toLowerCase(); },
+ template: tag_format
+ };
this.attr('autocomplete', 'off');
- var a = this.textcomplete([contacts,forums], {className:'acpopup', maxCount:100, zIndex: 1020, appendTo:'nav'});
+ var a = this.textcomplete([contacts,forums,tags], {className:'acpopup', maxCount:100, zIndex: 1020, appendTo:'nav'});
a.on('textComplete:select', function(e, value, strategy) { submit_form(this); });
};
})( jQuery );