aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/menu.php2
-rw-r--r--include/permissions.php2
-rw-r--r--include/spam.php35
3 files changed, 37 insertions, 2 deletions
diff --git a/include/menu.php b/include/menu.php
index d69c5d0d3..be9831951 100644
--- a/include/menu.php
+++ b/include/menu.php
@@ -152,7 +152,7 @@ function menu_edit($arr) {
return false;
}
- return q("update menu set menu_name = '%s', menu_desc = '%s', menu_flags = %d,
+ return q("update menu set menu_name = '%s', menu_desc = '%s', menu_flags = %d
where menu_id = %d and menu_channel_id = %d limit 1",
dbesc($menu_name),
dbesc($menu_desc),
diff --git a/include/permissions.php b/include/permissions.php
index 45ea7c3eb..1b11dfb87 100644
--- a/include/permissions.php
+++ b/include/permissions.php
@@ -24,7 +24,7 @@ function get_perms() {
'post_mail' => array('channel_w_mail', intval(PERMS_W_MAIL), false, t('Can send me private mail messages'), ''),
'post_photos' => array('channel_w_photos', intval(PERMS_W_PHOTOS), false, t('Can post photos to my photo albums'), ''),
'tag_deliver' => array('channel_w_tagwall', intval(PERMS_W_TAGWALL), false, t('Can forward to all my channel contacts via post @mentions'), t('Advanced - useful for creating group forum channels')),
- 'chat' => array('channel_w_chat', intval(PERMS_W_CHAT), false, t('Can chat with me (when available)'), t('Requires compatible chat plugin')),
+ 'chat' => array('channel_w_chat', intval(PERMS_W_CHAT), false, t('Can chat with me (when available)'), t('')),
'write_storage' => array('channel_w_storage', intval(PERMS_W_STORAGE), false, t('Can write to my "public" file storage'), ''),
'write_pages' => array('channel_w_pages', intval(PERMS_W_PAGES), false, t('Can edit my "public" pages'), ''),
diff --git a/include/spam.php b/include/spam.php
new file mode 100644
index 000000000..8b158b7ae
--- /dev/null
+++ b/include/spam.php
@@ -0,0 +1,35 @@
+<?php /** @file */
+
+
+function string_splitter($s) {
+
+ if(! $s)
+ return array();
+
+ $s = preg_replace('/\pP+/','',$s);
+
+ $x = mb_split("\[|\]|\s",$s);
+
+ $ret = array();
+ if($x) {
+ foreach($x as $y) {
+ if(mb_strlen($y) > 2)
+ $ret[] = substr($y,0,64);
+ }
+ }
+ return $ret;
+}
+
+
+
+function get_words($uid,$list) {
+
+ stringify($list,true);
+
+ $r = q("select * from spam where term in ( " . $list . ") and uid = %d",
+ intval($uid)
+ );
+
+ return $r;
+}
+