aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xboot.php3
-rwxr-xr-xinclude/items.php7
-rw-r--r--include/text.php4
-rw-r--r--mod/home.php5
-rw-r--r--mod/item.php1
-rw-r--r--version.inc2
6 files changed, 18 insertions, 4 deletions
diff --git a/boot.php b/boot.php
index 1de8bcc41..e71f164a3 100755
--- a/boot.php
+++ b/boot.php
@@ -514,6 +514,7 @@ define ( 'ACTIVITY_OBJ_GROUP', NAMESPACE_ACTIVITY_SCHEMA . 'group' );
define ( 'ACTIVITY_OBJ_TAGTERM', NAMESPACE_ZOT . '/activity/tagterm' );
define ( 'ACTIVITY_OBJ_PROFILE', NAMESPACE_ZOT . '/activity/profile' );
define ( 'ACTIVITY_OBJ_THING', NAMESPACE_ZOT . '/activity/thing' );
+define ( 'ACTIVITY_OBJ_LOCATION',NAMESPACE_ZOT . '/activity/location' );
/**
* item weight for query ordering
@@ -569,7 +570,7 @@ define ( 'ITEM_ORIGIN', 0x0001);
define ( 'ITEM_UNSEEN', 0x0002);
define ( 'ITEM_STARRED', 0x0004);
define ( 'ITEM_UPLINK', 0x0008);
-define ( 'ITEM_UPLINK_PRV', 0x0010);
+define ( 'ITEM_CONSENSUS', 0x0010); // an item which may present agree/disagree/abstain options
define ( 'ITEM_WALL', 0x0020);
define ( 'ITEM_THREAD_TOP', 0x0040);
define ( 'ITEM_NOTSHOWN', 0x0080); // technically visible but not normally shown (e.g. like/dislike)
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
diff --git a/mod/home.php b/mod/home.php
index e82aab385..2e57a2ab9 100644
--- a/mod/home.php
+++ b/mod/home.php
@@ -109,6 +109,11 @@ function home_content(&$a, $update = 0, $load = false) {
}
else {
+ if(get_config('system','disable_discover_tab')) {
+ call_hooks('home_content',$o);
+ return $o;
+ }
+
if(! $update) {
$maxheight = get_config('system','home_divmore_height');
diff --git a/mod/item.php b/mod/item.php
index bc8cfd047..7704d0ba6 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -88,6 +88,7 @@ function item_post(&$a) {
$pagetitle = ((x($_REQUEST,'pagetitle')) ? escape_tags(urlencode($_REQUEST['pagetitle'])) : '');
$layout_mid = ((x($_REQUEST,'layout_mid')) ? escape_tags($_REQUEST['layout_mid']): '');
$plink = ((x($_REQUEST,'permalink')) ? escape_tags($_REQUEST['permalink']) : '');
+ $obj_type = ((x($_REQUEST,'obj_type')) ? escape_tags($_REQUEST['obj_type']) : ACTIVITY_OBJ_NOTE);
// allow API to bulk load a bunch of imported items with sending out a bunch of posts.
$nopush = ((x($_REQUEST,'nopush')) ? intval($_REQUEST['nopush']) : 0);
diff --git a/version.inc b/version.inc
index 5fc4bc7c6..7eb391e00 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2015-01-12.917
+2015-01-14.918