]> git.mxchange.org Git - friendica.git/commitdiff
disable the output of the "posted" value in shares when item cache is enabled.
authorMichael Vogel <icarus@dabo.de>
Mon, 2 Dec 2013 19:25:43 +0000 (20:25 +0100)
committerMichael Vogel <icarus@dabo.de>
Mon, 2 Dec 2013 19:25:43 +0000 (20:25 +0100)
include/bbcode.php

index e63a8d394ec41f6663b3001acd2327ca13b76c10..412010380dc45c4867564ee673c71e7b4c6bea49 100644 (file)
@@ -259,16 +259,22 @@ function bb_ShareAttributes($match) {
         if ($matches[1] != "")
                 $profile = $matches[1];
 
-        $posted = "";
-        preg_match("/posted='(.*?)'/ism", $attributes, $matches);
-        if ($matches[1] != "")
-                $posted = $matches[1];
+       $posted = "";
 
-        preg_match('/posted="(.*?)"/ism', $attributes, $matches);
-        if ($matches[1] != "")
-                $posted = $matches[1];
+       $itemcache = get_config("system","itemcache");
+
+       // relative dates only make sense when they aren't cached
+       if ($itemcache == "") {
+               preg_match("/posted='(.*?)'/ism", $attributes, $matches);
+               if ($matches[1] != "")
+                       $posted = $matches[1];
 
-       $reldate = (($posted) ? " " . relative_date($posted) : '');
+               preg_match('/posted="(.*?)"/ism', $attributes, $matches);
+               if ($matches[1] != "")
+                       $posted = $matches[1];
+
+               $reldate = (($posted) ? " " . relative_date($posted) : '');
+       }
 
        $headline = '<div class="shared_header">';
         //$headline = '<br /><div class="shared_header">';