]> git.mxchange.org Git - friendica.git/blobdiff - object/Item.php
New field "network" in item table to speed up the system.
[friendica.git] / object / Item.php
index 06b3683c6a494753e30dfde75c8f4057dc43155d..0a793e5f32521b4f27c1720b2400922617523dcb 100644 (file)
@@ -158,23 +158,6 @@ 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));
-
-               foreach($taglist as $tag) {
-
-                       if ($tag["url"] == "")
-                               $tag["url"] = $searchpath.strtolower($tag["term"]);
-
-                       if ($tag["type"] == TERM_HASHTAG) {
-                               $hashtags[] = "#<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
-                               $prefix = "#";
-                       } elseif ($tag["type"] == TERM_MENTION) {
-                               $mentions[] = "@<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
-                               $prefix = "@";
-                       }
-                       $tags[] = $prefix."<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
-               }
 
                /*foreach(explode(',',$item['tag']) as $tag){
                        $tag = trim($tag);
@@ -239,7 +222,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 = "";
@@ -289,9 +272,9 @@ class Item extends BaseObject {
                        'template' => $this->get_template(),
 
                        'type' => implode("",array_slice(explode("/",$item['verb']),-1)),
-                       'tags' => $tags,
-                       'hashtags' => $hashtags,
-                       'mentions' => $mentions,
+                       'tags' => $item['tags'],
+                       'hashtags' => $item['hashtags'],
+                       'mentions' => $item['mentions'],
                        'txt_cats' => t('Categories:'),
                        'txt_folders' => t('Filed under:'),
                        'has_cats' => ((count($categories)) ? 'true' : ''),
@@ -527,7 +510,7 @@ class Item extends BaseObject {
         */
        public function get_data_value($name) {
                if(!isset($this->data[$name])) {
-                       logger('[ERROR] Item::get_data_value : Item has no value name "'. $name .'".', LOGGER_DEBUG);
+//                     logger('[ERROR] Item::get_data_value : Item has no value name "'. $name .'".', LOGGER_DEBUG);
                        return false;
                }