X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Factivity.php;h=c3a984a7b994f289995dccf521ee0e4eb8b83fda;hb=56e72ec7a138b823b8094312d935c9644838a8eb;hp=d3eeadcee9eb106d095e7e901f892e58a476a338;hpb=2e27cbcadd16eca075e363fa154682cba09a9849;p=quix0rs-gnu-social.git diff --git a/lib/activity.php b/lib/activity.php index d3eeadcee9..c3a984a7b9 100644 --- a/lib/activity.php +++ b/lib/activity.php @@ -327,16 +327,8 @@ class Activity return null; } - function asString($namespace=false, $author=true) + function asString($namespace=false, $author=true, $source=false) { - $c = Cache::instance(); - - $str = $c->get(Cache::codeKey('activity:as-string:'.$this->id)); - - if (!empty($str)) { - return $str; - } - $xs = new XMLStringer(true); if ($namespace) { @@ -502,7 +494,7 @@ class Activity // Info on the source feed - if (!empty($this->source)) { + if ($source && !empty($this->source)) { $xs->elementStart('source'); $xs->element('id', null, $this->source->id); @@ -559,8 +551,6 @@ class Activity $str = $xs->getString(); - $c->set(Cache::codeKey('activity:as-string:'.$this->id), $str); - return $str; }