aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorSimon L'nu <simon.lnu@gmail.com>2012-05-05 20:08:19 -0400
committerSimon L'nu <simon.lnu@gmail.com>2012-05-05 20:08:19 -0400
commit0c4099966a5ac1f1ff5dc568a600aa57776fb752 (patch)
treef6c8a337eeae8ecc1848e319c9e5beb8c338d973 /include/text.php
parent250bf57e1e69670b956c1365dcb9ffa90800c05c (diff)
parente1ab3a93cc450ca52c7651ecca8cad8334e5f1ce (diff)
downloadvolse-hubzilla-0c4099966a5ac1f1ff5dc568a600aa57776fb752.tar.gz
volse-hubzilla-0c4099966a5ac1f1ff5dc568a600aa57776fb752.tar.bz2
volse-hubzilla-0c4099966a5ac1f1ff5dc568a600aa57776fb752.zip
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master: diabook-theme: small fix diabook-theme: twitter-box-update at right_aside diabook-theme: can now set the twitter search term in theme-settings & small fixes consolidate item deletion so we can fix orphaned categories and file_as tags. DE: new email templates translated workaround to clean up orphaned filetags only show remove category to item owner Option to set theme width added. Minor layout changes * master:
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php
index 4ae5d1333..1b5b0afd4 100644
--- a/include/text.php
+++ b/include/text.php
@@ -930,7 +930,8 @@ function prepare_body($item,$attach = false) {
foreach($matches as $mtch) {
if(strlen($x))
$x .= ',';
- $x .= xmlify(file_tag_decode($mtch[1])) . ' <a href="' . $a->get_baseurl() . '/filerm/' . $item['id'] . '?f=&cat=' . xmlify(file_tag_decode($mtch[1])) . '" title="' . t('remove') . '" >' . t('[remove]') . '</a>';
+ $x .= xmlify(file_tag_decode($mtch[1]))
+ . ((local_user() == $item['uid']) ? ' <a href="' . $a->get_baseurl() . '/filerm/' . $item['id'] . '?f=&cat=' . xmlify(file_tag_decode($mtch[1])) . '" title="' . t('remove') . '" >' . t('[remove]') . '</a>' : '');
}
if(strlen($x))
$s .= '<div class="categorytags"><span>' . t('Categories:') . ' </span>' . $x . '</div>';
@@ -1490,7 +1491,7 @@ function file_tag_unsave_file($uid,$item,$file,$cat = false) {
intval($uid)
);
- $r = q("select file from item where uid = %d " . file_tag_file_query('item',$file,(($cat) ? 'category' : 'file')),
+ $r = q("select file from item where uid = %d and deleted = 0 " . file_tag_file_query('item',$file,(($cat) ? 'category' : 'file')),
intval($uid)
);