aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php7
-rw-r--r--include/text.php4
2 files changed, 9 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index 5812efa90..e26180641 100755
--- a/include/items.php
+++ b/include/items.php
@@ -834,6 +834,11 @@ function get_item_elements($x) {
$arr['item_flags'] = 0;
+ if(array_key_exists('flags',$x) && in_array('consensus',$x['flags']))
+ $arr['item_flags'] |= ITEM_CONSENSUS;
+
+
+
if(array_key_exists('flags',$x) && in_array('deleted',$x['flags']))
$arr['item_restrict'] = ITEM_DELETED;
if(array_key_exists('flags',$x) && in_array('hidden',$x['flags']))
@@ -1314,6 +1319,8 @@ function encode_item_flags($item) {
$ret[] = 'thread_parent';
if($item['item_flags'] & ITEM_NSFW)
$ret[] = 'nsfw';
+ if($item['item_flags'] & ITEM_CONSENSUS)
+ $ret[] = 'consensus';
if($item['item_private'])
$ret[] = 'private';
diff --git a/include/text.php b/include/text.php
index 18ef22d28..c130a9b8a 100644
--- a/include/text.php
+++ b/include/text.php
@@ -620,7 +620,7 @@ function get_tags($s) {
// Match full names against @tags including the space between first and last
// We will look these up afterward to see if they are full names or not recognisable.
- if(preg_match_all('/(@[^ \x0D\x0A,:?]+ [^ \x0D\x0A@,:?]+)([ \x0D\x0A@,:?]|$)/',$s,$match)) {
+ if(preg_match_all('/(@[^ \x0D\x0A,:?\[]+ [^ \x0D\x0A@,:?\[]+)([ \x0D\x0A@,:?\[]|$)/',$s,$match)) {
foreach($match[1] as $mtch) {
if(strstr($mtch,"]")) {
// we might be inside a bbcode color tag - leave it alone
@@ -636,7 +636,7 @@ function get_tags($s) {
// Otherwise pull out single word tags. These can be @nickname, @first_last
// and #hash tags.
- if(preg_match_all('/([@#][^ \x0D\x0A,;:?]+)([ \x0D\x0A,;:?]|$)/',$s,$match)) {
+ if(preg_match_all('/([@#][^ \x0D\x0A,;:?\[]+)([ \x0D\x0A,;:?\[]|$)/',$s,$match)) {
foreach($match[1] as $mtch) {
if(strstr($mtch,"]")) {
// we might be inside a bbcode color tag - leave it alone