aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-06-23 19:45:39 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-06-23 19:45:39 -0700
commitcb76fb8b9b659c4ec06e359f375a35a534927b99 (patch)
treecb5a77aa95ea6e510e9e1ccb33238d6de0957ec7
parent833098e3460e0a2c7fbffaa59163af815f419e68 (diff)
downloadvolse-hubzilla-cb76fb8b9b659c4ec06e359f375a35a534927b99.tar.gz
volse-hubzilla-cb76fb8b9b659c4ec06e359f375a35a534927b99.tar.bz2
volse-hubzilla-cb76fb8b9b659c4ec06e359f375a35a534927b99.zip
item flag fixes discovered after a few merges
-rw-r--r--include/Import/refimport.php4
-rw-r--r--include/api.php17
-rwxr-xr-xinclude/diaspora.php2
-rwxr-xr-xinclude/items.php11
-rw-r--r--include/zot.php3
-rw-r--r--mod/branchtopic.php3
-rw-r--r--mod/editpost.php2
-rw-r--r--mod/public.php2
-rw-r--r--mod/search.php1
9 files changed, 12 insertions, 33 deletions
diff --git a/include/Import/refimport.php b/include/Import/refimport.php
index 7d32e143f..3ef8870ac 100644
--- a/include/Import/refimport.php
+++ b/include/Import/refimport.php
@@ -260,11 +260,7 @@ function reflect_comment_store($channel,$post,$comment,$user) {
$arr['edited'] = $comment['created'];
$arr['author_xchan'] = $hash;
$arr['owner_xchan'] = $channel['channel_hash'];
-<<<<<<< HEAD
$arr['item_origin'] = 1;
-=======
- $arr['item_flags'] = ITEM_ORIGIN;
->>>>>>> master
$arr['item_wall'] = 1;
$arr['verb'] = ACTIVITY_POST;
$arr['comment_policy'] = 'contacts';
diff --git a/include/api.php b/include/api.php
index effaa4484..e72344ff7 100644
--- a/include/api.php
+++ b/include/api.php
@@ -1547,8 +1547,8 @@ require_once('include/items.php');
}
$item = q("SELECT * FROM item WHERE id = %d AND uid = %d",
- intval($itemid),
- intval(api_user())
+ intval($itemid),
+ intval(api_user())
);
if (! $item)
@@ -1556,19 +1556,16 @@ require_once('include/items.php');
switch($action){
case "create":
-
- $flags = $item[0]['item_flags'] | ITEM_STARRED;
-
+ $flags = $item[0]['item_starred'] = 1;
break;
case "destroy":
-
- $flags = $item[0]['item_flags'] | (~ ITEM_STARRED);
+ $flags = $item[0]['item_starred'] = 0;
break;
default:
return false;
}
- $r = q("UPDATE item SET item_flags = %d where id = %d and uid = %d",
+ $r = q("UPDATE item SET item_starred = %d where id = %d and uid = %d",
intval($flags),
intval($itemid),
intval(api_user())
@@ -1577,8 +1574,8 @@ require_once('include/items.php');
return false;
$item = q("SELECT * FROM item WHERE id = %d AND uid = %d",
- intval($itemid),
- intval(api_user())
+ intval($itemid),
+ intval(api_user())
);
xchan_query($item,true);
diff --git a/include/diaspora.php b/include/diaspora.php
index f46ddc764..997cbb187 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -2456,7 +2456,7 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
}
*/
- if($item['item_flags'] & ITEM_CONSENSUS) {
+ if(intval($item['item_consensus'])) {
$poll = replace_macros(get_markup_template('diaspora_consensus.tpl'), array(
'$guid_q' => random_string(),
'$question' => t('Please choose'),
diff --git a/include/items.php b/include/items.php
index 3a86717bb..ee8ce5575 100755
--- a/include/items.php
+++ b/include/items.php
@@ -3225,17 +3225,6 @@ function start_delivery_chain($channel, $item, $item_id, $parent) {
$title = $item['title'];
$body = $item['body'];
- if(! $private) {
- if($flag_bits & ITEM_OBSCURED) {
- $key = get_config('system','prvkey');
- if($title)
- $title = crypto_unencapsulate(json_decode($title,true),$key);
- if($body)
- $body = crypto_unencapsulate(json_decode($body,true),$key);
- $item_obscured = 0;
- }
- }
-
$r = q("update item set item_uplink = %d, item_nocomment = %d, item_obscured = %d, item_flags = %d, owner_xchan = '%s', allow_cid = '%s', allow_gid = '%s',
deny_cid = '%s', deny_gid = '%s', item_private = %d, public_policy = '%s', comment_policy = '%s', title = '%s', body = '%s', item_wall = %d, item_origin = %d where id = %d",
intval($item_uplink),
diff --git a/include/zot.php b/include/zot.php
index 309df252d..2187f3103 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1373,8 +1373,7 @@ function public_recips($msg) {
if($msg['message']['message_top']) {
$z = q("select owner_xchan as hash from item where parent_mid = '%s' ",
- dbesc($msg['message']['message_top']),
- intval(ITEM_UPLINK)
+ dbesc($msg['message']['message_top'])
);
if($z)
$r = array_merge($r,$z);
diff --git a/mod/branchtopic.php b/mod/branchtopic.php
index 609cb19ec..d49bbaf4c 100644
--- a/mod/branchtopic.php
+++ b/mod/branchtopic.php
@@ -33,8 +33,7 @@ function branchtopic_init(&$a) {
intval(local_channel())
);
- $x = q("update item set parent = id, route = '', item_flags = (item_flags | %d) where id = %d",
- intval(ITEM_THREAD_TOP),
+ $x = q("update item set parent = id, route = '', item_thread_top = 1 where id = %d",
intval($item_id)
);
diff --git a/mod/editpost.php b/mod/editpost.php
index 66196b2d2..8e4b37103 100644
--- a/mod/editpost.php
+++ b/mod/editpost.php
@@ -126,7 +126,7 @@ function editpost_content(&$a) {
'$noloc' => t('Clear browser location'),
'$voting' => t('Toggle voting'),
'$feature_voting' => $voting,
- '$consensus' => (($itm[0]['item_flags'] & ITEM_CONSENSUS) ? 1 : 0),
+ '$consensus' => intval($itm[0]['item_consensus']),
'$wait' => t('Please wait'),
'$permset' => t('Permission settings'),
'$ptyp' => $itm[0]['type'],
diff --git a/mod/public.php b/mod/public.php
index fe3f3aa21..2106be7a6 100644
--- a/mod/public.php
+++ b/mod/public.php
@@ -71,7 +71,7 @@ function public_content(&$a, $update = 0, $load = false) {
require_once('include/security.php');
if(get_config('system','site_firehose')) {
- $uids = " and item.uid in ( " . stream_perms_api_uids(PERMS_PUBLIC) . " ) and item_private = 0 and (item_flags & " . intval(ITEM_WALL) . " ) > 0 ";
+ $uids = " and item.uid in ( " . stream_perms_api_uids(PERMS_PUBLIC) . " ) and item_private = 0 and item_wall = 1 ";
}
else {
$sys = get_sys_channel();
diff --git a/mod/search.php b/mod/search.php
index 0363a225f..dceb7d72a 100644
--- a/mod/search.php
+++ b/mod/search.php
@@ -172,7 +172,6 @@ function search_content(&$a,$update = 0, $load = false) {
$item_normal
$sql_extra
$suffix $pager_sql",
- intval(ITEM_OBSCURED),
dbesc($sys['xchan_hash'])
);
}