aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-02-16 16:04:46 -0800
committerfriendica <info@friendica.com>2014-02-16 16:04:46 -0800
commit70526915c87b57e4d91f0ab9a518d34a6dc04c82 (patch)
treea8f736754077e2a113b51185ec55d2f86657f7b2
parent16cd9e2a7e111b4c1ea8babb69862cb82775fa09 (diff)
downloadvolse-hubzilla-70526915c87b57e4d91f0ab9a518d34a6dc04c82.tar.gz
volse-hubzilla-70526915c87b57e4d91f0ab9a518d34a6dc04c82.tar.bz2
volse-hubzilla-70526915c87b57e4d91f0ab9a518d34a6dc04c82.zip
several things were not working correctly w/r/t community tagging. The preference vanished from settings at some point, and we also weren't updating the original post timestamp so that the changed taxonomy would propagate correctly as an edit.
-rwxr-xr-xinclude/items.php7
-rw-r--r--include/zot.php12
-rw-r--r--mod/settings.php1
-rwxr-xr-xview/tpl/settings.tpl4
4 files changed, 19 insertions, 5 deletions
diff --git a/include/items.php b/include/items.php
index 9bcdd7d0b..bf575860a 100755
--- a/include/items.php
+++ b/include/items.php
@@ -2263,6 +2263,13 @@ function tag_deliver($uid,$item_id) {
if(is_array($j_obj['link']))
$taglink = get_rel_link($j_obj['link'],'alternate');
store_item_tag($u[0]['channel_id'],$p[0]['id'],TERM_OBJ_POST,TERM_HASHTAG,$j_obj['title'],$j_obj['id']);
+ $x = q("update item set edited = '%s', received = '%s', changed = '%s' where mid = '%s' and uid = %d limit 1",
+ dbesc(datetime_convert()),
+ dbesc(datetime_convert()),
+ dbesc(datetime_convert()),
+ dbesc($j_tgt['id']),
+ intval($u[0]['channel_id'])
+ );
proc_run('php','include/notifier.php','edit_post',$p[0]['id']);
}
}
diff --git a/include/zot.php b/include/zot.php
index 21eef073c..c9d426cc2 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1064,7 +1064,9 @@ function zot_import($arr, $sender_url) {
}
stringify_array_elms($recip_arr);
$recips = implode(',',$recip_arr);
- $r = q("select channel_hash as hash from channel where channel_hash in ( " . $recips . " ) ");
+ $r = q("select channel_hash as hash from channel where channel_hash in ( " . $recips . " ) and not ( channel_pageflags & %d ) ",
+ intval(PAGE_REMOVED)
+ );
if(! $r) {
logger('recips: no recipients on this site');
continue;
@@ -1222,8 +1224,7 @@ function public_recips($msg) {
if(! $r)
$r = array();
- $x = q("select channel_hash as hash from channel left join abook on abook_channel = channel_id where abook_xchan = '%s'
- and (( " . $col . " & " . PERMS_SPECIFIC . " ) and ( abook_my_perms & " . $field . " )) OR ( " . $col . " & " . PERMS_CONTACTS . " ) ",
+ $x = q("select channel_hash as hash from channel left join abook on abook_channel = channel_id where abook_xchan = '%s' and not ( channel_pageflags & " . PAGE_REMOVED . " ) and (( " . $col . " & " . PERMS_SPECIFIC . " ) and ( abook_my_perms & " . $field . " )) OR ( " . $col . " & " . PERMS_CONTACTS . " ) ",
dbesc($msg['notify']['sender']['hash'])
);
@@ -1304,8 +1305,9 @@ function allowed_public_recips($msg) {
$condensed_recips[] = $rr['hash'];
$results = array();
- $r = q("select channel_hash as hash from channel left join abook on abook_channel = channel_id where abook_xchan = '%s' ",
- dbesc($hash)
+ $r = q("select channel_hash as hash from channel left join abook on abook_channel = channel_id where abook_xchan = '%s' and not ( channel_pageflags & %d ) ",
+ dbesc($hash),
+ intval(PAGE_REMOVED)
);
if($r) {
foreach($r as $rr)
diff --git a/mod/settings.php b/mod/settings.php
index ec758bc90..97965d0fd 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -939,6 +939,7 @@ function settings_content(&$a) {
'$pmacro1' => t('Private - <em>default private, never open or public</em>'),
'$pmacro0' => t('Blocked - <em>default blocked to/from everybody</em>'),
'$permiss_arr' => $permiss,
+ '$blocktags' => array('blocktags',t('Allow others to tag your posts'), 1-$blocktags, t('Often used by the community to retro-actively flag inappropriate content'),array(t('No'),t('Yes'))),
'$lbl_p2macro' => t('Advanced Privacy Settings'),
diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl
index 808078413..f5f2206bc 100755
--- a/view/tpl/settings.tpl
+++ b/view/tpl/settings.tpl
@@ -59,10 +59,14 @@
</div>
<div class="settings-common-perms">
+
+
{{$profile_in_dir}}
{{$suggestme}}
+{{include file="field_yesno.tpl" field=$blocktags}}
+
{{include file="field_input.tpl" field=$maxreq}}
{{include file="field_input.tpl" field=$cntunkmail}}