X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=object%2FItem.php;h=575a28f58fdfcd63c16fc6d7d1f7d20d83897bfd;hb=f41c5dd1e5999e7ce0bfc1515d6998d5fa0986cd;hp=139a81f71fbe3b4133c70dfba74b951c16026820;hpb=280b72b9e665c730b9d02319f5ba0d7930b98326;p=friendica.git
diff --git a/object/Item.php b/object/Item.php
index 139a81f71f..575a28f58f 100644
--- a/object/Item.php
+++ b/object/Item.php
@@ -86,7 +86,14 @@ class Item extends BaseObject {
$a = $this->get_app();
$item = $this->get_data();
-
+ $edited = false;
+ if (strcmp($item['created'], $item['edited'])<>0) {
+ $edited = array(
+ 'label' => t('This entry was edited'),
+ 'date' => datetime_convert('UTC', date_default_timezone_get(), $item['edited'], 'r'),
+ 'relative' => relative_date($item['edited'])
+ );
+ }
$commentww = '';
$sparkle = '';
$buttons = '';
@@ -151,22 +158,24 @@ class Item extends BaseObject {
$hashtags = array();
$mentions = array();
- $taglist = q("SELECT `type`, `term`, `url` FROM `term` WHERE `otype` = %d AND `oid` = %d AND `type` IN (%d, %d) ORDER BY `tid`",
- intval(TERM_OBJ_POST), intval($item['id']), intval(TERM_HASHTAG), intval(TERM_MENTION));
+ if (!get_config('system','suppress_tags')) {
+ $taglist = q("SELECT `type`, `term`, `url` FROM `term` WHERE `otype` = %d AND `oid` = %d AND `type` IN (%d, %d) ORDER BY `tid`",
+ intval(TERM_OBJ_POST), intval($item['id']), intval(TERM_HASHTAG), intval(TERM_MENTION));
- foreach($taglist as $tag) {
+ foreach($taglist as $tag) {
- if ($tag["url"] == "")
- $tag["url"] = $searchpath.strtolower($tag["term"]);
+ if ($tag["url"] == "")
+ $tag["url"] = $searchpath.strtolower($tag["term"]);
- if ($tag["type"] == TERM_HASHTAG) {
- $hashtags[] = "#".$tag["term"]."";
- $prefix = "#";
- } elseif ($tag["type"] == TERM_MENTION) {
- $mentions[] = "@".$tag["term"]."";
- $prefix = "@";
+ if ($tag["type"] == TERM_HASHTAG) {
+ $hashtags[] = "#".$tag["term"]."";
+ $prefix = "#";
+ } elseif ($tag["type"] == TERM_MENTION) {
+ $mentions[] = "@".$tag["term"]."";
+ $prefix = "@";
+ }
+ $tags[] = $prefix."".$tag["term"]."";
}
- $tags[] = $prefix."".$tag["term"]."";
}
/*foreach(explode(',',$item['tag']) as $tag){
@@ -232,7 +241,7 @@ class Item extends BaseObject {
localize_item($item);
- if ($item["postopts"]) {
+ if ($item["postopts"] and !get_config("system", "suppress_language")) {
//$langdata = explode(";", $item["postopts"]);
//$langstr = substr($langdata[0], 5)." (".round($langdata[1]*100, 1)."%)";
$langstr = "";
@@ -325,13 +334,14 @@ class Item extends BaseObject {
'drop' => $drop,
'vote' => $buttons,
'like' => $like,
- 'dislike' => $dislike,
+ 'dislike' => $dislike,
'switchcomment' => t('Comment'),
'comment' => $this->get_comment_box($indent),
'previewing' => ($conv->is_preview() ? ' preview ' : ''),
'wait' => t('Please wait'),
'thread_level' => $thread_level,
- 'postopts' => $langstr
+ 'postopts' => $langstr,
+ 'edited' => $edited
);
$arr = array('item' => $item, 'output' => $tmp_item);